Skip to main content
POST
Rotate your organization service token. The current token is set to expire after a grace period (in seconds), and a new service token is returned. Use this for key rotation and security best practices.
The service token used in the Authorization header is the token being rotated. You only need to provide expireAt in the request body — no token field required.

Authentication

Use your current service token in the Authorization header. The token provided here is the one that will be expired and replaced. To access your service token:
  1. In Settings page, navigate to the Service Tokens section.
  2. Click the “Generate Token” button to create a new service token if you don’t have one already.

Headers

Authorization
string
required
Bearer token for API authentication. Use the service token you want to rotate.
Content-Type
string
required
Must be application/json when sending a JSON body.

Request Body

expireAt
number | string
required
Duration in seconds until the current token expires. The old token remains valid until this many seconds from the request, then it is invalidated. Accepts a number or a numeric string. Use 0 to expire immediately. Common values: 0 (immediate), 3600 (1 hour), 86400 (24 hours).

Response

On success, the API returns 200 with a JSON object:
key
string
The new service token (UUID). Use this for all future service-level API calls. Store it securely; the previous token will expire per expireAt.
On error, the API returns a JSON object with error.code and error.message and an appropriate HTTP status (400, 401, or 500).

Examples

HTTP Status Code Summary

Possible Errors