Send a Whatsapp message
Sends a WhatsApp message using a Telnyx WhatsApp-enabled number. The message body, interactive elements, media, location, and reaction content are specified in the whatsapp_message field. Delivery progress and final disposition are reported asynchronously through messaging webhooks.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.messages.sendWhatsapp({
from: '+13125551234',
to: '+13125551234',
whatsapp_message: {},
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.messages.send_whatsapp(
from_="+13125551234",
to="+13125551234",
whatsapp_message={},
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Messages.SendWhatsapp(context.TODO(), telnyx.MessageSendWhatsappParams{
From: "+13125551234",
To: "+13125551234",
WhatsappMessage: telnyx.WhatsappMessageContentParam{},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.messages.MessageSendWhatsappParams;
import com.telnyx.sdk.models.messages.MessageSendWhatsappResponse;
import com.telnyx.sdk.models.messages.WhatsappMessageContent;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
MessageSendWhatsappParams params = MessageSendWhatsappParams.builder()
.from("+13125551234")
.to("+13125551234")
.whatsappMessage(WhatsappMessageContent.builder().build())
.build();
MessageSendWhatsappResponse response = client.messages().sendWhatsapp(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.messages.send_whatsapp(from: "+13125551234", to: "+13125551234", whatsapp_message: {})
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->messages->sendWhatsapp(
from: '+13125551234',
to: '+13125551234',
whatsappMessage: [
'audio' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'bizOpaqueCallbackData' => 'biz_opaque_callback_data',
'contacts' => [
[
'addresses' => [
[
'city' => 'city',
'country' => 'country',
'countryCode' => 'country_code',
'state' => 'state',
'street' => 'street',
'type' => 'type',
'zip' => 'zip',
],
],
'birthday' => 'birthday',
'emails' => [['email' => 'email', 'type' => 'type']],
'name' => 'name',
'org' => [
'company' => 'company',
'department' => 'department',
'title' => 'title',
],
'phones' => [
['phone' => 'phone', 'type' => 'type', 'waID' => 'wa_id']
],
'urls' => [['type' => 'type', 'url' => 'url']],
],
],
'document' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'image' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'interactive' => [
'action' => [
'button' => 'button',
'buttons' => [
['reply' => ['id' => 'id', 'title' => 'title'], 'type' => 'reply']
],
'cards' => [
[
'action' => [
'catalogID' => 'catalog_id',
'productRetailerID' => 'product_retailer_id',
],
'body' => ['text' => 'text'],
'cardIndex' => 0,
'header' => [
'image' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'type' => 'image',
'video' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
],
'type' => 'cta_url',
],
],
'catalogID' => 'catalog_id',
'mode' => 'mode',
'name' => 'name',
'parameters' => ['displayText' => 'display_text', 'url' => 'url'],
'productRetailerID' => 'product_retailer_id',
'sections' => [
[
'productItems' => [
['productRetailerID' => 'product_retailer_id']
],
'rows' => [
[
'id' => 'id',
'description' => 'description',
'title' => 'title',
],
],
'title' => 'title',
],
],
],
'body' => ['text' => 'text'],
'footer' => ['text' => 'text'],
'header' => [
'document' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'image' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'subText' => 'sub_text',
'text' => 'text',
'video' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
],
'type' => 'cta_url',
],
'location' => [
'address' => 'address',
'latitude' => 'latitude',
'longitude' => 'longitude',
'name' => 'name',
],
'reaction' => ['emoji' => 'emoji', 'messageID' => 'message_id'],
'sticker' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'template' => [
'components' => [
[
'index' => 0,
'parameters' => [['text' => 'text', 'type' => 'text']],
'subType' => 'quick_reply',
'type' => 'header',
],
],
'language' => ['code' => 'en_US', 'policy' => 'deterministic'],
'name' => 'order_confirmation',
'templateID' => '019cd44b-3a1c-781b-956e-bd33e9fd2ac6',
],
'text' => ['body' => 'Hello from Telnyx!', 'previewURL' => true],
'type' => 'audio',
'video' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
],
messagingProfileID: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
type: 'WHATSAPP',
webhookURL: 'webhook_url',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx messages send-whatsapp \
--api-key 'My API Key' \
--from +13125551234 \
--to +13125551234 \
--whatsapp-message '{}'curl --request POST \
--url https://api.telnyx.com/v2/messages/whatsapp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "+13125551234",
"to": "+13125551234",
"whatsapp_message": {
"audio": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"document": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"sticker": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"interactive": {
"action": {
"name": "<string>",
"button": "<string>",
"buttons": [
{
"type": "reply",
"reply": {
"title": "<string>",
"id": "<string>"
}
}
],
"catalog_id": "<string>",
"product_retailer_id": "<string>",
"sections": [
{
"product_items": [
{
"product_retailer_id": "<string>"
}
],
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"title": "<string>"
}
],
"mode": "<string>",
"parameters": {
"display_text": "<string>",
"url": "<string>"
},
"cards": [
{
"card_index": 123,
"type": "cta_url",
"header": {
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
}
},
"body": {
"text": "<string>"
},
"action": {
"product_retailer_id": "<string>",
"catalog_id": "<string>"
}
}
]
},
"body": {
"text": "<string>"
},
"footer": {
"text": "<string>"
},
"header": {
"document": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"text": "<string>",
"sub_text": "<string>"
}
},
"location": {
"latitude": "<string>",
"longitude": "<string>",
"name": "<string>",
"address": "<string>"
},
"contacts": [
{
"addresses": [
{
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"country_code": "<string>",
"type": "<string>"
}
],
"birthday": "<string>",
"emails": [
{
"email": "<string>",
"type": "<string>"
}
],
"name": "<string>",
"org": {
"company": "<string>",
"department": "<string>",
"title": "<string>"
},
"phones": [
{
"phone": "<string>",
"type": "<string>",
"wa_id": "<string>"
}
],
"urls": [
{
"url": "<string>",
"type": "<string>"
}
]
}
],
"reaction": {
"message_id": "<string>",
"emoji": "<string>"
},
"biz_opaque_callback_data": "<string>",
"template": {
"template_id": "019cd44b-3a1c-781b-956e-bd33e9fd2ac6",
"name": "order_confirmation",
"components": [
{
"index": 123,
"parameters": [
{
"text": "<string>"
}
]
}
]
}
},
"type": "WHATSAPP",
"webhook_url": "<string>",
"messaging_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"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",
"from": {
"phone_number": "<string>",
"status": "received",
"carrier": "<string>",
"line_type": "Wireline"
},
"to": [
{
"phone_number": "+13125551234",
"status": "queued",
"carrier": "Verizon Wireless",
"line_type": "Wireless"
}
],
"body": {
"audio": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"document": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"sticker": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"interactive": {
"type": "cta_url",
"action": {
"name": "<string>",
"button": "<string>",
"buttons": [
{
"type": "reply",
"reply": {
"title": "<string>",
"id": "<string>"
}
}
],
"catalog_id": "<string>",
"product_retailer_id": "<string>",
"sections": [
{
"product_items": [
{
"product_retailer_id": "<string>"
}
],
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"title": "<string>"
}
],
"mode": "<string>",
"parameters": {
"display_text": "<string>",
"url": "<string>"
},
"cards": [
{
"card_index": 123,
"type": "cta_url",
"header": {
"type": "image",
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
}
},
"body": {
"text": "<string>"
},
"action": {
"product_retailer_id": "<string>",
"catalog_id": "<string>"
}
}
]
},
"body": {
"text": "<string>"
},
"footer": {
"text": "<string>"
},
"header": {
"document": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"text": "<string>",
"sub_text": "<string>"
}
},
"location": {
"latitude": "<string>",
"longitude": "<string>",
"name": "<string>",
"address": "<string>"
},
"contacts": [
{
"addresses": [
{
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"country_code": "<string>",
"type": "<string>"
}
],
"birthday": "<string>",
"emails": [
{
"email": "<string>",
"type": "<string>"
}
],
"name": "<string>",
"org": {
"company": "<string>",
"department": "<string>",
"title": "<string>"
},
"phones": [
{
"phone": "<string>",
"type": "<string>",
"wa_id": "<string>"
}
],
"urls": [
{
"url": "<string>",
"type": "<string>"
}
]
}
],
"reaction": {
"message_id": "<string>",
"emoji": "<string>"
},
"biz_opaque_callback_data": "<string>",
"type": "audio",
"text": {
"body": "Hello from Telnyx!",
"preview_url": false
},
"template": {
"template_id": "019cd44b-3a1c-781b-956e-bd33e9fd2ac6",
"name": "order_confirmation",
"language": {
"code": "en_US",
"policy": "deterministic"
},
"components": [
{
"type": "header",
"sub_type": "quick_reply",
"index": 123,
"parameters": [
{
"type": "text",
"text": "<string>"
}
]
}
]
}
},
"encoding": "utf-8",
"received_at": "2023-11-07T05:31:56Z",
"wait_seconds": 0.5
}
}{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "/data/attributes/phone_number",
"parameter": "string"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Whatsapp message body
Phone number in +E.164 format associated with Whatsapp account
"+13125551234"
Phone number in +E.164 format
"+13125551234"
Show child attributes
Show child attributes
Message type - must be set to "WHATSAPP"
WHATSAPP "WHATSAPP"
The URL where webhooks related to this message will be sent.
Messaging profile ID - required if the 'from' number is not SMS-enabled
Response
Successful operation
Show child attributes
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.messages.sendWhatsapp({
from: '+13125551234',
to: '+13125551234',
whatsapp_message: {},
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.messages.send_whatsapp(
from_="+13125551234",
to="+13125551234",
whatsapp_message={},
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Messages.SendWhatsapp(context.TODO(), telnyx.MessageSendWhatsappParams{
From: "+13125551234",
To: "+13125551234",
WhatsappMessage: telnyx.WhatsappMessageContentParam{},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.messages.MessageSendWhatsappParams;
import com.telnyx.sdk.models.messages.MessageSendWhatsappResponse;
import com.telnyx.sdk.models.messages.WhatsappMessageContent;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
MessageSendWhatsappParams params = MessageSendWhatsappParams.builder()
.from("+13125551234")
.to("+13125551234")
.whatsappMessage(WhatsappMessageContent.builder().build())
.build();
MessageSendWhatsappResponse response = client.messages().sendWhatsapp(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.messages.send_whatsapp(from: "+13125551234", to: "+13125551234", whatsapp_message: {})
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->messages->sendWhatsapp(
from: '+13125551234',
to: '+13125551234',
whatsappMessage: [
'audio' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'bizOpaqueCallbackData' => 'biz_opaque_callback_data',
'contacts' => [
[
'addresses' => [
[
'city' => 'city',
'country' => 'country',
'countryCode' => 'country_code',
'state' => 'state',
'street' => 'street',
'type' => 'type',
'zip' => 'zip',
],
],
'birthday' => 'birthday',
'emails' => [['email' => 'email', 'type' => 'type']],
'name' => 'name',
'org' => [
'company' => 'company',
'department' => 'department',
'title' => 'title',
],
'phones' => [
['phone' => 'phone', 'type' => 'type', 'waID' => 'wa_id']
],
'urls' => [['type' => 'type', 'url' => 'url']],
],
],
'document' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'image' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'interactive' => [
'action' => [
'button' => 'button',
'buttons' => [
['reply' => ['id' => 'id', 'title' => 'title'], 'type' => 'reply']
],
'cards' => [
[
'action' => [
'catalogID' => 'catalog_id',
'productRetailerID' => 'product_retailer_id',
],
'body' => ['text' => 'text'],
'cardIndex' => 0,
'header' => [
'image' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'type' => 'image',
'video' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
],
'type' => 'cta_url',
],
],
'catalogID' => 'catalog_id',
'mode' => 'mode',
'name' => 'name',
'parameters' => ['displayText' => 'display_text', 'url' => 'url'],
'productRetailerID' => 'product_retailer_id',
'sections' => [
[
'productItems' => [
['productRetailerID' => 'product_retailer_id']
],
'rows' => [
[
'id' => 'id',
'description' => 'description',
'title' => 'title',
],
],
'title' => 'title',
],
],
],
'body' => ['text' => 'text'],
'footer' => ['text' => 'text'],
'header' => [
'document' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'image' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'subText' => 'sub_text',
'text' => 'text',
'video' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
],
'type' => 'cta_url',
],
'location' => [
'address' => 'address',
'latitude' => 'latitude',
'longitude' => 'longitude',
'name' => 'name',
],
'reaction' => ['emoji' => 'emoji', 'messageID' => 'message_id'],
'sticker' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
'template' => [
'components' => [
[
'index' => 0,
'parameters' => [['text' => 'text', 'type' => 'text']],
'subType' => 'quick_reply',
'type' => 'header',
],
],
'language' => ['code' => 'en_US', 'policy' => 'deterministic'],
'name' => 'order_confirmation',
'templateID' => '019cd44b-3a1c-781b-956e-bd33e9fd2ac6',
],
'text' => ['body' => 'Hello from Telnyx!', 'previewURL' => true],
'type' => 'audio',
'video' => [
'caption' => 'caption',
'filename' => 'filename',
'link' => 'http://example.com/media.jpg',
'voice' => true,
],
],
messagingProfileID: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
type: 'WHATSAPP',
webhookURL: 'webhook_url',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx messages send-whatsapp \
--api-key 'My API Key' \
--from +13125551234 \
--to +13125551234 \
--whatsapp-message '{}'curl --request POST \
--url https://api.telnyx.com/v2/messages/whatsapp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "+13125551234",
"to": "+13125551234",
"whatsapp_message": {
"audio": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"document": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"sticker": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"interactive": {
"action": {
"name": "<string>",
"button": "<string>",
"buttons": [
{
"type": "reply",
"reply": {
"title": "<string>",
"id": "<string>"
}
}
],
"catalog_id": "<string>",
"product_retailer_id": "<string>",
"sections": [
{
"product_items": [
{
"product_retailer_id": "<string>"
}
],
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"title": "<string>"
}
],
"mode": "<string>",
"parameters": {
"display_text": "<string>",
"url": "<string>"
},
"cards": [
{
"card_index": 123,
"type": "cta_url",
"header": {
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
}
},
"body": {
"text": "<string>"
},
"action": {
"product_retailer_id": "<string>",
"catalog_id": "<string>"
}
}
]
},
"body": {
"text": "<string>"
},
"footer": {
"text": "<string>"
},
"header": {
"document": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"text": "<string>",
"sub_text": "<string>"
}
},
"location": {
"latitude": "<string>",
"longitude": "<string>",
"name": "<string>",
"address": "<string>"
},
"contacts": [
{
"addresses": [
{
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"country_code": "<string>",
"type": "<string>"
}
],
"birthday": "<string>",
"emails": [
{
"email": "<string>",
"type": "<string>"
}
],
"name": "<string>",
"org": {
"company": "<string>",
"department": "<string>",
"title": "<string>"
},
"phones": [
{
"phone": "<string>",
"type": "<string>",
"wa_id": "<string>"
}
],
"urls": [
{
"url": "<string>",
"type": "<string>"
}
]
}
],
"reaction": {
"message_id": "<string>",
"emoji": "<string>"
},
"biz_opaque_callback_data": "<string>",
"template": {
"template_id": "019cd44b-3a1c-781b-956e-bd33e9fd2ac6",
"name": "order_confirmation",
"components": [
{
"index": 123,
"parameters": [
{
"text": "<string>"
}
]
}
]
}
},
"type": "WHATSAPP",
"webhook_url": "<string>",
"messaging_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"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",
"from": {
"phone_number": "<string>",
"status": "received",
"carrier": "<string>",
"line_type": "Wireline"
},
"to": [
{
"phone_number": "+13125551234",
"status": "queued",
"carrier": "Verizon Wireless",
"line_type": "Wireless"
}
],
"body": {
"audio": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"document": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"sticker": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"interactive": {
"type": "cta_url",
"action": {
"name": "<string>",
"button": "<string>",
"buttons": [
{
"type": "reply",
"reply": {
"title": "<string>",
"id": "<string>"
}
}
],
"catalog_id": "<string>",
"product_retailer_id": "<string>",
"sections": [
{
"product_items": [
{
"product_retailer_id": "<string>"
}
],
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"title": "<string>"
}
],
"mode": "<string>",
"parameters": {
"display_text": "<string>",
"url": "<string>"
},
"cards": [
{
"card_index": 123,
"type": "cta_url",
"header": {
"type": "image",
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
}
},
"body": {
"text": "<string>"
},
"action": {
"product_retailer_id": "<string>",
"catalog_id": "<string>"
}
}
]
},
"body": {
"text": "<string>"
},
"footer": {
"text": "<string>"
},
"header": {
"document": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"image": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"video": {
"link": "http://example.com/media.jpg",
"caption": "<string>",
"filename": "<string>",
"voice": true
},
"text": "<string>",
"sub_text": "<string>"
}
},
"location": {
"latitude": "<string>",
"longitude": "<string>",
"name": "<string>",
"address": "<string>"
},
"contacts": [
{
"addresses": [
{
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"country_code": "<string>",
"type": "<string>"
}
],
"birthday": "<string>",
"emails": [
{
"email": "<string>",
"type": "<string>"
}
],
"name": "<string>",
"org": {
"company": "<string>",
"department": "<string>",
"title": "<string>"
},
"phones": [
{
"phone": "<string>",
"type": "<string>",
"wa_id": "<string>"
}
],
"urls": [
{
"url": "<string>",
"type": "<string>"
}
]
}
],
"reaction": {
"message_id": "<string>",
"emoji": "<string>"
},
"biz_opaque_callback_data": "<string>",
"type": "audio",
"text": {
"body": "Hello from Telnyx!",
"preview_url": false
},
"template": {
"template_id": "019cd44b-3a1c-781b-956e-bd33e9fd2ac6",
"name": "order_confirmation",
"language": {
"code": "en_US",
"policy": "deterministic"
},
"components": [
{
"type": "header",
"sub_type": "quick_reply",
"index": 123,
"parameters": [
{
"type": "text",
"text": "<string>"
}
]
}
]
}
},
"encoding": "utf-8",
"received_at": "2023-11-07T05:31:56Z",
"wait_seconds": 0.5
}
}{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "/data/attributes/phone_number",
"parameter": "string"
}
}
]
}