Browse Community Interaction

beta · api · 0.1.0

Render or submit a Comment-bound hosted report form

POST /api/v1/community/comments/{commentId}/report

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"
    }
  • commentId — path, required
    commentId schema
    {
        "type": "string",
        "format": "uuid"
    }

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
        },
        "reason": {
            "type": "string",
            "enum": [
                "spam",
                "harassment",
                "hate",
                "violence",
                "sexual_content"
            ]
        }
    }
}

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",
    "reason": "spam"
}

Responses and errors

StatusDescription
200Accessible fixed-reason form or generic report-received HTML
401Generic unavailable HTML state; no grant or reporter details are exposed
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

Rendering does not consume the grant. A successful report consumes it; replay and duplicate reporting fail closed.