Skip to main content
POST
/
v1
/
senders
Create sender
curl --request POST \
  --url https://api.zavu.dev/v1/senders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "phoneNumber": "<string>",
  "setAsDefault": false,
  "webhookUrl": "<string>",
  "webhookEvents": [
    "message.queued"
  ]
}
'
{
  "id": "sender_12345",
  "name": "Primary sender",
  "phoneNumber": "+13125551212",
  "isDefault": false,
  "webhook": {
    "url": "https://api.example.com/webhooks/zavu",
    "events": [
      "message.queued"
    ],
    "active": true,
    "secret": "whsec_abc123..."
  },
  "whatsapp": {
    "phoneNumberId": "<string>",
    "displayPhoneNumber": "+14155551234",
    "paymentStatus": {
      "setupStatus": "COMPLETE",
      "methodStatus": "VALID",
      "canSendTemplates": true
    }
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
phoneNumber
string
required
setAsDefault
boolean
default:false
webhookUrl
string<uri>

HTTPS URL for webhook events.

webhookEvents
enum<string>[]

Events to subscribe to.

Type of event that triggers the webhook. Note: Reactions are delivered as message.inbound with messageType='reaction'.

Available options:
message.queued,
message.sent,
message.delivered,
message.failed,
message.inbound,
message.unsupported,
conversation.new,
template.status_changed

Response

Sender created.

id
string
required
Example:

"sender_12345"

name
string
required
Example:

"Primary sender"

phoneNumber
string
required

Phone number in E.164 format.

Example:

"+13125551212"

isDefault
boolean
default:false

Whether this sender is the project's default.

webhook
object

Webhook configuration for the sender.

whatsapp
object

WhatsApp Business Account information. Only present if a WABA is connected.

createdAt
string<date-time>
updatedAt
string<date-time>