HTTP status codes and error handling in the Cometly API
Overview
The Cometly API uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success, and codes in the 4xx range indicate an error with the request.
HTTP Status Code Summary
Status Code
Description
200
OK - The request was successful
201
Created - The resource was successfully created
202
Accepted - The request has been queued for processing successfully
401
Unauthenticated - Authentication failed or wasn’t provided
403
Forbidden - The request is understood but refused
404
Not Found - The requested resource does not exist
422
Unprocessable Entity - Request validation failed or missing required parameters
Error Response Structure
All error responses follow a consistent structure:
{ "message": "Human-readable error message"}
Field
Type
Description
message
string
Human-readable error description
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cometly API Docs","colors":{"primary":"#0086FF","light":"#0086FF","dark":"#0086FF"},"logo":{"light":"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/logo/light.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=1b725e99cd933554c9ab680583d1b779","dark":"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/logo/dark.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=5b27a31c96508945608d23fa3394eafc"},"favicon":"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/favicon.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=676feb9017410d273527df10995ef763","api":{"playground":{},"mdx":{"auth":{"method":"bearer"},"server":"https://app.cometly.com"}},"navbar":{"links":[{"href":"mailto:support@cometly.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.cometly.com"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cometly","hasAudioNarration":false,"actualSubdomain":"cometly","customDomains":["docs.cometly.com"],"gitSource":{"type":"github","owner":"cometly","repo":"app","deployBranch":"main","contentDirectory":"publicApiDocs/V1","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeccca749ba6b608729de3c","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"MCP","count":58},{"language":"default","tag":"Tools","count":49},{"language":"default","tag":"API Reference","count":27},{"language":"default","tag":"Contacts","count":14},{"language":"default","tag":"Data Warehouse","count":13},{"language":"default","tag":"Events","count":12},{"language":"default","tag":"Get Started","count":9},{"language":"default","tag":"Companies","count":8},{"language":"default","tag":"Reports","count":8},{"language":"default","tag":"Concepts","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@cometly.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"introduction/status-codes","slug":"/introduction/status-codes","pageMetadata":{"title":"Status Codes","description":"HTTP status codes and error handling in the Cometly API","href":"/introduction/status-codes"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"HTTP status codes and error handling in the Cometly API\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`The Cometly API uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the `,_jsx(_components.code,{children:`2xx`}),` range indicate success, and codes in the `,_jsx(_components.code,{children:`4xx`}),` range indicate an error with the request.`]}),`\n`,_jsx(Heading,{level:`2`,id:`http-status-code-summary`,children:`HTTP Status Code Summary`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`200`}),_jsx(_components.td,{children:`OK - The request was successful`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`201`}),_jsx(_components.td,{children:`Created - The resource was successfully created`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`202`}),_jsx(_components.td,{children:`Accepted - The request has been queued for processing successfully`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:`Unauthenticated - Authentication failed or wasn’t provided`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:`Forbidden - The request is understood but refused`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:`Not Found - The requested resource does not exist`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:`Unprocessable Entity - Request validation failed or missing required parameters`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`error-response-structure`,children:`Error Response Structure`}),`\n`,_jsx(_components.p,{children:`All error responses follow a consistent structure:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Human-readable error message\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Human-readable error description`})]})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Status Codes","description":"HTTP status codes and error handling in the Cometly API","href":"/introduction/status-codes"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"HTTP Status Code Summary","slug":"http-status-code-summary","depth":2,"children":[]},{"title":"Error Response Structure","slug":"error-response-structure","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"cometly","siteName":"Cometly API Docs","title":"Status Codes - Cometly API Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T22:06:54.472Z","originalFileLocation":"introduction/status-codes.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"HTTP status codes and error handling in the Cometly API\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cometly API Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Status Codes - Cometly API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"HTTP status codes and error handling in the Cometly API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cometly API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cometly.com/introduction/status-codes\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cometly.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Status+Codes\u0026amp;description=HTTP+status+codes+and+error+handling+in+the+Cometly+API\u0026amp;theme=4b81b0d192612debf11d7771\u0026amp;signature=d2dcbe7c909ac8f5556d7b4be2a0ff8d83c6662619e612551313ab3c53feadd3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Status Codes - Cometly API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"HTTP status codes and error handling in the Cometly API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cometly.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Status+Codes\u0026amp;description=HTTP+status+codes+and+error+handling+in+the+Cometly+API\u0026amp;theme=4b81b0d192612debf11d7771\u0026amp;signature=d2dcbe7c909ac8f5556d7b4be2a0ff8d83c6662619e612551313ab3c53feadd3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cometly/gMocZlOJ0QUZ28NI/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cometly API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0086FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cometly.com/introduction/status-codes\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/introduction/status-codes.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cometly.com/#organization\",\"name\":\"Cometly API Docs\",\"url\":\"https://docs.cometly.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cometly/hnuCBvleNSBDJAON/logo/light.svg?fit=max\u0026auto=format\u0026n=hnuCBvleNSBDJAON\u0026q=85\u0026s=1b725e99cd933554c9ab680583d1b779\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cometly.com#website\",\"name\":\"Cometly API Docs\",\"url\":\"https://docs.cometly.com\",\"publisher\":{\"@id\":\"https://docs.cometly.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cometly.com/introduction/status-codes#webpage\",\"url\":\"https://docs.cometly.com/introduction/status-codes\",\"name\":\"Status Codes\",\"description\":\"HTTP status codes and error handling in the Cometly API\",\"dateModified\":\"2026-01-06T22:06:54.472Z\",\"isPartOf\":{\"@id\":\"https://docs.cometly.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cometly.com/introduction/status-codes#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cometly.com/introduction/status-codes#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Getting Started\",\"item\":\"https://docs.cometly.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Status Codes\",\"item\":\"https://docs.cometly.com/introduction/status-codes\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cometly.com/introduction/status-codes#article\",\"headline\":\"Status Codes\",\"name\":\"Status Codes\",\"description\":\"HTTP status codes and error handling in the Cometly API\",\"url\":\"https://docs.cometly.com/introduction/status-codes\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cometly.com/introduction/status-codes#webpage\"},\"dateModified\":\"2026-01-06T22:06:54.472Z\",\"publisher\":{\"@id\":\"https://docs.cometly.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cometly.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cometly API Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cometly API Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/introduction/status-codes.md","siteName":"Cometly API Docs","nav":{"global":null,"tabs":[{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"Cometly API Documentation","href":""},{"title":"Authentication","href":"/introduction/authentication"},{"title":"Rate Limiting","description":"Understand API rate limits and how to handle them in your application","href":"/introduction/rate-limiting"},{"title":"Status Codes","href":"/introduction/status-codes"},{"title":"Changelog","description":"Track changes, new features, and improvements to the Cometly API.","href":"/changelog"}]},{"group":"Events","pages":[{"title":"Create Event","api":"POST https://app.cometly.com/public-api/v1/events/track","href":"/api-reference/endpoint/create-event"},{"title":"List Events","api":"GET https://app.cometly.com/public-api/v1/events","href":"/api-reference/endpoint/list-events"},{"title":"Get Event","api":"GET https://app.cometly.com/public-api/v1/events/{event_id}","href":"/api-reference/endpoint/get-event"},{"title":"Update Event","api":"PUT https://app.cometly.com/public-api/v1/events/{event_id}","href":"/api-reference/endpoint/update-event"},{"title":"Delete Event","api":"DELETE https://app.cometly.com/public-api/v1/events/{event_id}","href":"/api-reference/endpoint/delete-event"},{"title":"Create Event Export","api":"POST https://app.cometly.com/public-api/v1/events/exports","href":"/api-reference/endpoint/create-event-export"},{"title":"Get Event Export","api":"GET https://app.cometly.com/public-api/v1/events/exports/{id}","href":"/api-reference/endpoint/get-event-export"}]},{"group":"Contacts","pages":[{"title":"Create Contact","api":"POST https://app.cometly.com/public-api/v1/contacts","href":"/api-reference/endpoint/create-contact"},{"title":"List Contacts","api":"GET https://app.cometly.com/public-api/v1/contacts","href":"/api-reference/endpoint/list-contacts"},{"title":"Get Contact","api":"GET https://app.cometly.com/public-api/v1/contacts/{id}","href":"/api-reference/endpoint/get-contact"},{"title":"Get Contact by Email","api":"GET https://app.cometly.com/public-api/v1/contacts/by-email/{email}","href":"/api-reference/endpoint/get-contact-by-email"},{"title":"Update Contact","api":"PUT https://app.cometly.com/public-api/v1/contacts/{id}","href":"/api-reference/endpoint/update-contact"},{"title":"Attach Contact Company","api":"PUT https://app.cometly.com/public-api/v1/contacts/{id}/company","href":"/api-reference/endpoint/attach-contact-company"},{"title":"Detach Contact Company","api":"DELETE https://app.cometly.com/public-api/v1/contacts/{id}/company","href":"/api-reference/endpoint/detach-contact-company"},{"title":"Delete Contact PII","api":"DELETE https://app.cometly.com/public-api/v1/contacts/{id}/pii","href":"/api-reference/endpoint/delete-contact-pii"},{"title":"Create Contact Export","api":"POST https://app.cometly.com/public-api/v1/contacts/exports","href":"/api-reference/endpoint/create-contact-export"},{"title":"Get Contact Export","api":"GET https://app.cometly.com/public-api/v1/contacts/exports/{id}","href":"/api-reference/endpoint/get-contact-export"}]},{"group":"Companies","pages":[{"title":"List Companies","api":"GET https://app.cometly.com/public-api/v1/companies","href":"/api-reference/endpoint/list-companies"},{"title":"Get Company","api":"GET https://app.cometly.com/public-api/v1/companies/{id}","href":"/api-reference/endpoint/get-company"},{"title":"Update Company","api":"PUT https://app.cometly.com/public-api/v1/companies/{id}","href":"/api-reference/endpoint/update-company"},{"title":"Create Company Export","api":"POST https://app.cometly.com/public-api/v1/companies/exports","href":"/api-reference/endpoint/create-company-export"},{"title":"Get Company Export","api":"GET https://app.cometly.com/public-api/v1/companies/exports/{id}","href":"/api-reference/endpoint/get-company-export"}]}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"Concepts","pages":[{"title":"Concepts","href":"/concepts/sending-data-to-cometly"}]},{"tab":"Data Warehouse","pages":[{"title":"Data Warehouse","href":"/data-warehouse/overview"}]}]},"basePath":"","title":"Status Codes - Cometly API Docs","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}