Get sender
curl --request GET \
--url https://api.zavu.dev/v1/senders/{senderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zavu.dev/v1/senders/{senderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zavu.dev/v1/senders/{senderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zavu.dev/v1/senders/{senderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zavu.dev/v1/senders/{senderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zavu.dev/v1/senders/{senderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zavu.dev/v1/senders/{senderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "sender_12345",
"name": "Primary sender",
"phoneNumber": "+13125551212",
"channels": [
"sms",
"voice"
],
"isDefault": false,
"webhook": {
"url": "https://api.example.com/webhooks/zavu",
"events": [
"message.queued"
],
"active": true,
"signatureVersion": "v2",
"secret": "whsec_abc123..."
},
"whatsapp": {
"phoneNumberId": "<string>",
"displayPhoneNumber": "+14155551234",
"paymentStatus": {
"setupStatus": "COMPLETE",
"methodStatus": "VALID",
"canSendTemplates": true
}
},
"emailAddress": "noreply@yourdomain.com",
"emailReceivingEnabled": false,
"emailCatchAllEnabled": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"code": "invalid_request",
"message": "Phone number is invalid",
"details": {}
}{
"code": "invalid_request",
"message": "Phone number is invalid",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Sender details.
"sender_12345"
"Primary sender"
Phone number in E.164 format. Absent on a sender that has none: an email-only sender, or one created with only enableSmsOneway.
"+13125551212"
Channels this sender can actually send on right now: configured AND activated. Empty means the sender cannot send or receive anything yet: a phoneNumber alone does not enable SMS or voice, and a connected account that is not activated is left out, because every send on it is refused. Check this rather than inferring capability from phoneNumber or emailAddress, and turn a connected channel on with POST /v1/senders/{senderId}/channels/{channel}/activate.
["sms", "voice"]
Whether this sender is the project's default.
Webhook configuration for the sender.
Show child attributes
Show child attributes
WhatsApp Business Account information. Only present if a WABA is connected.
Show child attributes
Show child attributes
From-address for the email channel, if configured.
"noreply@yourdomain.com"
Whether inbound email receiving is enabled for this sender.
Whether catch-all receiving is enabled. When true (and emailReceivingEnabled is true), this sender receives email addressed to any local part at its domain, not just its own address. The original recipient is delivered in the message.inbound webhook's data.to.
curl --request GET \
--url https://api.zavu.dev/v1/senders/{senderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zavu.dev/v1/senders/{senderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zavu.dev/v1/senders/{senderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zavu.dev/v1/senders/{senderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zavu.dev/v1/senders/{senderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zavu.dev/v1/senders/{senderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zavu.dev/v1/senders/{senderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "sender_12345",
"name": "Primary sender",
"phoneNumber": "+13125551212",
"channels": [
"sms",
"voice"
],
"isDefault": false,
"webhook": {
"url": "https://api.example.com/webhooks/zavu",
"events": [
"message.queued"
],
"active": true,
"signatureVersion": "v2",
"secret": "whsec_abc123..."
},
"whatsapp": {
"phoneNumberId": "<string>",
"displayPhoneNumber": "+14155551234",
"paymentStatus": {
"setupStatus": "COMPLETE",
"methodStatus": "VALID",
"canSendTemplates": true
}
},
"emailAddress": "noreply@yourdomain.com",
"emailReceivingEnabled": false,
"emailCatchAllEnabled": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"code": "invalid_request",
"message": "Phone number is invalid",
"details": {}
}{
"code": "invalid_request",
"message": "Phone number is invalid",
"details": {}
}