API Keys
Get all API keys registered to the user
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200
Successful Response
application/json
401
Invalid credentials
get
/v2/api-keysGET /v2/api-keys HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"fid": "apikey_abc123456",
"name": "text",
"created_at": "2024-01-01T00:00:00Z",
"expires_at": "2024-01-01T00:00:00Z",
"deactivated_at": "2024-01-01T00:00:00Z",
"snippet": "fkey_abc1..."
}
]Create a new API key
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestringRequired
expires_atstring · datetimeRequiredExample:
2024-01-01T00:00:00ZResponses
201
Successful Response
application/json
400
Invalid request parameters
401
Invalid credentials
422
Validation Error
application/json
post
/v2/api-keysPOST /v2/api-keys HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"name": "text",
"expires_at": "2024-01-01T00:00:00Z"
}{
"fid": "apikey_abc123456",
"name": "text",
"created_at": "2024-01-01T00:00:00Z",
"expires_at": "2024-01-01T00:00:00Z",
"deactivated_at": "2024-01-01T00:00:00Z",
"snippet": "fkey_abc1...",
"secret": "fkey_abc123456"
}Revoke an API key
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
key_fidstringRequiredExample:
apikey_abc123456Responses
204
Successful Response
400
Invalid request
401
Invalid credentials
404
API key not found
422
Validation Error
application/json
delete
/v2/api-keys/{key_fid}DELETE /v2/api-keys/{key_fid} HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated