Skip to main content
POST
/
admin
/
api-keys
Create API Key
curl --request POST \
  --url https://api.totalis.com/admin/api-keys \
  --header 'Content-Type: application/json' \
  --header 'x-admin-api-key: <api-key>' \
  --data '
{
  "entity_id": "did:privy:abc123",
  "name": "Market Maker Bot",
  "environment": "live"
}
'
{
  "key": "<string>",
  "key_prefix": "<string>",
  "entity_type": "<string>",
  "entity_id": "<string>",
  "name": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "message": "<string>"
}

Authorizations

x-admin-api-key
string
header
required

Admin API key for administrative operations.

Body

application/json
entity_id
string
required

ID of the entity to create a key for

entity_type
enum<string>
default:unified

Entity type (only unified is supported)

Available options:
unified
name
string

Optional friendly name

environment
enum<string>
default:live

Key environment

Available options:
live,
test
expires_in_days
integer

Optional expiration in days

Required range: x >= 1

Response

API key created

key
string

Full API key (only shown once)

key_prefix
string
entity_type
string
entity_id
string
name
string | null
expires_at
string<date-time> | null
created_at
string<date-time>
message
string