API ReferenceAPI Keys
Create API Key
Create a new API key for programmatic access
The full key is only returned once at creation. Store it immediately in a secrets manager or environment variable — it cannot be retrieved again.
Authentication
This endpoint requires a valid user session token. If you do not yet have an API key, obtain a session token by logging in first and pass it as a Bearer token in the Authorization header.
Step 1 — Log in to get a session token
curl -X POST https://your-talkr-instance/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "password": "your-password"}'The response contains a token field. Use it in the next step.
Step 2 — Create an API key
curl -X POST https://your-talkr-instance/api/v1/user/api-keys \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"name": "my-api-key"}'Once you have an API key, you can use X-API-Key: <key> in place of Authorization: Bearer for all subsequent requests.
Header Parameters
X-API-Key?string|null
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/user/api-keys" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "id": 0, "name": "string", "key_prefix": "string", "api_key": "string", "created_at": "2019-08-24T14:15:22Z"}