beta · api · 0.1.0
Consume a Browser Resource Grant and render a read-only Comment thread
POST /api/v1/community/comments/embed
Capability Domain: Community Interaction
Authentication
No authentication required
Scope: None
Parameters and request body
-
X-Correlation-ID— header, optionalX-Correlation-ID schema { "type": "string", "format": "uuid" } -
Origin— header, requiredOrigin schema { "type": "string", "format": "uri" }
Request schema
application/x-www-form-urlencoded
{
"type": "object",
"additionalProperties": false,
"required": [
"token",
"project_client_id",
"resource_type",
"resource_id"
],
"properties": {
"token": {
"type": "string",
"minLength": 64,
"maxLength": 64
},
"project_client_id": {
"type": "string",
"format": "uuid"
},
"resource_type": {
"type": "string",
"maxLength": 120
},
"resource_id": {
"type": "string",
"maxLength": 255
}
}
}
application/x-www-form-urlencoded request example
{
"token": "0000000000000000000000000000000000000000000000000000000000000000",
"project_client_id": "40000000-0000-4000-8000-000000000004",
"resource_type": "article",
"resource_id": "article-42"
}
Responses and errors
| Status | Description |
|---|---|
200 | Accessible read-only HTML with at most 100 top-level Comments and 500 resource-scoped direct replies; a grant that also contains reactions:read adds batched aggregate counts for visible items |
401 | Generic unavailable HTML state; the grant remains fail-closed |
422 | Request violates the public contract |
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"
}
}
}
}
}
Idempotency
The Browser Resource Grant is single-use. A successful render consumes it and every replay fails closed.