Skip to content
Myra AI Workspace Administration Manual Updated · 01 Sep 2026

Creating a user-scoped token

Note

The Admin API requires no token. The Admin API is typically protected at the network level.

Send the request as POST to the path /admin/v1/users/{user_id}/tokens.

Description

Creates a token associated with a specific user.

Request

The following parameters are available:

Parameter In Type Required Description
user_id path string yes ID of the user account.

Example

Example of the request body:

{
  "user_id": "usr_abc123",
  "label": "production-client",
  "scopes": [
    "inference"
  ],
  "expires_at": null,
  "rate_limit": {
    "requests": 100,
    "window_sec": 60
  },
  "budget_usd": 100.0,
  "gateway_id": "gw_xyz789"
}

Responses

The endpoint answers the request with the following status codes:

Status code Description
201 Token created.