> ## 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 MMS webhook (Sinch)

> Inbound webhook called by the Sinch MMS JSON API when an MMS is delivered to a Tether-provisioned number. Acknowledges within 10 seconds and processes asynchronously: media is downloaded and re-uploaded to R2, then the message is appended to the contact's conversation.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/webhook/mms
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/mms:
    post:
      tags:
        - Webhooks
      summary: Handle inbound MMS webhook (Sinch)
      description: >-
        Inbound webhook called by the Sinch MMS JSON API when an MMS is
        delivered to a Tether-provisioned number. Acknowledges within 10 seconds
        and processes asynchronously: media is downloaded and re-uploaded to R2,
        then the message is appended to the contact's conversation.
      operationId: post_webhook_mms
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MmsWebhookRequest'
      responses:
        '200':
          description: Webhook accepted (immediate ack — processing continues async)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MmsWebhookAckResponse'
        '500':
          description: Webhook processing failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookErrorResponse'
components:
  schemas:
    MmsWebhookRequest:
      type: object
      properties:
        id:
          type: string
          description: >-
            Sinch-assigned MMS message id; echoed back in the ack for log
            correlation.
        origin:
          type: string
          description: >-
            Sinch traffic direction marker — `MMS_MO` for inbound
            (mobile-originated) MMS.
        from:
          type: string
          description: Sender phone number in E.164.
        to:
          type: string
          description: Tether-provisioned recipient number that received the MMS.
        body:
          type: string
          description: Optional text content sent alongside the media.
        media:
          description: >-
            Attached media items. Each is downloaded from Sinch and re-uploaded
            to R2 before persistence.
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                description: Sinch-hosted media URL (short-lived; fetched server-side).
              content_type:
                type: string
                description: MIME type of the attachment, e.g. `image/jpeg`.
              size:
                type: number
                description: Attachment size in bytes as reported by Sinch.
            additionalProperties: true
      additionalProperties: true
      example:
        id: 01K608PMMS001H41EQS64AH7CE
        origin: MMS_MO
        from: '+14165550100'
        to: '+12362320246'
        body: Photo of the issue
        media:
          - url: https://sinch-mms.s3.amazonaws.com/media/12345/image1.jpg
            content_type: image/jpeg
            size: 184221
    MmsWebhookAckResponse:
      type: object
      description: Immediate ack returned to Sinch for an inbound MMS.
      properties:
        message:
          type: string
        messageId:
          type: string
      required:
        - message
        - messageId
      additionalProperties: true
      example:
        message: MMS MO webhook received
        messageId: 01K608PMMS001H41EQS64AH7CE
    WebhookErrorResponse:
      type: object
      description: >-
        Error envelope used across provider webhook routes. Most failures only
        carry `error`; a few (ElevenLabs tool errors, ingress validation) add
        `success:false`, `message`, or a `code`. Many of these endpoints respond
        200 with `success:false` for recoverable cases (especially the
        ElevenLabs server tools) — only hard failures use 4xx/5xx.
      properties:
        error:
          type: string
        message:
          type: string
        success:
          type: boolean
          enum:
            - false
        code:
          type: string
        details:
          description: Optional diagnostic detail (stack snippet, validation issues, etc.).
      additionalProperties: true
      example:
        error: Webhook processing failed

````