API Keys

Get Api Keys

get

Get all API keys registered to the user

Authorizations
Responses
200
Successful Response
application/json
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 Api Key

post

Create a new API key

Authorizations
Body
namestringRequired
expires_atanyRequiredExample: 2024-01-01T00:00:00Z
Responses
201
Successful Response
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 Api Key

delete

Revoke an API key

Authorizations
Path parameters
key_fidstringRequiredExample: apikey_abc123456
Responses
204
Successful Response
delete
DELETE /v2/api-keys/{key_fid} HTTP/1.1
Host: api.mlfoundry.com
Authorization: Bearer fkey_<key>
Accept: */*

No content