Link copied to clipboard!

Errors

These errors can be returned from our API:

Field Type Description
400 invalid_request The request body is not a valid JSON object or is empty.
400 unexpected_field A field is present in the request but is not one of the required or optional fields.
400 missing_field A field is present in the request but is not one of the required or optional fields.
400 invalid_field A field is present in the request but is not one of the required or optional fields.
401 application_not_found The referenced application ID does not exist.
401 user_not_found The request references a user ID which has not yet been created.
401 organization_not_found The request references an organization ID which has not yet been created.
401 missing_authorization_header The request references an organization ID which has not yet been created.
401 invalid_authorization_header The Authorization header is either not a valid JWT or is missing the Bearer prefix.
401 invalid_app_token The app token not a valid JWT or is signed incorrectly.
401 invalid_access_token The access token is invalid. You should request another one.
401 expired_access_token The access token is expired or has been revoked. You should request another one.
409 organization_already_exists The organization you’re trying to create already exists.
409 user_already_exists The user you’re trying to create already exists.
500 error Generic internal server error.

Example request with missing access token:

curl "https://api.cord.com/v1/users/123" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d '{
    "profile_picture_url": "https://cord.com/favicon-32x32.png"
  }'

{
  "error": "missing_authorization_header",
  "message": "Authorization header bearer token must be present."
}

Example request with an unexpected field:

curl "https://api.cord.com/v1/organizations/123" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d '{ "foo": "bar" }'

{
  "error": "unexpected_field",
  "message": "foo is not a valid field name for this request. Expected 3 optional fields: name, status and members."
}

In this section