{ "opencollection": "1.0.0", "info": { "name": "Admin Account / Address API Keys API", "version": "v3" }, "items": [ { "info": { "name": "API Keys", "type": "folder" }, "items": [ { "info": { "name": "List API keys", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v3/admin/api_keys", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Returns publishable and secret API keys for the current store. Secret keys are listed by `token_prefix` only — the plaintext token is delivered exactly once on create.\n\n**Required scope:** `read_api_keys` (for API-key authentication)." }, { "info": { "name": "Create an API key", "type": "http" }, "http": { "method": "POST", "url": "http://{defaultHost}/api/v3/admin/api_keys", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Creates a publishable or secret API key. The plaintext token is included in the response **once** for secret keys; publishable keys expose their token on every read since they are intended for client-side use.\n\n**Required scope:** `write_api_keys` (for API-key authentication)." }, { "info": { "name": "Show an API key", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v3/admin/api_keys/:id", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "**Required scope:** `read_api_keys` (for API-key authentication)." }, { "info": { "name": "Delete an API key", "type": "http" }, "http": { "method": "DELETE", "url": "http://{defaultHost}/api/v3/admin/api_keys/:id", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "**Required scope:** `write_api_keys` (for API-key authentication)." }, { "info": { "name": "Revoke an API key", "type": "http" }, "http": { "method": "PATCH", "url": "http://{defaultHost}/api/v3/admin/api_keys/:id/revoke", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Marks the key revoked. Future requests using its token will fail; the row is preserved for audit.\n\n**Required scope:** `write_api_keys` (for API-key authentication)." } ] } ], "bundled": true }