v52

OpenAPI 3.1.0raw.githubusercontent.com2026-07-311,1941,9384.1 MB
Whatsapp messaging

Send a Whatsapp message

post/messages/whatsapp

Request body

fromstring required

Phone number in +E.164 format associated with Whatsapp account

messaging_profile_idstring uuid

Messaging profile ID - required if the 'from' number is not SMS-enabled

tostring required

Phone number in +E.164 format

type'WHATSAPP'

Message type - must be set to "WHATSAPP"

webhook_urlstring url

The URL where webhooks related to this message will be sent.

Example request

{
  "from": "+13125551234",
  "to": "+13125551234",
  "type": "WHATSAPP",
  "whatsapp_message": {
    "audio": {
      "link": "http://example.com/media.jpg"
    },
    "document": {
      "link": "http://example.com/media.jpg"
    },
    "image": {
      "link": "http://example.com/media.jpg"
    },
    "interactive": {
      "action": {
        "cards": [
          {
            "header": {
              "image": {
                "link": "http://example.com/media.jpg"
              },
              "video": {
                "link": "http://example.com/media.jpg"
              }
            }
          }
        ]
      },
      "header": {
        "document": {
          "link": "http://example.com/media.jpg"
        },
        "image": {
          "link": "http://example.com/media.jpg"
        },
        "video": {
          "link": "http://example.com/media.jpg"
        }
      }
    },
    "sticker": {
      "link": "http://example.com/media.jpg"
    },
    "template": {
      "language": {
        "code": "en_US",
        "policy": "deterministic"
      },
      "name": "order_confirmation",
      "template_id": "019cd44b-3a1c-781b-956e-bd33e9fd2ac6"
    },
    "text": {
      "body": "Hello from Telnyx!"
    },
    "video": {
      "link": "http://example.com/media.jpg"
    }
  }
}

Response

Successful operation

Example response

{
  "data": {
    "body": {
      "audio": {
        "link": "http://example.com/media.jpg"
      },
      "document": {
        "link": "http://example.com/media.jpg"
      },
      "image": {
        "link": "http://example.com/media.jpg"
      },
      "interactive": {
        "action": {
          "cards": [
            {
              "header": {
                "image": {
                  "link": "http://example.com/media.jpg"
                },
                "video": {
                  "link": "http://example.com/media.jpg"
                }
              }
            }
          ]
        },
        "header": {
          "document": {
            "link": "http://example.com/media.jpg"
          },
          "image": {
            "link": "http://example.com/media.jpg"
          },
          "video": {
            "link": "http://example.com/media.jpg"
          }
        }
      },
      "sticker": {
        "link": "http://example.com/media.jpg"
      },
      "template": {
        "language": {
          "code": "en_US",
          "policy": "deterministic"
        },
        "name": "order_confirmation",
        "template_id": "019cd44b-3a1c-781b-956e-bd33e9fd2ac6"
      },
      "text": {
        "body": "Hello from Telnyx!"
      },
      "video": {
        "link": "http://example.com/media.jpg"
      }
    },
    "direction": "outbound",
    "encoding": "utf-8",
    "id": "4031938e-60e4-4235-a8dd-0b1c55a23e7a",
    "messaging_profile_id": "4001781e-626f-4a41-a914-b1b682150f94",
    "organization_id": "9f61d8e1-7687-4d6d-9cae-9ff682985983",
    "record_type": "message",
    "to": [
      {
        "carrier": "Verizon Wireless",
        "line_type": "Wireless",
        "phone_number": "+13125551234",
        "status": "queued"
      }
    ],
    "type": "WHATSAPP",
    "wait_seconds": 0.5
  }
}