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.
Code | Type | Description |
---|---|---|
200 | OK | Everything works as expected. |
204 | No Content | Everything works as expected, but there is nothing to return. Usually used in delete requests. |
400 | Bad Request | The request was unacceptable, often due to missing a required parameter or validation error. |
401 | Unauthorized | No valid token or API key was provided for making API requests. |
403 | Forbidden | The token or API key doesn't have the necessary permissions to perform the request. |
404 | Not Found | The requested resource was not found. |
409 | Conflict | The request conflicts with another request, usually happens in entry or models update requests. |
500 | Internal Server Error | Something went wrong internally while processing the request. |
502 | Bad Gateway | Something went wrong with Codex servers. |
503 | Service Unavailable | Something went wrong with Codex servers. |
504 | Gateway Timeout | Something 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
Code | Message |
---|---|
2001 | Invalid model. |
2002 | Field type is invalid |
2003 | Fields must have unique aliases |
2004 | Model not found with id or alias: {idOrAlias} |
2005 | Only letters and numbers should be used in field alias |
2006 | Field attributes are null or empty |
2007 | Missing alias for {fieldType} field type. |
2008 | Missing name for {fieldType} field type. |
2009 | ValueType of {alias} field is not valid. |
2010 | {rangeOperator} is not valid |
2011 | Range operator is not defined. |
2012 | Model version with id: {id} not found. |
2013 | Model with alias: {alias} already exists. |
2014 | ModelId is required. |
2015 | Alias is required. |
2016 | Alias should start with a letter and contain only letters and numbers. |
2017 | Alias is reserved. |
2018 | Name is required. |
2019 | Name should contain only letters and numbers. |
2020 | Icon is required. |
2021 | Id is invalid. |
2022 | No fields found in the model. |
2023 | Title field is not provided. |
2024 | Slug field is not provided. |
2025 | Field alias {alias} is not allowed. |
2026 | Field '{alias}' cannot be active and deleted in the same time. |
2028 | Min cannot be null when operator is AtLeast |
2029 | Max cannot be null when operator is AtMost |
2030 | Min cannot be null when operator is Between |
2031 | Max cannot be null when operator is Between |
2032 | Min cannot be greater than Max when operator is Between |
2033 | Exactly cannot be null when operator is Exactly |
2035 | Model with external id: {externalId} already exists |
2036 | {fieldType} is undefined. |
2037 | Missing RevisionId. |
2038 | Wrong Model RevisionId. You need to pull latest version of object in order to update it. |
2042 | You do not have access to delete models |
2043 | You do not have access to create models |
2044 | You do not have access to view models |
2045 | You do not have access to publish models |
2046 | You do not have access to update models |
2047 | You do not have access to manage models |
Entries API
Code | Message |
---|---|
2101 | One or more entry field values are invalid. |
2102 | Entry VersionId: {versionId} is invalid. |
2103 | Site: {siteId} is forbidden to create or update this entry |
2104 | Entry with id: {id} not found. |
2105 | Missing RevisionId. |
2106 | Cannot change status from {oldStatus} to {newStatus}. |
2107 | Entry version with id: {id} not found. |
2108 | One or more labels are not valid |
2109 | Published DateTime should be set |
2110 | Status is undefined |
2111 | Unpublished DateTime should be set after publication date |
2112 | Unpublished DateTime should be set after actual date |
2113 | Entry title is required |
2114 | Content contains a field ({field}) that is not configured! |
2115 | Entry slug is required |
2116 | Slug is not a valid slug |
2117 | Slug must be unique |
2118 | One of the entry specified metrics is invalid |
2119 | Field {fieldName} is not unique in collection |
2120 | Referred entry with id: {entryId} does not exists |
2121 | Referred model with alias: {model} does not exists |
2123 | {field} is required |
2124 | Field {field} is not a valid list |
2125 | Field {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 |
2132 | Entry with external id: {externalId} already exists. |
2133 | {field} ValueType is undefined |
2134 | Min cannot be null when operator is AtLeast |
2135 | Max cannot be null when operator is AtMost |
2136 | Min cannot be null when operator is Between |
2137 | Max cannot be null when operator is Between |
2138 | Min cannot be greater than Max when operator is Between |
2139 | Exactly cannot be null when operator is Exactly |
2140 | Section id: {sectionId} is is not valid. |
2141 | Author id: {authorId} is is not valid. |
2142 | Model {model} is not valid. |
2143 | Model {model} is not accepted. |
2144 | Entry id: {entryId} is not valid. |
2145 | Tag: {tag} is in not valid. |
2147 | Wrong Entry RevisionId. You need to pull latest version of object in order to update it. |
2155 | You do not have access to view entries |
2156 | You do not have access to create entries |
2157 | You do not have access to update entries content |
2158 | You do not have access to update entries labels |
2159 | You do not have access to delete entries |
2160 | You do not have access to publish entry |
2161 | You do not have access to schedule entries |
2162 | You do not have access to unpublish entry |
Authors API
Code | Message |
---|---|
2301 | Author Id is required. |
2302 | Byline is required. |
2303 | Undefined status. |
2304 | Author with id: {authorId} not found. |
2304 | Author with id: {authorId} not found. |
2305 | Invalid status. |
2306 | Biography is required. |
2307 | Image is required. |
2308 | Please provide a valid Email Address! |
2309 | Please provide a valid Facebook url! |
2310 | Please provide a valid Website url! |
2311 | Please provide a valid Instagram url! |
2312 | Please provide a valid Twitter url! |
2313 | Please provide a valid LinkedIn url! |
2314 | Please provide a valid Telegram url! |
2315 | Author with external id: {externalId} already exists. |
2315 | Author with external id: {externalId} already exists. |
2317 | You do not have access to manage authors |
2318 | You do not have access to view authors |
Sections API
Code | Message |
---|---|
2501 | New Parent Id not provided |
2502 | Section parent with id: {id} not found. |
2503 | Section can not add itself as parent. |
2504 | Section with id: {id} not found. |
2505 | You cannot assign a child section as this section's parent. |
2506 | Parent section belongs to a different site. |
2507 | Section title is required. |
2508 | Parent Section is invalid. |
2509 | Site Id is required. |
2510 | Section is used in [{ids}] entries. |
2511 | Section with external id: {externalId} already exists. |
2512 | You do not have access to view sections |
2513 | You do not have access to create sections |
2514 | You do not have access to update sections |
2515 | You do not have access to delete sections |
Labels API
Code | Message |
---|---|
2401 | Label already exists |
2402 | Name is required |
2403 | Name is not valid |
2404 | Label with id: {id} not found. |
2405 | Color is required |
2406 | Type is required |
2407 | Status is undefined |
2408 | You do not have access to manage labels |
2409 | You do not have access to view labels |
Lists API
Code | Message |
---|---|
2601 | PublishedAt or UnpublishedAt should be set in Scheduled status |
2602 | Name is required. |
2603 | At least one entry is required |
2604 | List with id: {id} not found |
2607 | List with external id: {externalId} already exists. |
2608 | List contains duplicate entries {duplicateEntries}. |
2609 | You do not have access to delete lists |
2610 | You do not have access to create lists |
2611 | You do not have access to edit lists |
2612 | You do not have access to view lists |
Assets API
Code | Message |
---|---|
3000 | File is required |
3001 | File exceeds {limit} MB limit size. |
3002 | File isn't supported. |
3003 | Type is required |
3004 | Type is not valid |
3005 | Title should not contain any of the fllowing characters: \ / : * ? " < > |
3006 | Tag should not be empty |
3007 | Asset not found. |
3008 | One or more asset ids are not valid |
3009 | Suffix value is invalid |
3010 | At least one asset is required |
3011 | Uploading file has failed |
3012 | Storage is not configured |
3013 | Storage is invalid |
3014 | Filename is required |
3015 | ContentType is required |
3016 | Path is required |
3017 | Don’t have access to delete asset |
3018 | Don’t have access to edit asset |
3019 | Don’t have access to create asset |
3020 | Don’t have access to upload asset |
Folders API
Code | Message |
---|---|
3300 | Folder not found |
3301 | Maximum folder depth for nested folders has exceeded |
3302 | Name is required |
3303 | Name must be between 1 and 100 characters |
3304 | Folder is invalid |
3305 | Parent Id can not be the same as Id |
3306 | Option is required |
3307 | Invalid option provided |
3308 | Deleting folders has failed |
3309 | Don’t have access to delete folder |
3310 | Don’t have access to edit folder |
3311 | Don’t have access to create folder |
Webhooks API
Code | Message |
---|---|
4003 | Validation failure |
4004 | Elastic Log search has failed |
4005 | Elastic Webhook search has failed |
4006 | Elastic Webhook metrics search has failed |
4007 | Elastic Webhook statistics search has failed |
4008 | Elastic Webhook success percentage search has failed |
4009 | Error with the underlying HTTP request. Check Method and URL |
4050 | Webhook does not exist |
4051 | Name of webhook is required |
4052 | Url is not valid |
4053 | Webhook type is invalid |
4054 | Number of attempts for webhook is required |
4055 | Content type is invalid |
4056 | Please provide a valid status |
4057 | Please provide a valid Http method |
4058 | Valid event types are required |
4059 | Header key is missing |
4060 | Header value is missing |
4061 | Filter is not supported for this webhook type |
4062 | Filter type should be valid |
4063 | Only one Authorization header allowed |
4064 | Filters should have valid Ids |
4065 | Only numbers, letters, and special characters, such as - and _, are permitted in the custom header key |
4066 | You do not have access to create webhooks |
4067 | You do not have access to edit webhooks |
4068 | You do not have access to delete webhooks |
4069 | You do not have access to view webhooks |
4070 | The limit of automatic attempts has exceeded |
4071 | One or more emails are invalid |
4073 | Url is required |
4074 | HTTP method of webhook is required |
4075 | Codex default header is not allowed as Webhook header |