Deactivate a transport
Switch the connection off. It stays connected, so activating it again needs no reconnection. The month already paid is not refunded.
curl --request POST \
--url https://api.zavu.dev/v2/channels/{address}/{type}/deactivate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zavu.dev/v2/channels/{address}/{type}/deactivate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zavu.dev/v2/channels/{address}/{type}/deactivate', 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/v2/channels/{address}/{type}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/v2/channels/{address}/{type}/deactivate"
req, _ := http.NewRequest("POST", 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.post("https://api.zavu.dev/v2/channels/{address}/{type}/deactivate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zavu.dev/v2/channels/{address}/{type}/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"address": "<string>",
"type": "whatsapp",
"channels": [
{
"address": "+13125551212",
"type": "sms",
"active": true,
"v1SenderId": "<string>"
}
],
"deactivated": true
}{
"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": "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>"
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
An address as GET /v2/channels lists it, URL-encoded (+ as %2B). Numbers match in any common formatting.
Transport to switch.
A channel whose connection has an on/off switch. sms, sms_oneway and voice are billed per message and per phone number, are always on, and have nothing to activate.
whatsapp, telegram, instagram, messenger, email Response
The transport is inactive.
A channel whose connection has an on/off switch. sms, sms_oneway and voice are billed per message and per phone number, are always on, and have nothing to activate.
whatsapp, telegram, instagram, messenger, email Every entry of the address after the change.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.zavu.dev/v2/channels/{address}/{type}/deactivate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zavu.dev/v2/channels/{address}/{type}/deactivate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zavu.dev/v2/channels/{address}/{type}/deactivate', 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/v2/channels/{address}/{type}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/v2/channels/{address}/{type}/deactivate"
req, _ := http.NewRequest("POST", 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.post("https://api.zavu.dev/v2/channels/{address}/{type}/deactivate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zavu.dev/v2/channels/{address}/{type}/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"address": "<string>",
"type": "whatsapp",
"channels": [
{
"address": "+13125551212",
"type": "sms",
"active": true,
"v1SenderId": "<string>"
}
],
"deactivated": true
}{
"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": "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>"
}
]
}
}