Browse Community Interaction

beta · api · 0.1.0

Submit one structured Comment report

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

Capability Domain: Community Interaction

Authentication

projectCredential (reports:write)

Scope: reports:write

Parameters and request body

  • X-Correlation-ID — header, optional
    X-Correlation-ID schema
    {
        "type": "string",
        "format": "uuid"
    }
  • commentId — path, required
    commentId schema
    {
        "type": "string",
        "format": "uuid"
    }

Request schema

application/json

application/json request schema
{
    "type": "object",
    "additionalProperties": false,
    "required": [
        "platform_account_id",
        "resource_type",
        "resource_id",
        "reason",
        "idempotency_key"
    ],
    "properties": {
        "platform_account_id": {
            "type": "string",
            "format": "uuid"
        },
        "resource_type": {
            "type": "string",
            "maxLength": 120,
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$"
        },
        "resource_id": {
            "type": "string",
            "maxLength": 255
        },
        "reason": {
            "type": "string",
            "enum": [
                "spam",
                "harassment",
                "hate",
                "violence",
                "sexual_content"
            ]
        },
        "idempotency_key": {
            "type": "string",
            "maxLength": 180
        }
    }
}

application/json request example

application/json request example
{
    "platform_account_id": "30000000-0000-4000-8000-000000000003",
    "resource_type": "article",
    "resource_id": "article-42",
    "reason": "spam",
    "idempotency_key": "article-42-report-1"
}

Responses and errors

StatusDescription
200Existing report returned after an idempotent replay
201Structured report received
401Invalid or revoked Project Credential
403Project Credential lacks the required scope
422Request violates the public contract

200 schema

200 response schema
{
    "type": "object",
    "required": [
        "data"
    ],
    "properties": {
        "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
                "id",
                "comment_id",
                "reason",
                "status",
                "decision",
                "decided_at",
                "created_at"
            ],
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid"
                },
                "comment_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "reason": {
                    "type": "string",
                    "enum": [
                        "spam",
                        "harassment",
                        "hate",
                        "violence",
                        "sexual_content"
                    ]
                },
                "status": {
                    "type": "string",
                    "enum": [
                        "received",
                        "resolved"
                    ]
                },
                "decision": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "enum": [
                        "no_action",
                        "restricted",
                        null
                    ]
                },
                "decided_at": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "format": "date-time"
                },
                "created_at": {
                    "type": "string",
                    "format": "date-time"
                }
            }
        }
    }
}

201 schema

201 response schema
{
    "type": "object",
    "required": [
        "data"
    ],
    "properties": {
        "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
                "id",
                "comment_id",
                "reason",
                "status",
                "decision",
                "decided_at",
                "created_at"
            ],
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid"
                },
                "comment_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "reason": {
                    "type": "string",
                    "enum": [
                        "spam",
                        "harassment",
                        "hate",
                        "violence",
                        "sexual_content"
                    ]
                },
                "status": {
                    "type": "string",
                    "enum": [
                        "received",
                        "resolved"
                    ]
                },
                "decision": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "enum": [
                        "no_action",
                        "restricted",
                        null
                    ]
                },
                "decided_at": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "format": "date-time"
                },
                "created_at": {
                    "type": "string",
                    "format": "date-time"
                }
            }
        }
    }
}

401 schema

401 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"
                }
            }
        }
    }
}

403 schema

403 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"
                }
            }
        }
    }
}

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"
                }
            }
        }
    }
}

200 example

200 response example
{
    "data": {
        "id": "53000000-0000-4000-8000-000000000001",
        "comment_id": "51000000-0000-4000-8000-000000000001",
        "reason": "spam",
        "status": "received",
        "created_at": "2026-09-07T02:00:00Z"
    }
}

201 example

201 response example
{
    "data": {
        "id": "53000000-0000-4000-8000-000000000001",
        "comment_id": "51000000-0000-4000-8000-000000000001",
        "reason": "spam",
        "status": "received",
        "created_at": "2026-09-07T02:00:00Z"
    }
}

Idempotency

Repeating the same Project Client idempotency key and input returns the existing report; changed input is rejected.