API keys
Create, list, update and delete personal and organization keys.
Create a new API key for a user
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/auth/api-key/create" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "prefix": "string", "start": "string", "key": "string", "enabled": true, "expiresAt": "2019-08-24T14:15:22Z", "referenceId": "string", "lastRefillAt": "2019-08-24T14:15:22Z", "lastRequest": "2019-08-24T14:15:22Z", "metadata": {}, "rateLimitMax": 0, "rateLimitTimeWindow": 0, "remaining": 0, "refillAmount": 0, "refillInterval": 0, "rateLimitEnabled": true, "requestCount": 0, "permissions": { "property1": [ "string" ], "property2": [ "string" ] }}Delete an existing API key
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/auth/api-key/delete" \ -H "Content-Type: application/json" \ -d '{ "keyId": "string" }'{ "success": true}Retrieve an existing API key by ID
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Query Parameters
The configuration ID to use for the API key lookup. If not provided, the default configuration will be used.
The id of the Api Key
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/api-key/get"{ "id": "string", "name": "string", "start": "string", "prefix": "string", "userId": "string", "refillInterval": 0, "refillAmount": 0, "lastRefillAt": "2019-08-24T14:15:22Z", "enabled": true, "rateLimitEnabled": true, "rateLimitTimeWindow": 0, "rateLimitMax": 0, "requestCount": 0, "remaining": 0, "lastRequest": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "metadata": {}, "permissions": "string"}List all API keys for the authenticated user or for a specific organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/api-key/list"{ "apiKeys": [ { "id": "string", "name": "string", "start": "string", "prefix": "string", "userId": "string", "refillInterval": 0, "refillAmount": 0, "lastRefillAt": "2019-08-24T14:15:22Z", "enabled": true, "rateLimitEnabled": true, "rateLimitTimeWindow": 0, "rateLimitMax": 0, "requestCount": 0, "remaining": 0, "lastRequest": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "metadata": {}, "permissions": "string" } ], "total": 0, "limit": 0, "offset": 0}Update an existing API key by ID
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/auth/api-key/update" \ -H "Content-Type: application/json" \ -d '{ "keyId": "string" }'{ "id": "string", "name": "string", "start": "string", "prefix": "string", "userId": "string", "refillInterval": 0, "refillAmount": 0, "lastRefillAt": "2019-08-24T14:15:22Z", "enabled": true, "rateLimitEnabled": true, "rateLimitTimeWindow": 0, "rateLimitMax": 0, "requestCount": 0, "remaining": 0, "lastRequest": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "metadata": {}, "permissions": "string"}