API Keys
Create and manage API keys for programmatic access. API keys can be used instead of JWT tokens for all authenticated endpoints.
Include your key in the Authorization header:
Terminal
Authorization: Bearer YOUR_API_KEYGET /api-keys
List all API keys for the authenticated user. Results are paginated.
Auth: Bearer token
Terminal
curl https://api.texer.org/api-keys \
-H "Authorization: Bearer YOUR_TOKEN"JSON
{
"data": [
{
"id": 1,
"name": "CI Pipeline",
"prefix": "txr_...a3b4",
"lastUsedAt": "2025-06-14T18:30:00Z",
"createdAt": "2025-05-01T10:00:00Z"
}
],
"meta": { "page": 1, "limit": 20, "total": 1, "totalPages": 1, "hasNext": false, "hasPrev": false }
}POST /api-keys
Create a new API key. The full key is only shown once in the response, so store it securely.
Auth: Bearer token
Terminal
curl -X POST https://api.texer.org/api-keys \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "CI Pipeline"}'JSON
{
"id": 2,
"name": "CI Pipeline",
"apiKey": "txr_live_a1b2c3d4e5f6g7h8i9j0..."
}PUT /api-keys/:id
Rename an existing API key.
Auth: Bearer token
Terminal
curl -X PUT https://api.texer.org/api-keys/2 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Production"}'JSON
{
"id": 2,
"name": "Production"
}DELETE /api-keys/:id
Revoke and permanently delete an API key. This action cannot be undone.
Auth: Bearer token
Terminal
curl -X DELETE https://api.texer.org/api-keys/2 \
-H "Authorization: Bearer YOUR_TOKEN"JSON
{ "message": "API key deleted" }