API KeysCreate API key
API Keys

Create API key

Create a new MCP API key. The full key value is only returned once at creation time. Store it securely.

curl -X POST "https://api.mythic-analytics.com/api/v1/mcp/api-keys" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "Production Gateway Key",
  "scopes": [
    "tools:execute",
    "tools:read"
  ],
  "expires_at": "2024-12-25T10:00:00Z"
}'
{
  "success": true,
  "data": "null"
}
POST
/mcp/api-keys
POST
Security Scheme
Bearer Tokenstring
Required

Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY

Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY
Content-Typestring
Required

The media type of the request body

Options: application/json
namestring
Required

Human-readable name for the key.

scopesarray

Permission scopes for the key.

expires_atstring

Optional expiration date. Null means no expiration.

Format: date-time
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY

Body

application/json
namestring
Required

Human-readable name for the key.

scopesarray

Permission scopes for the key.

expires_atstring

Optional expiration date. Null means no expiration.

Responses