beta · api · 0.1.0
Read a Community Comment moderation state
GET /api/v1/community/comments/{commentId}/moderation
Capability Domain: Community Interaction
Authentication
projectCredential (moderation:read)
Scope: moderation:read
Parameters and request body
-
X-Correlation-ID— header, optionalX-Correlation-ID schema { "type": "string", "format": "uuid" } -
commentId— path, requiredcommentId schema { "type": "string", "format": "uuid" } -
resource_type— query, requiredresource_type schema { "type": "string", "maxLength": 120 } -
resource_id— query, requiredresource_id schema { "type": "string", "maxLength": 255 }
Responses and errors
| Status | Description |
|---|---|
200 | Current reversible moderation state |
401 | Invalid or revoked Project Credential |
403 | Project Credential lacks the required scope |
422 | Request violates the public contract |
200 schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"additionalProperties": false,
"required": [
"comment_id",
"state",
"reason"
],
"properties": {
"comment_id": {
"type": "string",
"format": "uuid"
},
"state": {
"type": "string",
"enum": [
"visible",
"restricted"
]
},
"reason": {
"type": [
"string",
"null"
],
"enum": [
"spam",
"harassment",
"hate",
"violence",
"sexual_content",
null
]
}
}
}
}
}
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"
}
}
}
}
}
200 example
{
"data": {
"comment_id": "51000000-0000-4000-8000-000000000001",
"state": "restricted",
"reason": "spam"
}
}
Idempotency
Safe read; repeated requests do not change moderation state.