Authentication
HubTalk AI uses two authentication methods depending on the endpoint type.
Bearer Token (JWT)
Used for data upload endpoints (audio, transcriptions, calls) and API key management.
curl -X GET "https://<base-url>/api/v1/calls" \
-H "Authorization: Bearer YOUR_TOKEN"
Obtain your token from your system administrator. Include it in the Authorization header of every request.
Keep your Bearer token secret. Do not expose it in client-side code or public repositories.
API Key
Used for all WebAPI / external endpoints (call campaigns, campaign details).
curl -X GET "https://<base-url>/external/api/v1/some-endpoint" \
-H "x-cybernet-api-key: YOUR_API_KEY"
API keys are generated through the API Key management endpoints and have the format {firm_prefix}${hashed_part}.
API Key Authentication Flow
Key Properties
| Property | Details |
|---|
| One key per firm | Each firm can have only one active and enabled key |
| Admin permissions | API keys have the same access rights as an ADMIN user for the associated firm |
| Non-recoverable | The full key is shown only once at creation. If lost, you must create a new one (the old one is deactivated) |
| Activity logging | All operations are logged, including last_used timestamp |
API Key Errors
| HTTP Code | Meaning |
|---|
401 Unauthorized | Key not provided or invalid format |
403 Forbidden | Key is inactive, deleted, or not found |
Which Method to Use
| Endpoint Pattern | Auth Method | Header |
|---|
/external/api/v1/api-key (management) | Bearer Token | Authorization: Bearer <JWT> |
/external/api/v1/call-campaign/* | API Key | x-cybernet-api-key: <KEY> |
/api/v1/audio/* | Bearer Token | Authorization: Bearer <JWT> |
/api/v1/calls/* | Bearer Token | Authorization: Bearer <JWT> |