beta · api · 0.1.0
Issue a resource-bound browser grant
POST /api/v1/browser-resource-grants
Capability Domain: Developer Tooling
Authentication
projectCredential (resource-grants:write)
Scope: resource-grants:write
Parameters and request body
-
X-Correlation-ID— header, optionalX-Correlation-ID schema { "type": "string", "format": "uuid" }
Request schema
application/json
{
"type": "object",
"additionalProperties": false,
"required": [
"platform_account_id",
"resource_type",
"resource_id",
"actions",
"origin"
],
"properties": {
"platform_account_id": {
"type": "string",
"format": "uuid"
},
"resource_type": {
"type": "string",
"maxLength": 120
},
"resource_id": {
"type": "string",
"maxLength": 255
},
"actions": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"uniqueItems": true,
"description": "Allowed Project Client scope, optionally followed by one /target qualifier that the consumer must match exactly.",
"items": {
"type": "string",
"maxLength": 120,
"pattern": "^[a-z][a-z0-9._-]*:[a-z][a-z0-9._-]*(/[a-zA-Z0-9][a-zA-Z0-9._-]*)?$"
}
},
"origin": {
"type": "string",
"format": "uri",
"maxLength": 2048
}
}
}
application/json request example
{
"platform_account_id": "30000000-0000-4000-8000-000000000003",
"resource_type": "article",
"resource_id": "article-42",
"actions": [
"comments:read",
"comments:write"
],
"origin": "https://app.example.test"
}
Responses and errors
| Status | Description |
|---|---|
201 | Single-use browser grant |
401 | Invalid or revoked Project Credential |
403 | Project Credential lacks the required scope |
422 | Request violates the public contract |
201 schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"token",
"expires_at"
],
"properties": {
"token": {
"type": "string"
},
"expires_at": {
"type": "string",
"format": "date-time"
}
}
}
}
}
401 schema
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message",
"retryable",
"correlation_id",
"details"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"correlation_id": {
"type": "string",
"format": "uuid"
},
"details": {
"type": "object"
}
}
}
}
}
403 schema
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message",
"retryable",
"correlation_id",
"details"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"correlation_id": {
"type": "string",
"format": "uuid"
},
"details": {
"type": "object"
}
}
}
}
}
422 schema
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message",
"retryable",
"correlation_id",
"details"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"correlation_id": {
"type": "string",
"format": "uuid"
},
"details": {
"type": "object"
}
}
}
}
}
201 example
{
"data": {
"token": "0000000000000000000000000000000000000000000000000000000000000000",
"expires_at": "2026-09-03T02:05:00Z"
}
}
Idempotency
Each authorization decision issues a new five-minute single-use grant.