API Keys
Get all API keys registered to the user
Authorizations
Responses
200
Successful Response
application/json
401
Invalid credentials
get
GET /v2/api-keys HTTP/1.1
Host: api.mlfoundry.com
Authorization: Bearer fkey_<key>
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
Body
namestringRequired
expires_atanyRequiredExample:
2024-01-01T00:00:00Z
Responses
201
Successful Response
application/json
400
Invalid request parameters
401
Invalid credentials
422
Validation Error
application/json
post
POST /v2/api-keys HTTP/1.1
Host: api.mlfoundry.com
Authorization: Bearer fkey_<key>
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
Path parameters
key_fidstringRequiredExample:
apikey_abc123456
Responses
204
Successful Response
400
Invalid request
401
Invalid credentials
404
API key not found
422
Validation Error
application/json
delete
DELETE /v2/api-keys/{key_fid} HTTP/1.1
Host: api.mlfoundry.com
Authorization: Bearer fkey_<key>
Accept: */*
No content