Browse Community Interaction

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, 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
        },
        "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
        }
    }
}

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",
    "body": "A useful comment."
}

Responses and errors

StatusDescription
200Accessible plain-text Comment form or generic Comment-posted HTML
401Generic unavailable HTML state; no grant, author or Comment 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 Comment consumes it once; replay fails closed.