Response Codes & Errors

Code

Definition

Returns

Remarks

200

OK

The requested data.

201

Created

The newly created object.

400

Bad Request

An Error object.

General error within the API.

401

Unauthorized

Empty body.

404

Not Found

Empty body.

Wrong URL or current user does not own specific object being manipulated.

422

Unprocessable Entity

A ValidationError object.

Validation errors, missing parameters or incorrect data.

The error object

Attribute

Type

Description

code

string

The error code.

message

string

The translated error message.

Example

{
"errors": [
{
"code": "unknown_exception",
"message": "An unknown exception occurred."
}
]
}

The validation error object

Attribute

Type

Description

field

string

The name of the field that has an error.

code

string

The validation error code describing which validation failed.

message

string

The translated error message.

Example

{
"errors": [
{
"field": "username",
"code": "already_taken",
"message": "Username has already been taken"
}
]
}