Connect a channel
Connect a channel without buying anything, so a new project can send its first message from /v2. Returns every entry of the connected address (GET /v2/channels/{address}).
Where it lands. Channels are grouped: the entries of GET /v2/channels that share a v1SenderId are one group, and a group holds one connection per transport. The new channel joins the project’s default group when that group does not carry the transport yet; otherwise, or when the project has none, it starts a new group (the first group of a project becomes its default). So in a fresh project every channel connected here lands on the default and POST /v2/messages needs no from; a second email address or a second bot starts its own group and is used by passing its address as from.
Idempotent for sms_oneway and email: an address already connected answers 200 with its entries and changes nothing.
Active or not. One-way SMS is active at once. An email or Telegram connection the plan includes is switched on by itself; one that would cost money is listed with active: false and is switched on with POST /v2/channels/{address}/{type}/activate (same price and limits as on /v1).
A Telegram token that Telegram refuses leaves nothing behind.
curl --request POST \
--url https://api.zavu.dev/v2/channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "sms_oneway"
}
'{
"items": [
{
"address": "+13125551212",
"type": "sms",
"active": true,
"v1SenderId": "<string>"
}
]
}{
"items": [
{
"address": "+13125551212",
"type": "sms",
"active": true,
"v1SenderId": "<string>"
}
]
}{
"code": "invalid_request",
"message": "<string>",
"details": {
"errors": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
]
}
}{
"code": "invalid_request",
"message": "<string>",
"details": {
"errors": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
]
}
}{
"code": "kyb_required",
"message": "One-way SMS requires an approved business verification. Complete it at /kyb, or send on a channel that does not need it.",
"details": {
"type": "sms_oneway",
"dashboardUrl": "/kyb"
}
}{
"code": "email_domain_not_verified",
"message": "acme.com is not verified yet (status: pending), so noreply@acme.com cannot send yet.",
"details": {
"domain": "acme.com",
"emailDomainId": "emd_abc123",
"status": "pending",
"recommendation": "Publish the DNS records from GET /v2/email-domains/emd_abc123, then POST /v2/email-domains/emd_abc123/verify and retry."
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
- Option 1
- Option 2
- Option 3
What to connect. Only channels that need no purchase and no third-party signup are connected here: one-way SMS, an email address at a verified domain, a Telegram bot. Two-way SMS and voice come with a number (POST /v2/numbers); WhatsApp, Instagram and Messenger connect through Meta, from Accounts in the dashboard. Any of those types here is a 400 saying so.
sms_oneway Response
Already connected; nothing changed.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.zavu.dev/v2/channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "sms_oneway"
}
'{
"items": [
{
"address": "+13125551212",
"type": "sms",
"active": true,
"v1SenderId": "<string>"
}
]
}{
"items": [
{
"address": "+13125551212",
"type": "sms",
"active": true,
"v1SenderId": "<string>"
}
]
}{
"code": "invalid_request",
"message": "<string>",
"details": {
"errors": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
]
}
}{
"code": "invalid_request",
"message": "<string>",
"details": {
"errors": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
]
}
}{
"code": "kyb_required",
"message": "One-way SMS requires an approved business verification. Complete it at /kyb, or send on a channel that does not need it.",
"details": {
"type": "sms_oneway",
"dashboardUrl": "/kyb"
}
}{
"code": "email_domain_not_verified",
"message": "acme.com is not verified yet (status: pending), so noreply@acme.com cannot send yet.",
"details": {
"domain": "acme.com",
"emailDomainId": "emd_abc123",
"status": "pending",
"recommendation": "Publish the DNS records from GET /v2/email-domains/emd_abc123, then POST /v2/email-domains/emd_abc123/verify and retry."
}
}