Skip to main content
POST
/
api-key
Create an API key
import requests

url = "https://{FUSION HOST}/api/api-key"

payload = {
    "id": "test-key-id",
    "name": "test-key-name"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
{
  "name": "test-key-name",
  "id": "test-key-d",
  "createdAt": "2025-10-30T22:53:48Z",
  "key": "ae52a9b0-f719-48d9-88b9-566133338cc9",
  "roles": [
    "developer",
    "search"
  ]
}

Body

application/json
name
string
required
id
string
required
roles
string[]

One or more user roles. Use GET /roles to get the list of existing roles.

Response

Key created.

name
string
id
string
createdAt
string<date-time>
Example:

"2025-09-23T17:48:07Z"

key
string
roles
string[]

One or more user roles. Use GET /roles to get the list of existing roles.

disabled
boolean