Reference / Programmatic Access

Mint a scoped API key for the signed-in user.

POST /v1/auth/me/api-keys
End-user session operationId: create

Authorization

Called from the browser with the publishable application id (x-application-id); the access token lives in memory.

Request body · required

  • expires_in_days integer<int64> int64

    Optional days until the key expires (null = never).

  • name string required
  • scopes string[]

Responses

201 Key created
{
  "data": {
    "created_at": "2026-01-15T09:30:00Z",
    "expires_at": "2026-01-15T09:30:00Z",
    "id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
    "last_used_at": "2026-01-15T09:30:00Z",
    "name": "string",
    "revoked_at": "2026-01-15T09:30:00Z",
    "scopes": [
      "string"
    ],
    "secret": "string"
  },
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "timestamp": "string"
  },
  "success": false
}

Request

curl -X POST "https://api.identrahq.com/v1/auth/me/api-keys" \
  -H "Content-Type: application/json" \
  -d '{
  "expires_in_days": 0,
  "name": "my-integration",
  "scopes": [
    "string"
  ]
}'

Try it

live request
POST https://api.identrahq.com/v1/auth/me/api-keys

Request body

application/json