Send your API key as a Bearer token in the Authorization header, over HTTPS. GET /v1/me answers 200 when the key works, and says which subaccount it belongs to.The API also accepts the same key in the x-api-key header.
Keys and scope
Keys start with NL-. Copy the whole key, including the part after the underscore.
Each key belongs to one subaccount and can read and change only that subaccount’s data.
A resource in another subaccount returns 404 resource_not_found, the same as one that does not exist.
Organization keys do not work on /v1. They return 403 api_key_forbidden.
Managing webhook endpoints needs a key created by someone whose role can configure agents.
Create and revoke a key
Manage keys in Settings › API of each subaccount. You need a role that can manage API keys.The full key is shown only once, when you create it. If a key leaks, revoke it and create another: a revoked key stops working immediately.
Use the key only on your server, never in a website or a mobile app. Anyone who has it can read your leads, send messages and place calls.
Authentication errors
Status
Code
What to do
401
api_key_missing
Send the key in the Authorization header.
401
api_key_invalid
Check the key. It does not exist, is revoked or its subaccount no longer exists.
402
subscription_inactive
Reactivate the subscription or subaccount. Until then, only reads work.
403
api_key_forbidden
Create a key inside the subaccount, or use one whose role can configure agents.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"NewLead API","description":"Create leads, send messages and templates, place calls and receive events from your NewLead agents.","colors":{"primary":"#156BF4","light":"#7BACF9","dark":"#2036B3"},"logo":{"light":"https://mintcdn.com/new-lead-ai/oUfHFD6pLX3jKc5E/logo/light.svg?fit=max\u0026auto=format\u0026n=oUfHFD6pLX3jKc5E\u0026q=85\u0026s=cae14c2394d62b965d2df543cdeace3a","dark":"https://mintcdn.com/new-lead-ai/oUfHFD6pLX3jKc5E/logo/dark.svg?fit=max\u0026auto=format\u0026n=oUfHFD6pLX3jKc5E\u0026q=85\u0026s=f88cb9ce54c5511a562e4f5aa0ed6768","href":"https://newlead.ai"},"favicon":"https://mintcdn.com/new-lead-ai/oUfHFD6pLX3jKc5E/favicon.svg?fit=max\u0026auto=format\u0026n=oUfHFD6pLX3jKc5E\u0026q=85\u0026s=cdb495864fabc9852bd0068666182995","api":{"playground":{"display":"interactive","proxy":false},"examples":{"defaults":"required","languages":["bash","javascript","python"]}},"footer":{"socials":{"website":"https://newlead.ai"}},"errors":{"404":{"redirect":true,"title":"Page not found","description":"This page does not exist. Start from the [NewLead API overview](/)."}},"contextual":{"options":["copy","view"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"new-lead-ai","hasAudioNarration":false,"actualSubdomain":"new-lead-ai","customDomains":["docs.newlead.ai"],"gitSource":{"type":"github","owner":"newlead-labs","repo":"rest-newlead","deployBranch":"main","contentDirectory":"developers","isPrivate":true,"mountPath":"","label":"","_id":"6afdec75feb073e9d12d9abc"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b008a8b274b8834855b5c64","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"API reference","count":33},{"language":"default","tag":"Guides","count":16},{"language":"default","tag":"Webhooks","count":10},{"language":"default","tag":"Leads","count":7},{"language":"default","tag":"Text agents","count":5},{"language":"default","tag":"Using the API","count":4},{"language":"default","tag":"Calls","count":4},{"language":"default","tag":"Get started","count":3},{"language":"default","tag":"Changes","count":3},{"language":"default","tag":"Integrations","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"authentication","slug":"/authentication","pageMetadata":{"title":"Authentication","description":"Authenticate every request with a subaccount API key.","href":"/authentication"},"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: \"Authenticate every request with a subaccount API key.\"\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`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://rest.newlead.ai/v1/me`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$NEWLEAD_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,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:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"me\"`}),_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:` \"api_key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3f1e9c62-…\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"prefix\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NL-1a2b3c4d5e\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"n8n\"`}),_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:` \"organization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"8d27b5a0-…\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Your agency\"`}),_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:` \"subaccount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"b7d4e2a1-…\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Your client\"`}),_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:` \"rate_limits\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"requests_per_minute\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`120`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"outbound_calls_per_minute\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Send your API key as a Bearer token in the `,_jsx(_components.code,{children:`Authorization`}),` header, over HTTPS. `,_jsx(_components.code,{children:`GET /v1/me`}),` answers `,_jsx(_components.code,{children:`200`}),` when the key works, and says which subaccount it belongs to.`]}),`\n`,_jsxs(_components.p,{children:[`The API also accepts the same key in the `,_jsx(_components.code,{children:`x-api-key`}),` header.`]}),`\n`,_jsx(Heading,{level:`2`,id:`keys-and-scope`,children:`Keys and scope`}),`\n`,_jsxs(_components.p,{children:[`Keys start with `,_jsx(_components.code,{children:`NL-`}),`. Copy the whole key, including the part after the underscore.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Each key belongs to one subaccount and can read and change only that subaccount’s data.`}),`\n`,_jsxs(_components.li,{children:[`A resource in another subaccount returns `,_jsx(_components.code,{children:`404 resource_not_found`}),`, the same as one that does not exist.`]}),`\n`,_jsxs(_components.li,{children:[`Organization keys do not work on `,_jsx(_components.code,{children:`/v1`}),`. They return `,_jsx(_components.code,{children:`403 api_key_forbidden`}),`.`]}),`\n`,_jsx(_components.li,{children:`Managing webhook endpoints needs a key created by someone whose role can configure agents.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-and-revoke-a-key`,children:`Create and revoke a key`}),`\n`,_jsxs(_components.p,{children:[`Manage keys in `,_jsx(_components.strong,{children:`Settings › API`}),` of each subaccount. You need a role that can manage API keys.`]}),`\n`,_jsx(_components.p,{children:`The full key is shown only once, when you create it. If a key leaks, revoke it and create another: a revoked key stops working immediately.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Use the key only on your server, never in a website or a mobile app. Anyone who has it can read your leads, send messages and place calls.`})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication-errors`,children:`Authentication errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`api_key_missing`})}),_jsxs(_components.td,{children:[`Send the key in the `,_jsx(_components.code,{children:`Authorization`}),` header.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`api_key_invalid`})}),_jsx(_components.td,{children:`Check the key. It does not exist, is revoked or its subaccount no longer exists.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`402`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`subscription_inactive`})}),_jsx(_components.td,{children:`Reactivate the subscription or subaccount. Until then, only reads work.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`api_key_forbidden`})}),_jsx(_components.td,{children:`Create a key inside the subaccount, or use one whose role can configure agents.`})]})]})]})]})}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":"Authentication","description":"Authenticate every request with a subaccount API key.","href":"/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Keys and scope","slug":"keys-and-scope","depth":2,"children":[]},{"title":"Create and revoke a key","slug":"create-and-revoke-a-key","depth":2,"children":[]},{"title":"Authentication errors","slug":"authentication-errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"new-lead-ai","siteName":"NewLead API","title":"Authentication - NewLead API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-19T16:35:41.118Z","originalFileLocation":"authentication.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=\"Authenticate every request with a subaccount API key.\">\u003cmeta data-mint-head name=\"application-name\" content=\"NewLead API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/new-lead-ai/6m7g1gWhk69mugOX/_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/new-lead-ai/6m7g1gWhk69mugOX/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/new-lead-ai/6m7g1gWhk69mugOX/_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/new-lead-ai/6m7g1gWhk69mugOX/_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/new-lead-ai/6m7g1gWhk69mugOX/_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/new-lead-ai/6m7g1gWhk69mugOX/_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/new-lead-ai/6m7g1gWhk69mugOX/_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/new-lead-ai/6m7g1gWhk69mugOX/_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/new-lead-ai/6m7g1gWhk69mugOX/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - NewLead API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Authenticate every request with a subaccount API key.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"NewLead API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.newlead.ai/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://new-lead-ai.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Authentication\u0026amp;description=Authenticate+every+request+with+a+subaccount+API+key.\u0026amp;theme=b77720ba947287b24e37a311\u0026amp;signature=2c718c8997a9477cecd0b96436c31c226be8d77d873f0ede1b12027065549b90\">\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=\"Authentication - NewLead API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Authenticate every request with a subaccount API key.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://new-lead-ai.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Authentication\u0026amp;description=Authenticate+every+request+with+a+subaccount+API+key.\u0026amp;theme=b77720ba947287b24e37a311\u0026amp;signature=2c718c8997a9477cecd0b96436c31c226be8d77d873f0ede1b12027065549b90\">\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/new-lead-ai/6m7g1gWhk69mugOX/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"NewLead API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#156BF4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.newlead.ai/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.newlead.ai/#organization\",\"name\":\"NewLead API\",\"url\":\"https://docs.newlead.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/new-lead-ai/oUfHFD6pLX3jKc5E/logo/light.svg?fit=max\u0026auto=format\u0026n=oUfHFD6pLX3jKc5E\u0026q=85\u0026s=cae14c2394d62b965d2df543cdeace3a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.newlead.ai#website\",\"name\":\"NewLead API\",\"url\":\"https://docs.newlead.ai\",\"publisher\":{\"@id\":\"https://docs.newlead.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.newlead.ai/authentication#webpage\",\"url\":\"https://docs.newlead.ai/authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate every request with a subaccount API key.\",\"dateModified\":\"2026-11-19T16:35:41.118Z\",\"isPartOf\":{\"@id\":\"https://docs.newlead.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.newlead.ai/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.newlead.ai/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://docs.newlead.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.newlead.ai/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.newlead.ai/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate every request with a subaccount API key.\",\"url\":\"https://docs.newlead.ai/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.newlead.ai/authentication#webpage\"},\"dateModified\":\"2026-11-19T16:35:41.118Z\",\"publisher\":{\"@id\":\"https://docs.newlead.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.newlead.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"NewLead API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"NewLead API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/authentication.md","siteName":"NewLead API","nav":{"global":null,"tabs":[{"tab":"Guides","groups":[{"group":"Get started","pages":[{"title":"NewLead API","href":""},{"title":"Quickstart","description":"Create a lead and send it your first WhatsApp template.","href":"/quickstart"},{"title":"Authentication","href":"/authentication"}]},{"group":"Using the API","pages":[{"title":"Errors","description":"What each error means and when to retry the request.","href":"/errors"},{"title":"Pagination","href":"/pagination"},{"title":"Idempotency","href":"/idempotency"},{"title":"Rate limits","href":"/rate-limits"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","href":"/webhooks"},{"title":"Webhook events","href":"/webhook-events"},{"title":"Verify webhook signatures","href":"/webhook-signatures"}]},{"group":"Integrations","pages":[{"title":"n8n","href":"/n8n"},{"title":"Sync leads to a CRM","href":"/sync-leads-to-crm"},{"title":"Show your properties on your website","href":"/website-properties"}]},{"group":"Changes","pages":[{"title":"Versioning","href":"/versioning"},{"title":"Changelog","href":"/changelog"},{"title":"Migrate from the legacy routes","href":"/migrate-legacy-routes"}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/specification/get-the-api-specification"}]}]},"basePath":"","title":"Authentication - NewLead API","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":[],"chunks":[]}