Skip to main content

Errors

Codex 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, an entry creation failed, etc.). Codes in the 5xx range indicate an error with Codex's servers.

HTTP response codes

Below you can find the list of HTTP status code used by Codex API in responses.

CodeTypeDescription
200OKEverything works as expected.
204No ContentEverything works as expected, but there is nothing to return. Usually used in delete requests.
400Bad RequestThe request was unacceptable, often due to missing a required parameter or validation error.
401UnauthorizedNo valid token or API key was provided for making API requests.
403ForbiddenThe token or API key doesn't have the necessary permissions to perform the request.
404Not FoundThe requested resource was not found.
409ConflictThe request conflicts with another request, usually happens in entry or models update requests.
500Internal Server ErrorSomething went wrong internally while processing the request.
502Bad GatewaySomething went wrong with Codex servers.
503Service UnavailableSomething went wrong with Codex servers.
504Gateway TimeoutSomething went wrong with Codex servers or there is a network/routing problem.

Codex response codes

In 4xx range errors, Codex API returns a response body with detailed information about the error. All errors in Codex contain the following schema

{
"code": "1001",
"message": "Error message."
}

The code represents a unique custom Codex error code, which can be used to find more detailed information about the error in the documentation. The message is a short description about the error. On validation errors, the response body contains another field, errors which contains additional informatio about each field that contains validation failures. An example of validation error:

{
"code": "1002",
"message": "One or more validations failed.",
"errors": {
"field_1": [
{
"code": "2001",
"message": "Field field_1 is required."
}
],
"field_2": [
{
"code": "2002",
"message": "Field field_2 can contain only characters and numbers."
}
]
}
}

Below you can find the complete list of error codes used by Codex.

Models API

CodeMessage
2001Invalid model.
2002Field type is invalid
2003Fields must have unique aliases
2004Model not found with id or alias: {idOrAlias}
2005Only letters and numbers should be used in field alias
2006Field attributes are null or empty
2007Missing alias for {fieldType} field type.
2008Missing name for {fieldType} field type.
2009ValueType of {alias} field is not valid.
2010{rangeOperator} is not valid
2011Range operator is not defined.
2012Model version with id: {id} not found.
2013Model with alias: {alias} already exists.
2014ModelId is required.
2015Alias is required.
2016Alias should start with a letter and contain only letters and numbers.
2017Alias is reserved.
2018Name is required.
2019Name should contain only letters and numbers.
2020Icon is required.
2021Id is invalid.
2022No fields found in the model.
2023Title field is not provided.
2024Slug field is not provided.
2025Field alias {alias} is not allowed.
2026Field '{alias}' cannot be active and deleted in the same time.
2028Min cannot be null when operator is AtLeast
2029Max cannot be null when operator is AtMost
2030Min cannot be null when operator is Between
2031Max cannot be null when operator is Between
2032Min cannot be greater than Max when operator is Between
2033Exactly cannot be null when operator is Exactly
2035Model with external id: {externalId} already exists
2036{fieldType} is undefined.
2037Missing RevisionId.
2038Wrong Model RevisionId. You need to pull latest version of object in order to update it.
2042You do not have access to delete models
2043You do not have access to create models
2044You do not have access to view models
2045You do not have access to publish models
2046You do not have access to update models
2047You do not have access to manage models

Entries API

CodeMessage
2101One or more entry field values are invalid.
2102Entry VersionId: {versionId} is invalid.
2103Site: {siteId} is forbidden to create or update this entry
2104Entry with id: {id} not found.
2105Missing RevisionId.
2106Cannot change status from {oldStatus} to {newStatus}.
2107Entry version with id: {id} not found.
2108One or more labels are not valid
2109Published DateTime should be set
2110Status is undefined
2111Unpublished DateTime should be set after publication date
2112Unpublished DateTime should be set after actual date
2113Entry title is required
2114Content contains a field ({field}) that is not configured!
2115Entry slug is required
2116Slug is not a valid slug
2117Slug must be unique
2118One of the entry specified metrics is invalid
2119Field {fieldName} is not unique in collection
2120Referred entry with id: {entryId} does not exists
2121Referred model with alias: {model} does not exists
2123{field} is required
2124Field {field} is not a valid list
2125Field {field} is not a valid single value
2126{value} is not in predefined values
2127{field} must be at least {min}
2128{field} must be at most {max}
2128{field} must be at most {max}
2128{field} must be at most {max}
2129{field} must be between {min} and {max}
2130{field} must be exactly {exactly}
2131{field} {value} value does not match the defined format
2132Entry with external id: {externalId} already exists.
2133{field} ValueType is undefined
2134Min cannot be null when operator is AtLeast
2135Max cannot be null when operator is AtMost
2136Min cannot be null when operator is Between
2137Max cannot be null when operator is Between
2138Min cannot be greater than Max when operator is Between
2139Exactly cannot be null when operator is Exactly
2140Section id: {sectionId} is is not valid.
2141Author id: {authorId} is is not valid.
2142Model {model} is not valid.
2143Model {model} is not accepted.
2144Entry id: {entryId} is not valid.
2145Tag: {tag} is in not valid.
2147Wrong Entry RevisionId. You need to pull latest version of object in order to update it.
2155You do not have access to view entries
 2156You do not have access to create entries
 2157You do not have access to update entries content
 2158You do not have access to update entries labels
 2159You do not have access to delete entries
 2160You do not have access to publish entry
 2161You do not have access to schedule entries
 2162You do not have access to unpublish entry

