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

# Submit a contact approval/rejection from the webchat widget

> Unauthenticated endpoint called from the webchat widget when a contact taps approve/reject on an approval card. The atomic transition only succeeds for pending CONTACT-type requests whose webchatId matches the supplied value; approvals trigger execution of the deferred tool and (on failure) record a failureReason.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/approval/respond
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/approval/respond:
    post:
      tags:
        - Approval
      summary: Submit a contact approval/rejection from the webchat widget
      description: >-
        Unauthenticated endpoint called from the webchat widget when a contact
        taps approve/reject on an approval card. The atomic transition only
        succeeds for pending CONTACT-type requests whose webchatId matches the
        supplied value; approvals trigger execution of the deferred tool and (on
        failure) record a failureReason.
      operationId: post_approval_respond
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovalRespondRequest'
      responses:
        '200':
          description: Approval response processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalRespondResponse'
        '400':
          description: Missing or invalid response value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalErrorResponse'
        '403':
          description: Webchat id does not match the approval request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalErrorResponse'
        '409':
          description: Approval request not found or already responded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalErrorResponse'
components:
  schemas:
    ApprovalRespondRequest:
      type: object
      properties:
        approvalRequestId:
          type: string
          description: Approval row `_id` returned in the pending-approvals list.
        webchatId:
          type: string
          description: >-
            Webchat session id used to authenticate the responder (when
            responding via the webchat surface).
        response:
          type: string
          enum:
            - approved
            - rejected
          description: '`approved` or `rejected`.'
      required:
        - approvalRequestId
        - webchatId
        - response
      additionalProperties: false
      example:
        approvalRequestId: 64d2f9c5e8a1d4e001a0b1c2
        webchatId: wc_8f3a1b2c4d5e6f70
        response: approved
    ApprovalRespondResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        status:
          type: string
          enum:
            - approved
            - rejected
            - failed
        result: {}
        failureReason:
          type: string
      required:
        - success
        - status
      additionalProperties: true
      example:
        success: true
        status: approved
        result:
          bookingId: bk_64a1b2c3d4e5f60012345678
          confirmedAt: '2026-04-22T10:14:00.000Z'
    ApprovalErrorResponse:
      type: object
      description: >-
        Error envelope for the Approval system. The internal approve/reject
        paths return `code` enums (`already_resolved`, `forbidden`, `not_found`)
        when a row was already consumed or the caller is not the owner; the
        public respond endpoint returns the same envelope.
      properties:
        error:
          type: string
        message:
          type: string
        code:
          type: string
        success:
          type: boolean
          enum:
            - false
      required:
        - error
      additionalProperties: true
      example:
        error: Approval already resolved
        code: already_resolved

````