> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sagescreen.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a comment to an intake item

> Appends a comment to the item's `intake_comments` JSON meta.
Body is sanitized and truncated to 1 000 characters.
Item must be `intake_open`. Caller must be owner or admin.




## OpenAPI

````yaml /openapi/private/specs/services/services-integrations.yml post /intake/add-comment
openapi: 3.1.0
info:
  title: SageScreen — Intake & Pipedrive Integrations
  version: 1.0.0
servers:
  - url: https://{domain}/wp-json/sagescreen/v1
    description: WordPress REST API
    variables:
      domain:
        default: sagescreen.app
security: []
tags:
  - name: Intake
    description: Sales intake item endpoints
  - name: Account Created
    description: |
      Find-or-create person, org, and deal in Pipedrive.
      Fired for four WP events:
      - Demo signup (candidate, no WP user)
      - Trial account created (council_admin, new council)
      - Paid account created (council_admin, new council)
      - Council user added (any role added to existing council)
  - name: Quote Sync
    description: |
      Advance the Pipedrive deal stage.
      Fired for two WP events:
      - Demo completed (candidate views results for first time)
      - Trial complete (council upgrades from trial to paid)
paths:
  /intake/add-comment:
    post:
      tags:
        - Intake
      summary: Add a comment to an intake item
      description: |
        Appends a comment to the item's `intake_comments` JSON meta.
        Body is sanitized and truncated to 1 000 characters.
        Item must be `intake_open`. Caller must be owner or admin.
      operationId: intakeAddComment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddCommentRequest'
            example:
              item_id: 4821
              comment: Spoke with the customer — they need a revised quote by Friday.
      responses:
        '200':
          description: Comment added
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddCommentResponse'
              example:
                success: true
                data:
                  author_name: John Doe
                  body: >-
                    Spoke with the customer — they need a revised quote by
                    Friday.
                  created_at: Feb 19, 2026 2:30 PM
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPError'
              examples:
                missingParams:
                  summary: Required fields missing
                  value:
                    code: missing_params
                    message: item_id and comment are required
                    data:
                      status: 400
                readonly:
                  summary: Item is closed or escalated
                  value:
                    code: readonly
                    message: This item is read-only
                    data:
                      status: 400
        '403':
          description: Not the owner and not an admin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPError'
              example:
                code: forbidden
                message: You do not have permission to comment on this item
                data:
                  status: 403
        '404':
          description: Intake item not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPError'
              example:
                code: not_found
                message: Intake item not found
                data:
                  status: 404
        '500':
          description: Internal write failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPError'
              example:
                code: comment_failed
                message: Failed to add comment
                data:
                  status: 500
      security:
        - wpNonce: []
components:
  schemas:
    AddCommentRequest:
      type: object
      required:
        - item_id
        - comment
      properties:
        item_id:
          type: integer
          description: Intake item post ID
          examples:
            - 4821
        comment:
          type: string
          maxLength: 1000
          description: Comment body (sanitized, truncated to 1 000 chars)
          examples:
            - Spoke with the customer — they need a revised quote by Friday.
    AddCommentResponse:
      type: object
      properties:
        success:
          type: boolean
          const: true
        data:
          type: object
          required:
            - author_name
            - body
            - created_at
          properties:
            author_name:
              type: string
              examples:
                - John Doe
            body:
              type: string
              examples:
                - Spoke with the customer — they need a revised quote by Friday.
            created_at:
              type: string
              description: Formatted as `M j, Y g:i A` (NOT ISO 8601)
              examples:
                - Feb 19, 2026 2:30 PM
    WPError:
      type: object
      description: Standard WordPress REST API error envelope
      required:
        - code
        - message
        - data
      properties:
        code:
          type: string
          description: Machine-readable error code
          examples:
            - not_found
        message:
          type: string
          description: Human-readable error message
          examples:
            - Intake item not found
        data:
          type: object
          required:
            - status
          properties:
            status:
              type: integer
              description: HTTP status code
              examples:
                - 404
  securitySchemes:
    wpNonce:
      type: apiKey
      in: header
      name: X-WP-Nonce
      description: WordPress REST nonce (`wp_rest` action)

````