Authors API

CodeMessage
2301Author Id is required.
2302Byline is required.
2303Undefined status.
2304Author with id: {authorId} not found.
2304Author with id: {authorId} not found.
2305Invalid status.
2306Biography is required.
2307Image is required.
2308Please provide a valid Email Address!
2309Please provide a valid Facebook url!
2310Please provide a valid Website url!
2311Please provide a valid Instagram url!
2312Please provide a valid Twitter url!
2313Please provide a valid LinkedIn url!
2314Please provide a valid Telegram url!
2315Author with external id: {externalId} already exists.
2315Author with external id: {externalId} already exists.
2317You do not have access to manage authors
2318You do not have access to view authors

Sections API

CodeMessage
2501New Parent Id not provided
2502Section parent with id: {id} not found.
2503Section can not add itself as parent.
2504Section with id: {id} not found.
2505You cannot assign a child section as this section's parent.
2506Parent section belongs to a different site.
2507Section title is required.
2508Parent Section is invalid.
2509Site Id is required.
2510Section is used in [{ids}] entries.
2511Section with external id: {externalId} already exists.
2512You do not have access to view sections
 2513You do not have access to create sections
 2514You do not have access to update sections
 2515You do not have access to delete sections

Labels API

CodeMessage
2401Label already exists
2402Name is required
2403Name is not valid
2404Label with id: {id} not found.
2405Color is required
2406Type is required
2407Status is undefined
2408You do not have access to manage labels
2409You do not have access to view labels

Lists API

CodeMessage
2601PublishedAt or UnpublishedAt should be set in Scheduled status
2602Name is required.
2603At least one entry is required
2604List with id: {id} not found
2607List with external id: {externalId} already exists.
2608List contains duplicate entries {duplicateEntries}.
2609You do not have access to delete lists
2610You do not have access to create lists
2611You do not have access to edit lists
2612You do not have access to view lists

Assets API

CodeMessage
3000File is required
3001File exceeds {limit} MB limit size.
3002File isn't supported.
3003Type is required
3004Type is not valid
3005Title should not contain any of the fllowing characters: \ / : * ? " < >
3006Tag should not be empty
3007Asset not found.
3008One or more asset ids are not valid
3009Suffix value is invalid
3010At least one asset is required
3011Uploading file has failed
3012Storage is not configured
3013Storage is invalid
3014Filename is required
3015ContentType is required
3016Path is required
3017Don’t have access to delete asset
3018Don’t have access to edit asset
3019Don’t have access to create asset
3020Don’t have access to upload asset

Folders API

CodeMessage
3300Folder not found
3301Maximum folder depth for nested folders has exceeded
3302Name is required
3303Name must be between 1 and 100 characters
3304Folder is invalid
3305Parent Id can not be the same as Id
3306Option is required
3307Invalid option provided
3308Deleting folders has failed
3309Don’t have access to delete folder
3310Don’t have access to edit folder
3311Don’t have access to create folder

Webhooks API

CodeMessage
4003Validation failure
4004Elastic Log search has failed
4005Elastic Webhook search has failed
4006Elastic Webhook metrics search has failed
4007Elastic Webhook statistics search has failed
4008Elastic Webhook success percentage search has failed
4009Error with the underlying HTTP request. Check Method and URL
4050Webhook does not exist
4051Name of webhook is required
4052Url is not valid
4053Webhook type is invalid
4054Number of attempts for webhook is required
4055Content type is invalid
4056Please provide a valid status
4057Please provide a valid Http method
4058Valid event types are required
4059Header key is missing
4060Header value is missing
4061Filter is not supported for this webhook type
4062Filter type should be valid
4063Only one Authorization header allowed
4064Filters should have valid Ids
4065Only numbers, letters, and special characters, such as - and _, are permitted in the custom header key
4066You do not have access to create webhooks
4067You do not have access to edit webhooks
4068You do not have access to delete webhooks
4069You do not have access to view webhooks
4070The limit of automatic attempts has exceeded
4071One or more emails are invalid
4073Url is required
4074HTTP method of webhook is required
4075Codex default header is not allowed as Webhook header