Content type
Writes return a location header and no body
Creating a guest, creating a segment, and updating either of them return200 OK with an empty body and a location header holding the path of the resource:
gender outside M, F, and X, is dropped and the status code stays 200. Read the guest back with Get a guest when the write matters.
Long operations return a task
Merging guests and computing a merge confidence run in the background. They return200 OK with an empty body and a location header pointing at a task:
status reaches completed or failed. A completed task carries its result: the confidence score for a computation, and for a merge an object whose rid ends with the identifier of the merged profile.
error instead. The identifiers you already hold keep working after a merge and redirect to the merged profile, as described in Best practices.
Error format
Errors return a JSON body with three fields:string
A machine-readable code, such as
system.invalidParams or system.accessDenied.string
A human-readable summary.
object
Details specific to this occurrence, such as the invalid property and the reason. Absent on some errors,
401 among them.Response codes
200 OK
The request was processed. The body depends on the endpoint: a guest, a segment, a count, a document list, an operation result, or nothing at all on the endpoints that answer with alocation header.
204 No Content
The request succeeded and there is nothing to return: deleting a segment.400 Bad Request
The request failed validation, with the codesystem.invalidParams (URL parameters) or system.invalidQuery (request body). The data object says which property is invalid. Fix the request before retrying.
401 Unauthorized
The bearer token is missing, invalid, or does not give access to the entity. The code issystem.accessDenied, and the three cases share one response so an entity you cannot reach is indistinguishable from one that does not exist. See Authentication.
404 Not Found
The guest, segment, or task identifier does not match an existing resource. The code issystem.notFound.
408 Request Timeout
The service did not answer in time, with the codesystem.timeout. Retry later with backoff.
500 Internal Server Error
The code issystem.internalError. On this API, a 500 often points at the request rather than the server: an attribute sent in the wrong shape, such as an email as a plain string instead of an object, fails this way. Check the body against Requests before anything else. Treat a 500 as transient only on reads, where a retry with exponential backoff is safe. If it persists, contact us.