> ## 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.

# Toggle a checklist step on an intake item

> Flips a checklist boolean (`reviewed`, `priced`, `approved`,
`responded`) and records the timestamp. The item must be in
`intake_open` status. Caller must be the item owner or an admin.




## OpenAPI

````yaml /openapi/private/specs/services/services-integrations.yml post /intake/toggle-checklist
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/toggle-checklist:
    post:
      tags:
        - Intake
      summary: Toggle a checklist step on an intake item
      description: |
        Flips a checklist boolean (`reviewed`, `priced`, `approved`,
        `responded`) and records the timestamp. The item must be in
        `intake_open` status. Caller must be the item owner or an admin.
      operationId: intakeToggleChecklist
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToggleChecklistRequest'
            example:
              item_id: 4821
              step: reviewed
      responses:
        '200':
          description: Step toggled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToggleChecklistResponse'
              examples:
                checked:
                  summary: Step marked done
                  value:
                    success: true
                    data:
                      step: reviewed
                      done: true
                      done_at: Feb 19, 2:30 PM
                unchecked:
                  summary: Step unmarked
                  value:
                    success: true
                    data:
                      step: reviewed
                      done: false
                      done_at: ''
        '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 step 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 edit 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 toggle failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPError'
              example:
                code: toggle_failed
                message: Failed to toggle checklist step
                data:
                  status: 500
      security:
        - wpNonce: []
components:
  schemas:
    ToggleChecklistRequest:
      type: object
      required:
        - item_id
        - step
      properties:
        item_id:
          type: integer
          description: Intake item post ID
          examples:
            - 4821
        step:
          $ref: '#/components/schemas/ChecklistStep'
    ToggleChecklistResponse:
      type: object
      properties:
        success:
          type: boolean
          const: true
        data:
          type: object
          required:
            - step
            - done
            - done_at
          properties:
            step:
              $ref: '#/components/schemas/ChecklistStep'
            done:
              type: boolean
              description: New state after toggle
              examples:
                - true
            done_at:
              type: string
              description: |
                Formatted timestamp (`M j, g:i A`) when marked done,
                or empty string when unmarked
              examples:
                - Feb 19, 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
    ChecklistStep:
      type: string
      enum:
        - reviewed
        - priced
        - approved
        - responded
      description: Valid checklist step identifiers
  securitySchemes:
    wpNonce:
      type: apiKey
      in: header
      name: X-WP-Nonce
      description: WordPress REST nonce (`wp_rest` action)

````