Archive WhatsApp sender
curl --request POST \
--url https://api.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive"
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive', 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.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "wsnd_01HZY3K9M2QJ4R7V8T0N5B6C7D",
"sender": "919812345678",
"display_name": "Acme Support",
"phone_number_id": "1234567890",
"waba_id": "9876543210",
"status": "archived",
"quality_rating": "GREEN",
"messaging_tier": "TIER_1K",
"provider": "trustsignal",
"metadata": {},
"created_at": "2026-09-01T10:15:00Z",
"updated_at": "2026-09-01T13:45:00Z"
}{
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"error": {
"code": "forbidden",
"message": "This role cannot manage WhatsApp numbers"
}
}{
"error": {
"code": "not_found",
"message": "WhatsApp sender not found"
}
}{
"error": {
"code": "conflict",
"message": "This sender is bound to a live campaign. Unbind or complete those campaigns first."
}
}WhatsApp Numbers
Archive WhatsApp sender
Archives a WhatsApp sender (soft delete); refused while the sender is still bound to a live campaign. Restricted to workspace admins (customer_admin / platform_admin); an API key carrying the scope is also accepted (admin-tier write). Scope whatsapp_numbers:write.
POST
/
whatsapp
/
senders
/
{sender_id}
/
archive
Archive WhatsApp sender
curl --request POST \
--url https://api.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive"
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive', 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.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/whatsapp/senders/{sender_id}/archive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "wsnd_01HZY3K9M2QJ4R7V8T0N5B6C7D",
"sender": "919812345678",
"display_name": "Acme Support",
"phone_number_id": "1234567890",
"waba_id": "9876543210",
"status": "archived",
"quality_rating": "GREEN",
"messaging_tier": "TIER_1K",
"provider": "trustsignal",
"metadata": {},
"created_at": "2026-09-01T10:15:00Z",
"updated_at": "2026-09-01T13:45:00Z"
}{
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"error": {
"code": "forbidden",
"message": "This role cannot manage WhatsApp numbers"
}
}{
"error": {
"code": "not_found",
"message": "WhatsApp sender not found"
}
}{
"error": {
"code": "conflict",
"message": "This sender is bound to a live campaign. Unbind or complete those campaigns first."
}
}Authorizations
ApiKeyAuthBearerAuth
Path Parameters
The WhatsApp sender id.
Response
The archived WhatsApp sender.
Available options:
pending_signup, provisioning, active, flagged, failed, archived 
