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

# Handle TextGrid SMS delivery status callback

> Status callback called by TextGrid for delivered/undelivered messages. Updates the corresponding Message document and broadcasts a socket event to the organization.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/webhook/textgrid/sms-status
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/webhook/textgrid/sms-status:
    post:
      tags:
        - Webhooks
      summary: Handle TextGrid SMS delivery status callback
      description: >-
        Status callback called by TextGrid for delivered/undelivered messages.
        Updates the corresponding Message document and broadcasts a socket event
        to the organization.
      operationId: post_webhook_textgrid_sms_status
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextGridSmsStatusRequest'
      responses:
        '200':
          description: Plain-text acknowledgement (TextGrid only checks 2xx).
          content:
            text/plain:
              schema:
                type: string
                example: OK
components:
  schemas:
    TextGridSmsStatusRequest:
      type: object
      description: >-
        TextGrid delivery status callback. Only `delivered` and `undelivered`
        are sent.
      properties:
        MessageSid:
          type: string
          description: TextGrid message identifier whose status is being reported.
        SmsSid:
          type: string
          description: Twilio-compatible alias of `MessageSid`; usually identical.
        MessageStatus:
          type: string
          description: 'Delivery state: `delivered` or `undelivered`.'
        From:
          type: string
          description: Tether-provisioned TextGrid number the message was sent from.
        To:
          type: string
          description: Recipient phone number for the outbound message.
        ErrorCode:
          type: string
          description: TextGrid error code when delivery failed.
        ErrorMessage:
          type: string
          description: Human-readable error description paired with `ErrorCode`.
      additionalProperties: true
      example:
        MessageSid: TG5f7b1c2e8a1d4e0012c3b4a5
        SmsSid: TG5f7b1c2e8a1d4e0012c3b4a5
        MessageStatus: delivered
        From: '+12362320246'
        To: '+14165550100'

````