Submit a display name change
curl --request POST \
--url https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"display_name_request": {
"new_display_name": "Acme Support"
}
}
'import requests
url = "https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests"
payload = { "display_name_request": { "new_display_name": "Acme Support" } }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({display_name_request: {new_display_name: 'Acme Support'}})
};
fetch('https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests', 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://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'display_name_request' => [
'new_display_name' => 'Acme Support'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests"
payload := strings.NewReader("{\n \"display_name_request\": {\n \"new_display_name\": \"Acme Support\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name_request\": {\n \"new_display_name\": \"Acme Support\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name_request\": {\n \"new_display_name\": \"Acme Support\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "2b0f4a1e-7a58-4a15-b0c9-0d7f1a2b3c4d",
"whatsapp_config_id": "4a5b6c7d-8e9f-0a1b-2c3d-4e5f6a7b8c9d",
"requested_display_name": "Acme Support",
"previous_display_name": "+1 555-123-4567",
"status": "pending_review",
"meta_error_code": 123,
"meta_error_subcode": 123,
"meta_error_type": "<string>",
"meta_error_message": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"reviewed_at": "2023-11-07T05:31:56Z",
"applied_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}WhatsApp Display Names
Submit a display name change
Submits a new WhatsApp display name for review via Meta for this configuration.
Requirements:
- The WhatsApp configuration must be
production phone_number_idandaccess_tokenmust be present on the configuration- Only one active request (
submitted/pending_review) can exist at a time
POST
/
whatsapp_configs
/
{whatsapp_config_id}
/
display_name_requests
Submit a display name change
curl --request POST \
--url https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"display_name_request": {
"new_display_name": "Acme Support"
}
}
'import requests
url = "https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests"
payload = { "display_name_request": { "new_display_name": "Acme Support" } }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({display_name_request: {new_display_name: 'Acme Support'}})
};
fetch('https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests', 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://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'display_name_request' => [
'new_display_name' => 'Acme Support'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests"
payload := strings.NewReader("{\n \"display_name_request\": {\n \"new_display_name\": \"Acme Support\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name_request\": {\n \"new_display_name\": \"Acme Support\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/display_name_requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name_request\": {\n \"new_display_name\": \"Acme Support\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "2b0f4a1e-7a58-4a15-b0c9-0d7f1a2b3c4d",
"whatsapp_config_id": "4a5b6c7d-8e9f-0a1b-2c3d-4e5f6a7b8c9d",
"requested_display_name": "Acme Support",
"previous_display_name": "+1 555-123-4567",
"status": "pending_review",
"meta_error_code": 123,
"meta_error_subcode": 123,
"meta_error_type": "<string>",
"meta_error_message": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"reviewed_at": "2023-11-07T05:31:56Z",
"applied_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}Authorizations
Your project API key
Path Parameters
Body
application/json
Show child attributes
Show child attributes
Response
Display name request created
WhatsApp display name change request record
Show child attributes
Show child attributes
⌘I

