Browse Community Interaction

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, optional
    X-Correlation-ID schema
    {
        "type": "string",
        "format": "uuid"
    }
  • Origin — header, required
    Origin schema
    {
        "type": "string",
        "format": "uri"
    }

Request schema

application/x-www-form-urlencoded

application/x-www-form-urlencoded request schema
{
    "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

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

StatusDescription
200Accessible 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
401Generic unavailable HTML state; the grant remains fail-closed
422Request violates the public contract

422 schema

422 response 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.