API Keys
The API Keys endpoints let you programmatically create, list, and revoke API keys for your Soku account. These endpoints are intended for building custom admin dashboards, automation tooling, or key rotation scripts.Authentication for Key Management
Unlike the content endpoints (posts, media, templates, transcription) which use thesoku-api-key header, the API key management endpoints authenticate using a Firebase ID token. This is because creating and revoking API keys is a privileged operation that requires proof of account ownership.
Include the Firebase ID token in the Authorization header:
Firebase ID tokens expire after 1 hour. Refresh your token before making key management requests if needed.
Create an API Key
Create a new API key for your account.Headers
Request Body
Response
Status:201 Created
Example
List API Keys
Retrieve all API keys associated with your account. For security, the full key value is not returned — only metadata including the key ID, name, creation date, and a masked preview of the key.Headers
Response
Returns an object containing an array of API key metadata objects.Example
Revoke an API Key
Permanently revoke an API key. Once revoked, any requests using this key will receive a401 Unauthorized response. This action cannot be undone.
Headers
Path Parameters
Response
Status:200 OK
Example
Key Rotation Workflow
To rotate an API key without downtime:- Create a new API key using
POST /v1/api-keys. - Update your application or service to use the new key.
- Verify that requests are succeeding with the new key.
- Revoke the old key using
DELETE /v1/api-keys/{id}.
Error Responses
Example error response: