Skip to main content
POST
/
management
/
keys
Create management API key
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: '<string>',
    team_id: '<string>',
    created_by: '<string>',
    scopes: '<string>',
    status: 'active',
    soft_blocked: true
  })
};

fetch('https://api.phaseo.app/v1/management/keys', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "ok": true,
  "key": {
    "id": "11111111-1111-4111-8111-111111111111",
    "name": "My New Key",
    "prefix": "pk_abc123xy",
    "status": "active",
    "scopes": "read,write",
    "created_at": "2026-01-20T10:30:00Z",
    "key": "pk_abc123xy_abc123def456..."
  }
}

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
name
string
required

Name for the key.

team_id
string

Team scope for internal callers.

created_by
string

Creator user ID for internal callers.

scopes
status
enum<string>
Available options:
active,
disabled,
revoked
soft_blocked
boolean

Response

Management API key created

ok
enum<boolean>
required
Available options:
true
key
object
required
Last modified on February 17, 2026