API Reference

Error Codes

Mode uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a task failed, etc.).

Our API resources can produce errors for many reasons, such as invalid parameters, authentication errors, and rate limits.

400 Bad Request

This response is given any time the request was malformed, either with query parameters that are improper, or a request body that is unusually structured or with unsupported inputs.

Properties Type

id

required

string

enum: bad_request

message

required

string

401 Unauthorized

This response is given any time a request is made against a resource or endpoint that requires an authorization and none was provided.

Properties Type

id

required

string

enum: unauthorized

message

required

string

403 Forbidden

This response is given any time a request is made against a resource or endpoint that requires an authorization, and the authorization given is not privileged enough to access it.

Properties Type

id

required

string

enum: forbidden

message

required

string

404 Not Found

This response is given any time a resource required to fulfill the request could not be found. Sometimes this is the resource targeted by the request, like the Space at /{organization}/spaces/{space}. Sometimes it is instead a resource the targeted resource is scoped to, like the organization in the previous example. Still sometimes it might be an object needed to complete the post or patch operation, like the member (the composite lookup of both member_token and member_type) in the Space Membership creation request /{account}/spaces/{space}/memberships.

Properties Type

id

required

string

enum: not_found

message

required

string