Skip to main content
PATCH
/
v1
/
senders
/
{senderId}
Update sender
curl --request PATCH \
  --url https://api.zavu.dev/v1/senders/{senderId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "setAsDefault": true,
  "webhookUrl": "<string>",
  "webhookEvents": [
    "message.queued"
  ],
  "webhookActive": true,
  "emailReceivingEnabled": true
}
'
{
  "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
    }
  },
  "emailReceivingEnabled": false,
  "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.

Path Parameters

senderId
string
required

Body

application/json
name
string
setAsDefault
boolean
webhookUrl
string<uri> | null

HTTPS URL for webhook events. Set to null to remove webhook.

webhookEvents
enum<string>[]

Events to subscribe to.

Type of event that triggers the webhook.

Message lifecycle events:

  • message.queued: Message created and queued for sending. data.status = queued
  • message.sent: Message accepted by the provider. data.status = sent
  • message.delivered: Message delivered to recipient. data.status = delivered
  • message.failed: Message failed to send. data.status = failed

Inbound events:

  • message.inbound: New message received from a contact. Reactions are delivered as message.inbound with messageType='reaction'
  • message.unsupported: Received a message type that is not supported

Other events:

  • conversation.new: New conversation started with a contact
  • template.status_changed: WhatsApp template approval status changed
Available options:
message.queued,
message.sent,
message.delivered,
message.failed,
message.inbound,
message.unsupported,
conversation.new,
template.status_changed
webhookActive
boolean

Whether the webhook is active.

emailReceivingEnabled
boolean

Enable or disable inbound email receiving for this sender.

Response

Sender updated.

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.

emailReceivingEnabled
boolean
default:false

Whether inbound email receiving is enabled for this sender.

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