import { InvoicaClient } from '@invoica/sdk';const client = new InvoicaClient({ apiKey: 'inv_your_key_here', baseUrl: 'https://api.invoica.ai',});
Key Management
Creating Keys
Generate API keys from your Dashboard. Each key can be scoped to specific permissions:
Full Access — Create, read, update invoices and settlements
Read Only — View invoices and settlements
Webhook Only — Manage webhook configurations
Rotating Keys
When rotating keys:
Create a new key in the Dashboard
Update your application to use the new key
Verify the new key works in production
Revoke the old key
Never expose your API key in client-side code, public repositories, or browser requests. API keys should only be used in server-side applications.
Request Signing (Optional)
For additional security, requests can be signed with HMAC-SHA256:
import crypto from 'crypto';const timestamp = Date.now().toString();const body = JSON.stringify(payload);const signature = crypto .createHmac('sha256', apiSecret) .update(`${timestamp}.${body}`) .digest('hex');// Include in headersheaders['X-Invoica-Timestamp'] = timestamp;headers['X-Invoica-Signature'] = signature;
Error Responses
Status Code
Meaning
401
Invalid or missing API key
403
Key does not have required permissions
429
Rate limit exceeded
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Invoica","colors":{"primary":"#635BFF","light":"#818CF8","dark":"#635BFF"},"logo":{"light":"https://mintcdn.com/invoica/9rfGrcPXDAeOCVc3/logo/logo.png?fit=max\u0026auto=format\u0026n=9rfGrcPXDAeOCVc3\u0026q=85\u0026s=d5bc99e1ebd828d8a1676b558bd3f021","dark":"https://mintcdn.com/invoica/9rfGrcPXDAeOCVc3/logo/logo-dark.png?fit=max\u0026auto=format\u0026n=9rfGrcPXDAeOCVc3\u0026q=85\u0026s=5de59453e02491225dd765cbca374e9f"},"favicon":"https://mintcdn.com/invoica/9rfGrcPXDAeOCVc3/logo/logo.png?fit=max\u0026auto=format\u0026n=9rfGrcPXDAeOCVc3\u0026q=85\u0026s=d5bc99e1ebd828d8a1676b558bd3f021","navbar":{"links":[{"href":"https://app.invoica.ai","label":"Dashboard"}],"primary":{"type":"button","label":"Get API Key","href":"https://app.invoica.ai/api-keys"}},"footer":{"socials":{"twitter":"https://twitter.com/NexusCollectv"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Status","icon":"signal-bars","href":"https://invoica.ai/status"},{"anchor":"Support","icon":"envelope","href":"mailto:support@invoica.ai"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"invoica","hasAudioNarration":false,"actualSubdomain":"invoica","customDomains":["docs.invoica.ai"],"gitSource":{"type":"github","owner":"skingem","repo":"invoica","deployBranch":"main","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae948139198b3764e82e4d7:success","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Documentation","count":15},{"language":"default","tag":"API Reference","count":5},{"language":"default","tag":"AIAX","count":4},{"language":"default","tag":"Core Concepts","count":4},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Guides","count":3},{"language":"default","tag":"SDK","count":3},{"language":"default","tag":"Case Studies","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"authentication","slug":"/authentication","pageMetadata":{"title":"Authentication","description":"Learn how to authenticate with the Invoica API using API keys.","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: \"Learn how to authenticate with the Invoica API using API keys.\"\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={a:`a`,code:`code`,li:`li`,ol:`ol`,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(Heading,{level:`1`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(_components.p,{children:`All Invoica API requests require authentication via an API key passed in the Authorization header.`}),`\n`,_jsx(Heading,{level:`2`,id:`api-key-format`,children:`API Key Format`}),`\n`,_jsx(_components.p,{children:`Invoica API keys follow the format:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`inv_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Keys are prefixed with `,_jsx(_components.code,{children:`inv_`}),` followed by 32 hexadecimal characters.`]}),`\n`,_jsx(Heading,{level:`2`,id:`using-your-api-key`,children:`Using Your API Key`}),`\n`,_jsx(Heading,{level:`3`,id:`http-header`,children:`HTTP Header`}),`\n`,_jsx(_components.p,{children:`Include your API key in every request:`}),`\n`,_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:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer inv_your_key_here\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.invoica.ai/v1/invoices`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`sdk-authentication`,children:`SDK Authentication`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`InvoicaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@invoica/sdk'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` InvoicaClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'inv_your_key_here'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` baseUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.invoica.ai'`}),_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`,_jsx(Heading,{level:`2`,id:`key-management`,children:`Key Management`}),`\n`,_jsx(Heading,{level:`3`,id:`creating-keys`,children:`Creating Keys`}),`\n`,_jsxs(_components.p,{children:[`Generate API keys from your `,_jsx(_components.a,{href:`https://app.invoica.ai/api-keys`,children:`Dashboard`}),`. Each key can be scoped to specific permissions:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Full Access`}),` — Create, read, update invoices and settlements`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Read Only`}),` — View invoices and settlements`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Webhook Only`}),` — Manage webhook configurations`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`rotating-keys`,children:`Rotating Keys`}),`\n`,_jsx(_components.p,{children:`When rotating keys:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Create a new key in the Dashboard`}),`\n`,_jsx(_components.li,{children:`Update your application to use the new key`}),`\n`,_jsx(_components.li,{children:`Verify the new key works in production`}),`\n`,_jsx(_components.li,{children:`Revoke the old key`}),`\n`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Never expose your API key in client-side code, public repositories, or browser requests. API keys should only be used in server-side applications.`})}),`\n`,_jsx(Heading,{level:`2`,id:`request-signing-optional`,children:`Request Signing (Optional)`}),`\n`,_jsx(_components.p,{children:`For additional security, requests can be signed with HMAC-SHA256:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` crypto`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'crypto'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` timestamp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`now`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` body`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` signature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` crypto`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createHmac`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sha256'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiSecret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`timestamp`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`.`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`digest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'hex'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Include in headers`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'X-Invoica-Timestamp'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` timestamp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'X-Invoica-Signature'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status Code`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:`Invalid or missing API key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:`Key does not have required permissions`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:`Rate limit exceeded`})]})]})]})]})}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":"Learn how to authenticate with the Invoica API using API keys.","href":"/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":1,"children":[]},{"title":"API Key Format","slug":"api-key-format","depth":2,"children":[]},{"title":"Using Your API Key","slug":"using-your-api-key","depth":2,"children":[{"title":"HTTP Header","slug":"http-header","depth":3,"children":[]},{"title":"SDK Authentication","slug":"sdk-authentication","depth":3,"children":[]}]},{"title":"Key Management","slug":"key-management","depth":2,"children":[{"title":"Creating Keys","slug":"creating-keys","depth":3,"children":[]},{"title":"Rotating Keys","slug":"rotating-keys","depth":3,"children":[]}]},{"title":"Request Signing (Optional)","slug":"request-signing-optional","depth":2,"children":[]},{"title":"Error Responses","slug":"error-responses","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"invoica","siteName":"Invoica","title":"Authentication - Invoica","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-02-18T23:04:28.541Z","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=\"Learn how to authenticate with the Invoica API using API keys.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Invoica\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/invoica/eyKNG_lCAd4SqqOw/_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/invoica/eyKNG_lCAd4SqqOw/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/invoica/eyKNG_lCAd4SqqOw/_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/invoica/eyKNG_lCAd4SqqOw/_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/invoica/eyKNG_lCAd4SqqOw/_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/invoica/eyKNG_lCAd4SqqOw/_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/invoica/eyKNG_lCAd4SqqOw/_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/invoica/eyKNG_lCAd4SqqOw/_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/invoica/eyKNG_lCAd4SqqOw/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - Invoica\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to authenticate with the Invoica API using API keys.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Invoica\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.invoica.ai/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://invoica.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Authentication\u0026amp;description=Learn+how+to+authenticate+with+the+Invoica+API+using+API+keys.\u0026amp;theme=5e869b0451ec842ac16ed93a\u0026amp;signature=54a13c2001f6d32f380fb003105a4a6982cab6cf1af227c382e4833009a7adb1\">\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 - Invoica\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to authenticate with the Invoica API using API keys.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://invoica.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Authentication\u0026amp;description=Learn+how+to+authenticate+with+the+Invoica+API+using+API+keys.\u0026amp;theme=5e869b0451ec842ac16ed93a\u0026amp;signature=54a13c2001f6d32f380fb003105a4a6982cab6cf1af227c382e4833009a7adb1\">\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/invoica/eyKNG_lCAd4SqqOw/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Invoica\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#635BFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.invoica.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.invoica.ai/#organization\",\"name\":\"Invoica\",\"url\":\"https://docs.invoica.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/invoica/9rfGrcPXDAeOCVc3/logo/logo.png?fit=max\u0026auto=format\u0026n=9rfGrcPXDAeOCVc3\u0026q=85\u0026s=d5bc99e1ebd828d8a1676b558bd3f021\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.invoica.ai#website\",\"name\":\"Invoica\",\"url\":\"https://docs.invoica.ai\",\"publisher\":{\"@id\":\"https://docs.invoica.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.invoica.ai/authentication#webpage\",\"url\":\"https://docs.invoica.ai/authentication\",\"name\":\"Authentication\",\"description\":\"Learn how to authenticate with the Invoica API using API keys.\",\"dateModified\":\"2026-02-18T23:04:28.541Z\",\"isPartOf\":{\"@id\":\"https://docs.invoica.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.invoica.ai/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.invoica.ai/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Getting Started\",\"item\":\"https://docs.invoica.ai/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.invoica.ai/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.invoica.ai/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"Learn how to authenticate with the Invoica API using API keys.\",\"url\":\"https://docs.invoica.ai/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.invoica.ai/authentication#webpage\"},\"dateModified\":\"2026-02-18T23:04:28.541Z\",\"publisher\":{\"@id\":\"https://docs.invoica.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.invoica.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Invoica\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Invoica\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/authentication.md","siteName":"Invoica","nav":{"global":{"anchors":[{"anchor":"Status","icon":"signal-bars","href":"https://invoica.ai/status"},{"anchor":"Support","icon":"envelope","href":"mailto:support@invoica.ai"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","description":"Create your first Invoica invoice in under 5 minutes.","href":"/quickstart"},{"title":"Authentication","href":"/authentication"}]},{"group":"Core Concepts","pages":[{"title":"x402 Protocol","description":"Understanding the x402 payment protocol and how Invoica extends it with financial compliance.","href":"/concepts/x402-protocol"},{"title":"Invoice Middleware","href":"/concepts/invoice-middleware"},{"title":"PACT","href":"/concepts/pact"},{"title":"Supported Chains","href":"/concepts/supported-chains"}]},{"group":"AIAX","pages":[{"title":"AIAX","href":"/concepts/aiax"},{"title":"Agent Discovery with AIAX","href":"/guides/aiax-discovery"},{"title":"AIAX MCP Server","href":"/api-reference/aiax-mcp"},{"title":"AIAX Benchmark","href":"/case-studies/aiax-benchmark"}]},{"group":"Guides","pages":[{"title":"Create Your First Invoice","href":"/guides/create-invoice"},{"title":"Webhooks","href":"/guides/webhooks"},{"title":"Tax Compliance","href":"/guides/tax-compliance"}]},{"group":"Case Studies","pages":[{"title":"Helixa Synagent","href":"/case-studies/helixa"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]},{"tab":"SDK","pages":[{"title":"SDK","href":"/sdk/overview"}]}]},"basePath":"","title":"Authentication - Invoica","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}