Skip to main content
POST
Identify upserts a profile: it creates it the first time a userId is seen and updates its traits after that. Send it when a person signs up, signs in or changes their details.
This call names a userId, so in required mode, the default, it also needs the Maqetin-Identity-Token header. See Identity verification.

Headers

string
required
Bearer mq_live_…, your public key. A secret key is refused here: send events with a secret key to /v1/batch.
string
A token your server signed for this userId. Needed in required mode. See Identity token.

Body

The body is at most 32 KiB. Any other top-level field is a 400.
string
required
Your own id for the person, 1 to 256 characters.
object
required
What you know about the person. Send {} when you have nothing to add. Trait names cannot hold the NUL character. Any trait not listed here can hold any JSON value.
string
required
Where the call came from: web, ios, android, node, python, go or rest. Use rest for your own HTTP calls.
string
The id the person had before they signed in, at most 256 characters. Their earlier anonymous events join the profile.
string
1 to 64 characters. A retry with the same id is stored once. See Send an event once.
string
When it happened, as an ISO 8601 date-time. Used only together with sentAt. See Event time.
string
When your client sent the request, as an ISO 8601 date-time.
string
The id of the session, at most 256 characters.
string
The version of the SDK that made the call.
object
Where the call was made. The SDK fills it for you. Keys not listed here can hold any JSON value.

Response

number
required
The number of events taken: 1.
A 202 means the call is stored. A refusal has error and, for a body problem, at. See Errors.