v47

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-181,0851,7264.5 MB
Whatsapp messaging

Send a Whatsapp message

post/messages/whatsapp

Request body

fromstring required

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

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.

messaging_profile_idstring uuid

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

Example request

{
  "from": "+13125551234",
  "to": "+13125551234",
  "whatsapp_message": {
    "audio": {
      "link": "http://example.com/media.jpg"
    },
    "document": {
      "link": "http://example.com/media.jpg"
    },
    "image": {
      "link": "http://example.com/media.jpg"
    },
    "sticker": {
      "link": "http://example.com/media.jpg"
    },
    "video": {
      "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"
        }
      }
    },
    "text": {
      "body": "Hello from Telnyx!"
    },
    "template": {
      "template_id": "019cd44b-3a1c-781b-956e-bd33e9fd2ac6",
      "name": "order_confirmation",
      "language": {
        "policy": "deterministic",
        "code": "en_US"
      }
    }
  },
  "type": "WHATSAPP"
}

Response

Successful operation

Example response

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