Activate browser key
POST
/v1/browser/activateUse this from browser integrations before creating jobs. Send the publishable key in the JSON body; the API validates the Origin header against the key's allowed-origins list.
AUTH
No Authorization header; publishable key in JSON body with allowed Origin
CONTENT TYPE
application/json
STATUS
Stable
Request parameters
- publishable_key
- string
- Required
- Publishable key shown once in the dashboard.
- Origin header
- string
- Required
- Browser origin that must match an allowed origin for the publishable key.
| Name | Type | Required | Description |
|---|---|---|---|
| publishable_key | string | Required | Publishable key shown once in the dashboard. |
| Origin header | string | Required | Browser origin that must match an allowed origin for the publishable key. |
Returns
- ok
- boolean
- True when activation succeeds.
- activation_token
- string
- Short-lived token bound to the project and origin.
- expires_at_ms
- integer
- Unix epoch milliseconds for token expiry.
- key_id
- string
- Activated publishable key identifier.
- wrapper_tenant_id
- string
- Wrapper tenant bound to the token.
- project_id
- string
- Project bound to the token.
| Name | Type | Description |
|---|---|---|
| ok | boolean | True when activation succeeds. |
| activation_token | string | Short-lived token bound to the project and origin. |
| expires_at_ms | integer | Unix epoch milliseconds for token expiry. |
| key_id | string | Activated publishable key identifier. |
| wrapper_tenant_id | string | Wrapper tenant bound to the token. |
| project_id | string | Project bound to the token. |
Errors
CODESTATUSWHEN IT HAPPENS
unauthorized401Missing or unknown publishable key.
forbidden403Origin is not allowed for this key.
validation_error400publishable_key is missing or malformed, or the Origin header is absent.