HTTP Status Codes

HTTP status codes returned by the Daylite API and what they mean.

200OKSuccess!
201CreatedThe requested resource has been created and persisted to the API databases.
204No ContentThe server successfully processed the request and is not returning any content.
304Not ModifiedThe content hasn't changed since the ETag sent in If-None-Match (email bodies).
400Bad RequestThere was a problem with the request. The response body should contain more details.
401UnauthorizedAuthentication token not included with request or not valid.
403ForbiddenAuthentication token is valid, but does not have permission to access the requested resource.
404Not FoundThe requested resource does not exist.
406Not AcceptableThe request's Accept header does not contain a format which the server is capable of serving.
409ConflictThe request conflicts with the current state, e.g. a file's content has already been uploaded.
429Too Many RequestsYour request has been rejected due to rate limiting, try again shortly.
500Internal Server ErrorSomething went wrong on the server side.
503Service UnavailableThis code may be returned during API maintenance periods.

Error responses

Error responses have a JSON body. Most contain a single error code:

{ "error": "contact_not_found" }

When a create or update is rejected because of the data sent, the body lists the errors for each attribute instead:

{ "name": [{ "error": "blank" }] }

For more details on the meanings of each code, see the list of HTTP status codes page on Wikipedia.