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

# Respond to a pending CREDIT_APPROVAL or CLARIFICATION waitpoint

> Resumes the suspended run. A duplicate response to an already-`COMPLETED`/`EXPIRED` waitpoint is a no-op guarded on `Waitpoint.status` (00-master-spec.md §4 scenario 9).



## OpenAPI

````yaml /openapi.json post /api/v1/waitpoints/{waitpointId}/respond
openapi: 3.1.0
info:
  title: VyomFlow API
  version: 1.0.0
  description: >-
    Internal REST surface (S1–S6) exposed as reference documentation. This is
    the S8 minimum-fallback scope (Submission Requirement #13) — generated
    directly from the same Zod contracts the Route Handlers validate against,
    not a hand-maintained duplicate. Auth documented here is the app's own Clerk
    bearer scheme; see the public API-key section for the versioned public
    surface, where shipped.
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: http://localhost:3000
security: []
paths:
  /api/v1/waitpoints/{waitpointId}/respond:
    post:
      tags:
        - Waitpoints
      summary: Respond to a pending CREDIT_APPROVAL or CLARIFICATION waitpoint
      description: >-
        Resumes the suspended run. A duplicate response to an
        already-`COMPLETED`/`EXPIRED` waitpoint is a no-op guarded on
        `Waitpoint.status` (00-master-spec.md §4 scenario 9).
      parameters:
        - schema:
            type: string
            minLength: 1
          required: true
          name: waitpointId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - CREDIT_APPROVAL
                    approved:
                      type: boolean
                  required:
                    - kind
                    - approved
                - type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - CLARIFICATION
                    answer:
                      type: string
                      minLength: 1
                      maxLength: 2000
                  required:
                    - kind
                    - answer
      responses:
        '200':
          description: Waitpoint resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Waitpoint'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Not found (non-leaking — see above).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - ClerkBearer: []
components:
  schemas:
    Waitpoint:
      oneOf:
        - type: object
          properties:
            id:
              type: string
            agentRunId:
              type: string
            kind:
              type: string
              enum:
                - CREDIT_APPROVAL
            status:
              type: string
              enum:
                - PENDING
                - COMPLETED
                - EXPIRED
            requestPayload:
              type: object
              properties:
                toolName:
                  type: string
                estimatedCredits:
                  type: number
                  minimum: 0
                threshold:
                  type: number
                  minimum: 0
              required:
                - toolName
                - estimatedCredits
                - threshold
            resolvedPayload:
              type:
                - object
                - 'null'
              properties:
                approved:
                  type: boolean
                respondedAt:
                  type: string
              required:
                - approved
                - respondedAt
            expiresAt:
              type: string
            resolvedAt:
              type:
                - string
                - 'null'
          required:
            - id
            - agentRunId
            - kind
            - status
            - requestPayload
            - resolvedPayload
            - expiresAt
            - resolvedAt
        - type: object
          properties:
            id:
              type: string
            agentRunId:
              type: string
            kind:
              type: string
              enum:
                - CLARIFICATION
            status:
              type: string
              enum:
                - PENDING
                - COMPLETED
                - EXPIRED
            requestPayload:
              type: object
              properties:
                question:
                  type: string
                options:
                  type: array
                  items:
                    type: string
              required:
                - question
            resolvedPayload:
              type:
                - object
                - 'null'
              properties:
                answer:
                  type: string
                respondedAt:
                  type: string
              required:
                - answer
                - respondedAt
            expiresAt:
              type: string
            resolvedAt:
              type:
                - string
                - 'null'
          required:
            - id
            - agentRunId
            - kind
            - status
            - requestPayload
            - resolvedPayload
            - expiresAt
            - resolvedAt
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    ClerkBearer:
      type: http
      scheme: bearer
      description: >-
        Clerk session token, `Authorization: Bearer <token>`. This documents the
        app's own internal auth as of S1-S6 — see S8-public-api-bonus.md for the
        fallback scope this doc covers, and the public API-key scheme's own page
        once the full scope ships.

````