A Sender resource of WhatsApp.
Create a new sender of WhatsApp.
Body
Required
-
The ID of this Sender prefixed with the channel, e.g.,
whatsapp:E.164 -
Configuration settings for creating a sender, e.g., {"waba_id": "1234567890", "verification_method": "sms"}
-
Webhook specific configurations, e.g., {"callback_url": "https://xxx", "callback_method": "POST", "fallback_url": "https://xxx", "fallback_method": "POST", "status_callback_url": "https://xxx", "status_callback_method": "POST"}
-
Sender profile specific configurations, e.g., {"name": "xxx", "about": "xxx", "address": "xxx", "description": "xxx", "emails": "xxx@xxx", "logo_url": "https://xxx", "vertical": "xxx", "websites": ["https://xxx", "..."]}
POST
/v2/Channels/Senders
curl \
--request POST 'https://messaging.twilio.com/v2/Channels/Senders' \
--user "username:password" \
--header "Content-Type: application/json" \
--data '{"sender_id":"whatsapp:+999999999XX","configuration":{"waba_id":"1234567XXX","verification_method":"sms"},"webhook":{"callback_url":"https://callback.com","callback_method":"POST","fallback_url":"https://fallback.com","fallback_method":"POST","status_callback_url":"https://statuscallback.com","status_callback_method":"POST"},"profile":{"name":"Example Profile Name","about":"This is an example about text.","address":"123 Example St, Example City, EX 12345","description":"This is an example description.","emails":[{"email":"example@example.com","label":"Email"},{"email":"example2@example.com","label":"Email"}],"logo_url":"https://logo_url.com","vertical":"Automotive","websites":[{"website":"https://website.com","label":"Website"},{"website":"http://website2.com","label":"Website"}]}}'
Request example
{
"sender_id": "whatsapp:+999999999XX",
"configuration": {
"waba_id": "1234567XXX",
"verification_method": "sms"
},
"webhook": {
"callback_url": "https://callback.com",
"callback_method": "POST",
"fallback_url": "https://fallback.com",
"fallback_method": "POST",
"status_callback_url": "https://statuscallback.com",
"status_callback_method": "POST"
},
"profile": {
"name": "Example Profile Name",
"about": "This is an example about text.",
"address": "123 Example St, Example City, EX 12345",
"description": "This is an example description.",
"emails": [
{
"email": "example@example.com",
"label": "Email"
},
{
"email": "example2@example.com",
"label": "Email"
}
],
"logo_url": "https://logo_url.com",
"vertical": "Automotive",
"websites": [
{
"website": "https://website.com",
"label": "Website"
},
{
"website": "http://website2.com",
"label": "Website"
}
]
}
}
Response examples (202)
{
"sid": "XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"status": "CREATING",
"sender_id": "whatsapp:+999999999XX",
"configuration": {
"waba_id": "1234567XXX",
"verification_method": "sms",
"verification_code": null,
"voice_application_sid": "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"webhook": {
"callback_url": "https://callback.com",
"callback_method": "POST",
"fallback_url": "https://fallback.com",
"fallback_method": "POST",
"status_callback_url": "https://statuscallback.com",
"status_callback_method": "POST"
},
"profile": {
"name": "Example Profile Name",
"about": "This is an example about text.",
"address": "123 Example St, Example City, EX 12345",
"description": "This is an example description.",
"emails": [
{
"email": "example@example.com",
"label": "Email"
},
{
"email": "example2@example.com",
"label": "Email"
}
],
"logo_url": "https://logo_url.com",
"vertical": "Automotive",
"websites": [
{
"website": "https://website.com",
"label": "Website"
},
{
"website": "http://website2.com",
"label": "Website"
}
]
}
}