REST API
Register or update device
POST https://mbj-api.com/v1/identify
Creates or updates a device for the resolved app user. Send a nonblank Identity-Device-ID header OR device_id in JSON or query parameters; the header takes precedence. Device metadata comes only from headers; omitted metadata is cleared. Identity may be created/merged before missing device data returns 400. Successful response has no body.
Request
curl --include --request POST 'https://mbj-api.com/v1/identify' \
--header 'Authorization: Token token=YOUR_API_KEY' \
--header 'Identity-Anonymous-ID: $MBJAnonymousID:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' \
--header 'Identity-Device-ID: $MBJDeviceID:cccccccccccccccccccccccccccccccc'
Parameters
| Name / location | Required / type | Details |
|---|---|---|
Identity-Device-ID / header |
No / string | Required unless device_id is supplied in JSON or query. Nonblank device identifier, persisted across requests. Takes precedence over device_id.
Example: "$MBJDeviceID:cccccccccccccccccccccccccccccccc"
|
App-Build-Version / header |
No / string | Application build number
Example: "8796845"
|
Device-Model / header |
No / string | Device model name
Example: "iPhone 15 Pro"
|
Framework-Version / header |
No / string | Mobile Joe SDK version
Example: "2.1.0"
|
device_id / query |
No / string | Alternative to Identity-Device-ID or the JSON property; provide at least one device ID. |
Headers: Identity-Anonymous-ID (required), Identity-External-ID, App-Version, OS-Name, OS-Version, Preferred-Languages, Language-Code. See Headers.
Request body
Optional alternative device ID. Other device metadata is read only from headers.
application/json
{
"device_id": "$MBJDeviceID:cccccccccccccccccccccccccccccccc"
}
Responses
204 — Device registered/updated successfully
No response body.
Errors: 400, 401, 403, 422, and 429. See Errors.