Register a phone for push notifications
POST
/me/devices
const url = 'https://example.com/me/devices';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"platform":"ios","token":"example","appVersion":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/me/devices \ --header 'Content-Type: application/json' \ --data '{ "platform": "ios", "token": "example", "appVersion": "example" }'The driver apps, after sign-in and whenever they start: the phone’s push address with Apple or Google. Push notices then reach this phone for every business the caller belongs to, as their notification settings allow. A token already registered moves to the caller: a shared phone belongs to whoever signed in last. Signed-in people only; not for API keys.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
platform
required
string
token
required
string
appVersion
string
Responses
Section titled “Responses”Registered
Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}