> ## 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 inbound SMS/MMS webhook (TextGrid)

> Inbound webhook called by TextGrid when an SMS or MMS is delivered to a Tether-provisioned number. Payload shape matches Twilio (AccountSid, MessageSid, Body, From, To, NumMedia, MediaUrl*). Responds with empty TwiML.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/webhook/textgrid/sms
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:
    post:
      tags:
        - Webhooks
      summary: Handle inbound SMS/MMS webhook (TextGrid)
      description: >-
        Inbound webhook called by TextGrid when an SMS or MMS is delivered to a
        Tether-provisioned number. Payload shape matches Twilio (AccountSid,
        MessageSid, Body, From, To, NumMedia, MediaUrl*). Responds with empty
        TwiML.
      operationId: post_webhook_textgrid_sms
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextGridInboundSmsRequest'
      responses:
        '200':
          description: >-
            Empty TwiML response acknowledging receipt. TextGrid persists the
            message + drives automation server-side; no TwiML is returned to the
            caller.
          content:
            application/xml:
              schema:
                type: string
              example: <?xml version="1.0" encoding="UTF-8"?><Response></Response>
components:
  schemas:
    TextGridInboundSmsRequest:
      type: object
      description: >-
        TextGrid inbound SMS/MMS payload. Shape matches Twilio — additional
        MediaUrlN / MediaContentTypeN fields appear when NumMedia > 0.
      properties:
        AccountSid:
          type: string
          description: TextGrid account identifier that owns the receiving number.
        MessageSid:
          type: string
          description: TextGrid-assigned message identifier.
        From:
          type: string
          description: Sender phone number in E.164.
        To:
          type: string
          description: Tether-provisioned TextGrid number that received the message.
        Body:
          type: string
          description: SMS/MMS text content.
        NumMedia:
          type: string
          description: Count of attached media items as a string; `0` for plain SMS.
        MediaUrl0:
          type: string
          description: >-
            URL of the first media attachment; additional `MediaUrlN` fields
            appear when NumMedia > 1.
        MediaContentType0:
          type: string
          description: MIME type of the first media attachment, e.g. `image/jpeg`.
      additionalProperties: true
      example:
        AccountSid: AC8a1d4e0012c3b4a55f7b1c2e8a
        MessageSid: TG5f7b1c2e8a1d4e0012c3b4a5
        From: '+14165550100'
        To: '+12362320246'
        Body: Picking up at 5pm, thanks!
        NumMedia: '0'

````