VRPlatformVRPlatform
Api tokens

/api-tokens

Generate an API token for the current team and return its secret. Partner teams may provide capability bundles to restrict the token; omission grants unrestricted partner API access. An optional IP allowlist is enforced on every API-key request, and an optional exact parent-origin allowlist restricts embedded-session creation and renewal. Requires an authenticated team admin or global VRP admin. The token secret is never written to audit records.

POST
/api-tokens
X-API-Key<token>

API key provided in dashboard

In: header

Request Body

application/json

allowedEmbedParentOrigins?array<string>

Exact HTTP(S) parent origins allowed when this partner token creates embedded sessions. A non-empty list is enforced exactly on issuance and renewal; omission currently leaves parent origins unrestricted. An empty array is rejected. Rejected for ordinary teams.

Items1 <= items <= 32
allowedIpCidrs?array<string>

Optional IPv4 or IPv6 addresses and CIDRs allowed to use this token. Individual addresses are normalized to /32 or /128. Omit or send an empty array for no IP restriction.

Itemsitems <= 32
bundles?array<string>

Optional capability restrictions for a partner-owned API token. Omit for unrestricted partner API access. Rejected for ordinary teams.

Items1 <= items
[key: string]?never

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://staging.api.vrplatform.app/api-tokens" \  -H "Content-Type: application/json" \  -d '{}'
{
  "allowedEmbedParentOrigins": [
    "http://example.com"
  ],
  "allowedIpCidrs": [
    "string"
  ],
  "bundles": [
    "embed:exports:v1"
  ],
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "createdAt": "2024-01-15T12:30:00.000+00:00",
  "hint": "string",
  "role": "string",
  "scope": "string",
  "scopes": [
    "self:read"
  ],
  "apiToken": "string"
}
{
  "code": "string",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "string",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "string",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "string",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "string",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "string",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "string",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "string",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "string",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}