Skip to main content

API keys

Every call needs Authorization: Bearer <key>. 4 calls:

List API keys​

GET /v1/api-keys

Query parameters

NameTypeRequiredDescription
limitintegerNoFrom 1 to 100. Default 50.
cursorstringNoOpaque cursor from next_cursor. Up to 512 characters.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].created_atstring (date-time)ISO 8601 timestamp.
data[].envenumOne of: live, test.
data[].expires_atstring (date-time) or nullISO 8601 timestamp.
data[].idstringAPI key id (key_...).
data[].ip_allowliststring[] or null
data[].last_used_atstring (date-time) or nullISO 8601 timestamp.
data[].namestring
data[].prefixstringUp to 8 characters.
data[].revoked_atstring (date-time) or nullISO 8601 timestamp.
data[].scopesenum[]
next_cursorstring or nullPass as cursor to get the next page; null at the end.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Create an API key​

POST /v1/api-keys

The full key is returned once, in secret. Only its hash is stored.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
envenumNoOne of: live, test. Default "live".
expires_atstring (date-time)NoISO 8601 timestamp.
ip_allowliststring[]NoUp to 50 items.
namestringYesUp to 80 characters.
scopesenum[]YesUp to 3 items.

Response 201

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
envenumOne of: live, test.
expires_atstring (date-time) or nullISO 8601 timestamp.
idstringAPI key id (key_...).
ip_allowliststring[] or null
last_used_atstring (date-time) or nullISO 8601 timestamp.
namestring
prefixstringUp to 8 characters.
revoked_atstring (date-time) or nullISO 8601 timestamp.
scopesenum[]
secretstringShown once. Store it securely.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Revoke an API key​

DELETE /v1/api-keys/:id

Revocation is immediate and permanent. Revoking twice is a no-op.

Path parameters

NameTypeRequiredDescription
idstringYesAPI key id (key_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Response 200

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
envenumOne of: live, test.
expires_atstring (date-time) or nullISO 8601 timestamp.
idstringAPI key id (key_...).
ip_allowliststring[] or null
last_used_atstring (date-time) or nullISO 8601 timestamp.
namestring
prefixstringUp to 8 characters.
revoked_atstring (date-time) or nullISO 8601 timestamp.
scopesenum[]

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Rotate an API key​

POST /v1/api-keys/:id/rotate

Issues a new secret (and prefix) for the same key. The old secret stops working immediately.

Path parameters

NameTypeRequiredDescription
idstringYesAPI key id (key_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Response 200

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
envenumOne of: live, test.
expires_atstring (date-time) or nullISO 8601 timestamp.
idstringAPI key id (key_...).
ip_allowliststring[] or null
last_used_atstring (date-time) or nullISO 8601 timestamp.
namestring
prefixstringUp to 8 characters.
revoked_atstring (date-time) or nullISO 8601 timestamp.
scopesenum[]
secretstringShown once. Store it securely.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.