Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

Project-scoped API key. It cannot access account routes or create additional projects.

Headers

Bisibility-API-Version
enum<string>

API contract version requested by the client. Omit this header to use the current backward-compatible behavior.

Available options:
v1
X-Bisibility-Project
string

Project public ID (prj_...) targeted by this personal-access-token request. Optional. Selection precedence is: {project_id} path parameter, X-Bisibility-Project header, project query parameter, then inference when the PAT owner belongs to exactly one project. Project API keys and paths that already carry a project ID ignore it.

Query Parameters

project
string

Query-parameter equivalent of the X-Bisibility-Project header for personal-access-token project selection. Optional. Selection precedence is: {project_id} path parameter, X-Bisibility-Project header, project query parameter, then inference when the PAT owner belongs to exactly one project.

Body

application/json
name
string
required
Required string length: 1 - 80
expires_in_days
enum<integer> | null

Lifetime in days. Use null for no expiry.

Available options:
30,
90,
365,
null
scope
enum<string>
default:admin

Access tier. When omitted, defaults to admin for backward compatibility.

Available options:
read,
write,
admin

Response

Created

created_at
string<date-time>
required
expires_at
string<date-time> | null
required
id
string
required
Pattern: ^key_[a-z][a-z0-9]{23}$
Example:

"key_a00000000000000000000000"

last_used_at
string<date-time> | null
required
name
string
required
prefix
string
required
Example:

"bsb_key_live_xxxxxxxx"

revoked_at
string<date-time> | null
required
scope
enum<string>
required
Available options:
read,
write,
admin
masked_value
string
required
token
string
required
Example:

"bsb_key_live_..."