/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.
Authorization
apiKey API key provided in dashboard
In: header
Request Body
application/json
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.
1 <= items <= 32Optional 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.
items <= 32Optional capability restrictions for a partner-owned API token. Omit for unrestricted partner API access. Rejected for ordinary teams.
1 <= itemsResponse 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
}