Skip to main content
POST
/
api
/
workspace
/
{workspaceId}
/
api-keys
Create API key
curl --request POST \
  --url https://app.alana.shopping/api/workspace/{workspaceId}/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "permissions": [
    "<string>"
  ],
  "expires_at": "2023-11-07T05:31:56Z",
  "brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "<string>",
  "workspace_id": "<string>",
  "name": "<string>",
  "key_prefix": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "permissions": [
    "<string>"
  ],
  "last_used_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "secret": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token authentication via Auth0. Users authenticate through Auth0 Universal Login. Include the access token in the Authorization header: Authorization: Bearer <token>

Path Parameters

workspaceId
string
required

The workspace ID

Pattern: ^ws_[a-z0-9]+$

Body

application/json
name
string
required
Required string length: 1 - 255
permissions
string[]
expires_at
string<date-time> | null
brand_id
string<uuid> | null

Phase 176-05: brand-scoped key. When set, this key can only access products and resources belonging to the specified brand. Omit or set to null for workspace-wide access.

Response

API key created successfully

id
string
required
workspace_id
string
required
name
string
required
key_prefix
string
required

First 10 characters of the API key

created_at
string<date-time>
required
permissions
string[]
last_used_at
string<date-time> | null
expires_at
string<date-time> | null
created_by
string
brand_id
string<uuid> | null

Phase 176-05: brand scope. Non-null means this key is restricted to resources of the specified brand.

secret
string

Full API key (only shown on creation)

Last modified on May 18, 2026