Create API keys with the right scopes, recognise their format, rotate them without downtime and revoke them.
API keys authenticate your backend systems. Each key belongs to one partner and one environment and carries a fixed set of permissions, its scopes.
Use the API playground on these docs only with sandbox vk_test_ keys. Playground requests are sent from Mintlify’s servers, so they fail when your sandbox IP allowlist is enforced.
Keys are created only by signed-in users in the developer dashboard (or with POST /partner/v1/api-keys and a dashboard session). An API key can never create, roll or revoke keys.You need:
the permission manage-api-keys (the owners, administrators and developers groups have it) and a sign-in within the last 15 minutes;
A key has a name (1-80 characters), its scopes and an optional expiresAt of at most 2 years ahead. The dashboard suggests one year.The secret is shown once, in the response to the create call. Copy it into your secret manager straight away. Afterwards the API and the dashboard show only the key’s metadata: name, keyHint, last4, scopes, status, expiresAt, lastUsedAt and lastUsedIp. If you lose the secret, create a new key.If the create response is lost (for example a timeout) and you retry with the same Idempotency-Key, the replayed response has "secret": null and the header Idempotent-Replay-Redacted: true. The key was created, but its secret cannot be shown again: revoke that key and create a new one.Owners of your partner and your technical contact receive an email whenever a key is created or rolled, and before a key expires.
Scopes are the permissions the key may use. They are fixed when you create the key; to change them, create a new key.
Choose only delegable permissions. The permissions marked “no” in the permission reference (for example manage-api-keys, manage-consumer-billing and accept-consumer-pricing) can never be scopes: a create request with one is refused with 422scope-not-delegable.
You can only grant permissions you hold yourself; otherwise the request is refused with 403missing-permission.
A request made with the key uses only the key’s scopes, never the permissions of the user who created it.
Typical consumer integrations use view-consumer-catalog, create-consumer-redemptions, view-consumer-redemptions, manage-consumer-redemption-entities and erase-consumer-redemption-entities; an ERP integration for invoices uses view-consumer-billing. See Choosing scopes.
Rotate keys regularly (at least every 12 months) and whenever someone who had access to a secret leaves.Roll (recommended).POST /partner/v1/api-keys/{apiKeyId}:roll with a gracePeriodMinutes between 1 and 10,080 (default 1,440, that is 24 hours) creates a new key named <old name> (rolled) with the same scopes and returns its secret once (201). Both keys work during the grace period; afterwards the old key gets 401api-key-invalid.
{ "gracePeriodMinutes": 1440}
Roll the key in the dashboard and store the new secret.
Deploy the new secret to your systems within the grace period.
Check lastUsedAt of the new key (and that the old key’s lastUsedAt stops moving).
A rolled key keeps the idempotency scope of the key it replaces: a retry that you started with the old key and repeat with the new key and the same Idempotency-Key replays the stored response instead of redeeming twice (Idempotency).Manual rotation (no grace period). Create a new key, deploy it, verify its lastUsedAt, then revoke the old key. A newly created key does not share the old key’s idempotency scope, so do not switch keys in the middle of a retry: finish or reconcile open requests first.
Revoke a key in the dashboard or with POST /partner/v1/api-keys/{apiKeyId}:revoke (optional reason, up to 500 characters, kept in your audit log). Revocation takes effect on every server within 60 seconds; the key then gets 401api-key-invalid. A revoked key cannot be reactivated.Revoke a key immediately when you suspect it leaked, and tell AllRide. AllRide can also revoke a key in an emergency and informs your partner owners when it does.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AllRide Vouchers — Consumer API","colors":{"primary":"#0A0A0A","light":"#FAFAFA","dark":"#0A0A0A"},"logo":{"light":"https://mintcdn.com/allride-voucher-consumer/9vqpJaAUcuaHTUy2/logo/light.svg?fit=max\u0026auto=format\u0026n=9vqpJaAUcuaHTUy2\u0026q=85\u0026s=92f0ea94edcefc1febba871b5ead8cdd","dark":"https://mintcdn.com/allride-voucher-consumer/9vqpJaAUcuaHTUy2/logo/dark.svg?fit=max\u0026auto=format\u0026n=9vqpJaAUcuaHTUy2\u0026q=85\u0026s=c5e31c42ccee8249e8a321e4a1064b5d","href":"https://docs-consumer.voucher.allride.io"},"favicon":"https://mintcdn.com/allride-voucher-consumer/9vqpJaAUcuaHTUy2/favicon.svg?fit=max\u0026auto=format\u0026n=9vqpJaAUcuaHTUy2\u0026q=85\u0026s=7a8b0fcba322123aacae3e4c870276d3","api":{"playground":{"display":"interactive","proxy":true},"examples":{"defaults":"required","languages":["curl","javascript","python","java","go","php"]}},"navbar":{"links":[{"href":"https://consumer-developers.voucher-staging.allride.io/go/overview","label":"Sandbox dashboard"},{"href":"https://allride.io","label":"Support"}],"primary":{"type":"button","label":"Developer dashboard","href":"https://consumer-developers.voucher.allride.io/go/api-keys"}},"footer":{"links":[{"header":"AllRide","items":[{"label":"Imprint","href":"https://www.allride.io/impressum"},{"label":"Privacy","href":"https://www.allride.io/datenschutz"}]}]},"seo":{"indexing":"navigable"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"allride-voucher-consumer","hasAudioNarration":false,"actualSubdomain":"allride-voucher-consumer","customDomains":[],"gitSource":{"type":"github","owner":"allride-mobility","repo":"allridevoucherpartnerconsumerapidocs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6adf634194b1979157fe3cae"},"chroma":{"latestBuiltDeploymentHistoryId":"6ae9bdb007405bf5d5959ed9","collectionId":"b9f9a568-3bc7-4868-ba2c-e500f0d532c1","liveDeploymentHistoryId":"6ae9bdb007405bf5d5959ed9","schemaVersion":"v3"},"entitlements":{},"buildId":"6ae9c317bf4ef845262b05b7","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"API reference","count":141},{"language":"default","tag":"Consumer API","count":72},{"language":"default","tag":"Workspace API","count":69},{"language":"default","tag":"Guides","count":34},{"language":"default","tag":"Webhook events","count":24},{"language":"default","tag":"Billing","count":20},{"language":"default","tag":"Catalog","count":15},{"language":"default","tag":"Email (SMTP and templates)","count":15},{"language":"default","tag":"Webhook endpoints","count":12},{"language":"default","tag":"Consumer guides","count":10}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"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":"llms-txt-v2","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"html:not(.dark) .method-nav-pill .text-green-700{color:#14532d}html:not(.dark) .method-nav-pill .text-blue-700{color:#1e3a8a}html:not(.dark) .method-nav-pill .text-red-700{color:#7f1d1d}html:not(.dark) .method-nav-pill .text-orange-700{color:#7c2d12}html:not(.dark) .method-nav-pill .text-yellow-700{color:#713f12}html:not(.dark) .method-nav-pill .text-purple-700{color:#581c87}html:not(.dark) [data-component-part=field-required-pill]{color:#991b1b}"}],"page":{"pagePath":"guides/api-keys","slug":"/guides/api-keys","pageMetadata":{"title":"API keys","description":"Create API keys with the right scopes, recognise their format, rotate them without downtime and revoke them.","href":"/guides/api-keys"},"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: \"Create API keys with the right scopes, recognise their format, rotate them without downtime and revoke them.\"\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`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`API keys authenticate your backend systems. Each key belongs to one partner and one environment and carries a fixed set of permissions, its `,_jsx(_components.strong,{children:`scopes`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Use the API playground on these docs only with sandbox `,_jsx(_components.code,{children:`vk_test_`}),` keys. Playground requests are sent from Mintlify’s servers, so they fail when your sandbox IP allowlist is enforced.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-key`,children:`Create a key`}),`\n`,_jsxs(_components.p,{children:[`Keys are created only by signed-in users in the `,_jsx(_components.a,{href:`https://consumer-developers.voucher.allride.io/go/api-keys`,children:`developer dashboard`}),` (or with `,_jsx(_components.a,{href:`/api-reference/partner-api-keys-create`,children:_jsx(_components.code,{children:`POST /partner/v1/api-keys`})}),` and a dashboard session). An API key can never create, roll or revoke keys.`]}),`\n`,_jsx(_components.p,{children:`You need:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`the permission `,_jsx(_components.code,{children:`manage-api-keys`}),` (the owners, administrators and developers groups have it) and a sign-in within the last 15 minutes;`]}),`\n`,_jsxs(_components.li,{children:[`API access in status `,_jsx(_components.code,{children:`active`}),` (`,_jsx(_components.a,{href:`/guides/authentication#api-access-activation`,children:`Authentication`}),`);`]}),`\n`,_jsxs(_components.li,{children:[`fewer than 20 active keys in your partner (else `,_jsx(_components.a,{href:`/errors/catalog#api-key-limit-reached`,children:_jsx(_components.code,{children:`api-key-limit-reached`})}),`).`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A key has a `,_jsx(_components.code,{children:`name`}),` (1-80 characters), its `,_jsx(_components.code,{children:`scopes`}),` and an optional `,_jsx(_components.code,{children:`expiresAt`}),` of at most 2 years ahead. The dashboard suggests one year.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The secret is shown once`}),`, in the response to the create call. Copy it into your secret manager straight away. Afterwards the API and the dashboard show only the key’s metadata: `,_jsx(_components.code,{children:`name`}),`, `,_jsx(_components.code,{children:`keyHint`}),`, `,_jsx(_components.code,{children:`last4`}),`, `,_jsx(_components.code,{children:`scopes`}),`, `,_jsx(_components.code,{children:`status`}),`, `,_jsx(_components.code,{children:`expiresAt`}),`, `,_jsx(_components.code,{children:`lastUsedAt`}),` and `,_jsx(_components.code,{children:`lastUsedIp`}),`. If you lose the secret, create a new key.`]}),`\n`,_jsxs(_components.p,{children:[`If the create response is lost (for example a timeout) and you retry with the same `,_jsx(_components.code,{children:`Idempotency-Key`}),`, the replayed response has `,_jsx(_components.code,{children:`\"secret\": null`}),` and the header `,_jsx(_components.code,{children:`Idempotent-Replay-Redacted: true`}),`. The key was created, but its secret cannot be shown again: revoke that key and create a new one.`]}),`\n`,_jsx(_components.p,{children:`Owners of your partner and your technical contact receive an email whenever a key is created or rolled, and before a key expires.`}),`\n`,_jsx(Heading,{level:`2`,id:`key-format`,children:`Key format`}),`\n`,_jsx(CodeBlock,{filename:``,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:`vk_\u003cenvironment>_\u003ckey id>_\u003csecret>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`environment`}),` is `,_jsx(_components.code,{children:`live`}),` (production) or `,_jsx(_components.code,{children:`test`}),` (sandbox).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`key id`}),` is 26 lower-case Crockford base32 characters that identify the key.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`secret`}),` is 43 base62 characters.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The complete pattern is:`}),`\n`,_jsx(CodeBlock,{filename:``,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:`^vk_(live|test)_[0-9a-hjkmnp-tv-z]{26}_[0-9A-Za-z]{43}$`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Add it to your secret scanners (for example as a custom pattern in your repository’s secret scanning) so that a committed key is caught.`}),`\n`,_jsx(Heading,{level:`2`,id:`scopes`,children:`Scopes`}),`\n`,_jsx(_components.p,{children:`Scopes are the permissions the key may use. They are fixed when you create the key; to change them, create a new key.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Choose only `,_jsx(_components.strong,{children:`delegable`}),` permissions. The permissions marked “no” in the `,_jsx(_components.a,{href:`/guides/permissions#permission-reference`,children:`permission reference`}),` (for example `,_jsx(_components.code,{children:`manage-api-keys`}),`, `,_jsx(_components.code,{children:`manage-consumer-billing`}),` and `,_jsx(_components.code,{children:`accept-consumer-pricing`}),`) can never be scopes: a create request with one is refused with `,_jsx(_components.code,{children:`422`}),` `,_jsx(_components.a,{href:`/errors/catalog#scope-not-delegable`,children:_jsx(_components.code,{children:`scope-not-delegable`})}),`.`]}),`\n`,_jsxs(_components.li,{children:[`You can only grant permissions you hold yourself; otherwise the request is refused with `,_jsx(_components.code,{children:`403`}),` `,_jsx(_components.a,{href:`/errors/catalog#missing-permission`,children:_jsx(_components.code,{children:`missing-permission`})}),`.`]}),`\n`,_jsx(_components.li,{children:`A request made with the key uses only the key’s scopes, never the permissions of the user who created it.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Typical consumer integrations use `,_jsx(_components.code,{children:`view-consumer-catalog`}),`, `,_jsx(_components.code,{children:`create-consumer-redemptions`}),`, `,_jsx(_components.code,{children:`view-consumer-redemptions`}),`, `,_jsx(_components.code,{children:`manage-consumer-redemption-entities`}),` and `,_jsx(_components.code,{children:`erase-consumer-redemption-entities`}),`; an ERP integration for invoices uses `,_jsx(_components.code,{children:`view-consumer-billing`}),`. See `,_jsx(_components.a,{href:`/guides/permissions#choosing-scopes`,children:`Choosing scopes`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`rotate-a-key`,children:`Rotate a key`}),`\n`,_jsx(_components.p,{children:`Rotate keys regularly (at least every 12 months) and whenever someone who had access to a secret leaves.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Roll (recommended).`}),` `,_jsx(_components.a,{href:`/api-reference/partner-api-keys-roll`,children:_jsx(_components.code,{children:`POST /partner/v1/api-keys/{apiKeyId}:roll`})}),` with a `,_jsx(_components.code,{children:`gracePeriodMinutes`}),` between 1 and 10,080 (default 1,440, that is 24 hours) creates a `,_jsx(_components.strong,{children:`new`}),` key named `,_jsx(_components.code,{children:`\u003cold name> (rolled)`}),` with the same scopes and returns its secret once (`,_jsx(_components.code,{children:`201`}),`). Both keys work during the grace period; afterwards the old key gets `,_jsx(_components.code,{children:`401`}),` `,_jsx(_components.a,{href:`/errors/catalog#api-key-invalid`,children:_jsx(_components.code,{children:`api-key-invalid`})}),`.`]}),`\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:` \"gracePeriodMinutes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1440`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Roll the key in the dashboard and store the new secret.`}),`\n`,_jsx(_components.li,{children:`Deploy the new secret to your systems within the grace period.`}),`\n`,_jsxs(_components.li,{children:[`Check `,_jsx(_components.code,{children:`lastUsedAt`}),` of the new key (and that the old key’s `,_jsx(_components.code,{children:`lastUsedAt`}),` stops moving).`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A rolled key keeps the idempotency scope of the key it replaces: a retry that you started with the old key and repeat with the new key and the same `,_jsx(_components.code,{children:`Idempotency-Key`}),` replays the stored response instead of redeeming twice (`,_jsx(_components.a,{href:`/guides/idempotency`,children:`Idempotency`}),`).`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Manual rotation (no grace period).`}),` Create a new key, deploy it, verify its `,_jsx(_components.code,{children:`lastUsedAt`}),`, then revoke the old key. A newly created key does `,_jsx(_components.strong,{children:`not`}),` share the old key’s idempotency scope, so do not switch keys in the middle of a retry: finish or reconcile open requests first.`]}),`\n`,_jsx(Heading,{level:`2`,id:`revoke-a-key`,children:`Revoke a key`}),`\n`,_jsxs(_components.p,{children:[`Revoke a key in the dashboard or with `,_jsx(_components.a,{href:`/api-reference/partner-api-keys-revoke`,children:_jsx(_components.code,{children:`POST /partner/v1/api-keys/{apiKeyId}:revoke`})}),` (optional `,_jsx(_components.code,{children:`reason`}),`, up to 500 characters, kept in your audit log). Revocation takes effect on every server within 60 seconds; the key then gets `,_jsx(_components.code,{children:`401`}),` `,_jsx(_components.code,{children:`api-key-invalid`}),`. A revoked key cannot be reactivated.`]}),`\n`,_jsx(_components.p,{children:`Revoke a key immediately when you suspect it leaked, and tell AllRide. AllRide can also revoke a key in an emergency and informs your partner owners when it does.`}),`\n`,_jsx(Heading,{level:`2`,id:`store-keys-safely`,children:`Store keys safely`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Keep keys in a secret manager and inject them at runtime. Never commit them, embed them in mobile or browser apps, or put them in URLs.`}),`\n`,_jsxs(_components.li,{children:[`Do not log the `,_jsx(_components.code,{children:`Authorization`}),` header. If you need to identify a key in logs, log its `,_jsx(_components.code,{children:`keyHint`}),` or `,_jsx(_components.code,{children:`last4`}),`.`]}),`\n`,_jsx(_components.li,{children:`Use one key per system and per environment, so that you can rotate or revoke one without affecting the others.`}),`\n`,_jsx(_components.li,{children:`Set an expiry and track it; you receive reminder emails 14 days and 1 day before a key expires.`}),`\n`,_jsxs(_components.li,{children:[`Restrict where keys can be used from with the `,_jsx(_components.a,{href:`/guides/ip-allowlist`,children:`IP allowlist`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`related`,children:`Related`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/guides/authentication`,children:`Authentication`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/guides/permissions`,children:`Permissions and scopes`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/guides/idempotency`,children:`Idempotency`})}),`\n`]})]})}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":"API keys","description":"Create API keys with the right scopes, recognise their format, rotate them without downtime and revoke them.","href":"/guides/api-keys"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Create a key","slug":"create-a-key","depth":2,"children":[]},{"title":"Key format","slug":"key-format","depth":2,"children":[]},{"title":"Scopes","slug":"scopes","depth":2,"children":[]},{"title":"Rotate a key","slug":"rotate-a-key","depth":2,"children":[]},{"title":"Revoke a key","slug":"revoke-a-key","depth":2,"children":[]},{"title":"Store keys safely","slug":"store-keys-safely","depth":2,"children":[]},{"title":"Related","slug":"related","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"allride-voucher-consumer","siteName":"AllRide Vouchers — Consumer API","title":"API keys - AllRide Vouchers — Consumer API","navMaps":{"firstHrefInVersion":{"v1":{"href":"/guides/api-keys","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-10-27T04:59:04.835Z","originalFileLocation":"guides/api-keys.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=\"Create API keys with the right scopes, recognise their format, rotate them without downtime and revoke them.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AllRide Vouchers — Consumer 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/allride-voucher-consumer/PLfxlSfQYmN0h3Xy/_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/allride-voucher-consumer/PLfxlSfQYmN0h3Xy/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/allride-voucher-consumer/PLfxlSfQYmN0h3Xy/_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/allride-voucher-consumer/PLfxlSfQYmN0h3Xy/_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/allride-voucher-consumer/PLfxlSfQYmN0h3Xy/_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/allride-voucher-consumer/PLfxlSfQYmN0h3Xy/_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/allride-voucher-consumer/PLfxlSfQYmN0h3Xy/_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/allride-voucher-consumer/PLfxlSfQYmN0h3Xy/_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/allride-voucher-consumer/PLfxlSfQYmN0h3Xy/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"API keys - AllRide Vouchers — Consumer API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create API keys with the right scopes, recognise their format, rotate them without downtime and revoke them.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AllRide Vouchers — Consumer API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://allride-voucher-consumer.mintlify.app/guides/api-keys\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://allride-voucher-consumer.mintlify.app/_mintlify/api/og/v2?division=Authentication+and+security\u0026amp;title=API+keys\u0026amp;description=Create+API+keys+with+the+right+scopes%2C+recognise+their+format%2C+rotate+them+without+downtime+and+revoke+them.\u0026amp;theme=aa1e578c5c25daaa6c2c70a3\u0026amp;signature=5d9be29bf754230ffd2382cef367b31fb2f45d68f0d42651f8e52dcc18366022\">\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=\"API keys - AllRide Vouchers — Consumer API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create API keys with the right scopes, recognise their format, rotate them without downtime and revoke them.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://allride-voucher-consumer.mintlify.app/_mintlify/api/og/v2?division=Authentication+and+security\u0026amp;title=API+keys\u0026amp;description=Create+API+keys+with+the+right+scopes%2C+recognise+their+format%2C+rotate+them+without+downtime+and+revoke+them.\u0026amp;theme=aa1e578c5c25daaa6c2c70a3\u0026amp;signature=5d9be29bf754230ffd2382cef367b31fb2f45d68f0d42651f8e52dcc18366022\">\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/allride-voucher-consumer/PLfxlSfQYmN0h3Xy/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AllRide Vouchers — Consumer API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0A0A0A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://allride-voucher-consumer.mintlify.app/guides/api-keys\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/api-keys.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://allride-voucher-consumer.mintlify.app/#organization\",\"name\":\"AllRide Vouchers — Consumer API\",\"url\":\"https://allride-voucher-consumer.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/allride-voucher-consumer/9vqpJaAUcuaHTUy2/logo/light.svg?fit=max\u0026auto=format\u0026n=9vqpJaAUcuaHTUy2\u0026q=85\u0026s=92f0ea94edcefc1febba871b5ead8cdd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://allride-voucher-consumer.mintlify.app#website\",\"name\":\"AllRide Vouchers — Consumer API\",\"url\":\"https://allride-voucher-consumer.mintlify.app\",\"publisher\":{\"@id\":\"https://allride-voucher-consumer.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://allride-voucher-consumer.mintlify.app/guides/api-keys#webpage\",\"url\":\"https://allride-voucher-consumer.mintlify.app/guides/api-keys\",\"name\":\"API keys\",\"description\":\"Create API keys with the right scopes, recognise their format, rotate them without downtime and revoke them.\",\"dateModified\":\"2026-10-27T04:59:04.835Z\",\"isPartOf\":{\"@id\":\"https://allride-voucher-consumer.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://allride-voucher-consumer.mintlify.app/guides/api-keys#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://allride-voucher-consumer.mintlify.app/guides/api-keys#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Authentication and security\",\"item\":\"https://allride-voucher-consumer.mintlify.app/guides/authentication\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API keys\",\"item\":\"https://allride-voucher-consumer.mintlify.app/guides/api-keys\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://allride-voucher-consumer.mintlify.app/guides/api-keys#article\",\"headline\":\"API keys\",\"name\":\"API keys\",\"description\":\"Create API keys with the right scopes, recognise their format, rotate them without downtime and revoke them.\",\"url\":\"https://allride-voucher-consumer.mintlify.app/guides/api-keys\",\"mainEntityOfPage\":{\"@id\":\"https://allride-voucher-consumer.mintlify.app/guides/api-keys#webpage\"},\"dateModified\":\"2026-10-27T04:59:04.835Z\",\"publisher\":{\"@id\":\"https://allride-voucher-consumer.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://allride-voucher-consumer.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AllRide Vouchers — Consumer API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"AllRide Vouchers — Consumer API","nav":{"global":null,"versions":[{"version":"v1","default":true,"tabs":[{"tab":"Guides","groups":[{"group":"Get started","pages":[{"title":"Introduction","href":""},{"title":"Quickstart","href":"/quickstart"},{"title":"Sandbox and production","href":"/guides/environments"},{"title":"Concepts","href":"/guides/concepts"},{"title":"Going-live checklist","href":"/guides/going-live"}]},{"group":"Authentication and security","pages":[{"title":"Authentication","description":"Authenticate every request with an API key, understand which partner it acts for, and handle 401 and 403 errors.","href":"/guides/authentication"},{"title":"API keys","href":"/guides/api-keys"},{"title":"Permissions and scopes","description":"How permissions decide what a user or API key may do, how to choose API key scopes, and the full permission reference.","href":"/guides/permissions"},{"title":"IP allowlist","href":"/guides/ip-allowlist"},{"title":"Network and IP addresses","href":"/guides/network"}]},{"group":"API conventions","pages":[{"title":"Requests and responses","href":"/guides/requests-and-responses"},{"title":"Pagination, filtering and sorting","href":"/guides/pagination"},{"title":"Idempotency","href":"/guides/idempotency"},{"title":"Errors","href":"/errors/index"},{"title":"Error catalog","href":"/errors/catalog"},{"title":"Limits","href":"/guides/limits"},{"title":"Versioning and deprecation","href":"/guides/versioning"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","href":"/webhooks/overview"},{"title":"Verifying signatures","href":"/webhooks/verify-signatures"},{"title":"Retries, logs and replay","href":"/webhooks/retries-and-logs"},{"title":"Event catalog","href":"/webhooks/events"}]},{"group":"Consumer guides","pages":[{"title":"Catalog and toggles","href":"/consumer/catalog"},{"title":"Redeeming vouchers","href":"/consumer/redeeming"},{"title":"Redemption entities","href":"/consumer/redemption-entities"},{"title":"Redemption links","href":"/consumer/redemption-links"},{"title":"Email OTP links","href":"/consumer/email-otp-links"},{"title":"Landing pages and custom domains","href":"/consumer/landing-pages"},{"title":"Voiding redemptions","href":"/consumer/voiding"},{"title":"Analytics","href":"/consumer/analytics"},{"title":"Billing","href":"/consumer/billing"},{"title":"Prices and price acceptance","href":"/consumer/prices"}]},{"group":"Workspace","pages":[{"title":"Members and groups","href":"/workspace/members-and-groups"},{"title":"Audit log","href":"/workspace/audit-log"},{"title":"Custom domains","href":"/workspace/custom-domains"}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/consumer-catalog-providers-list"}]},{"tab":"Webhook events","pages":[{"title":"Webhook events","href":"/webhooks/events/redemption-created"}]}]}]},"basePath":"","title":"API keys - AllRide Vouchers — Consumer API","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":[],"chunks":[]}