# Add a comment

## `POST /v1/records/{id}/comments`

The caller must act as a user. Requires the `write` scope.

```json
{
  "tags": [
    "Comments"
  ],
  "operationId": "create-comment",
  "summary": "Add a comment",
  "description": "The caller must act as a user. Requires the `write` scope.",
  "x-retainer-scope": "write",
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "description": "Retainer identifier.",
      "example": "d2c0648c-2994-4f16-bdf1-a0136be6037d",
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    },
    {
      "in": "header",
      "name": "Idempotency-Key",
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "description": "Reuse the same key with the same request to retry."
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "body": {
              "type": "string",
              "minLength": 1,
              "maxLength": 10000
            }
          },
          "required": [
            "body"
          ],
          "additionalProperties": false
        },
        "example": {
          "body": "Loop in legal before renewal."
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Successful response.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Comment"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "default": {
      "$ref": "#/components/responses/ApiError"
    }
  }
}
```

[Full OpenAPI contract](/openapi.json)
