beta · api · 0.1.0
Render or submit a resource-bound hosted Comment form
POST /api/v1/community/comments/create
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
},
"body": {
"type": "string",
"minLength": 1,
"maxLength": 4000
}
}
}
application/x-www-form-urlencoded request example
{
"token": "0000000000000000000000000000000000000000000000000000000000000000",
"project_client_id": "40000000-0000-4000-8000-000000000004",
"resource_type": "article",
"resource_id": "article-42",
"body": "A useful comment."
}
Responses and errors
| Status | Description |
|---|---|
200 | Accessible plain-text Comment form or generic Comment-posted HTML |
401 | Generic unavailable HTML state; no grant, author or Comment details are exposed |
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
Rendering does not consume the grant. A successful Comment consumes it once; replay fails closed.