Skip to main content
POST
/
publishable-keys
Create publishable key
curl --request POST \
  --url https://app.usechar.ai/api/publishable-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "allowed_origins": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "key_prefix": "<string>",
  "revoked_at": "2023-11-07T05:31:56Z",
  "last_used_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "can_reveal": true,
  "key": "<string>",
  "allowed_origins": "<unknown>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.usechar.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

WorkOS JWT token. Obtain via WorkOS AuthKit authentication flow. The token must include organization_id claim for organization-scoped endpoints.

Body

application/json
name
string
required
Required string length: 1 - 100
allowed_origins
string[]
required
Required array length: 1 - 20 elements
Pattern: ^https?:\/\/[^/?#\s]+$

Response

OK

id
string
required
name
string
required
key_prefix
string
required
revoked_at
string<date-time> | null
required
last_used_at
string<date-time> | null
required
created_at
string<date-time>
required
can_reveal
boolean
required
key
string
required
allowed_origins
any