Channels
Update WhatsApp business profile
Use only for requested edits to the discovered WhatsApp channel profile. The native provider update may affect the public business profile. Read profile first and again after an uncertain result before retrying; no idempotent provider receipt is claimed. profilePictureHandle must come from an existing provider upload; MCP has no profile image upload flow. Does not change channel OAuth permissions. Requires channels:manage:write.
PATCH
/
channels
/
{channelId}
/
whatsapp
/
profile
Update WhatsApp business profile
curl --request PATCH \
--url https://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"about": "<string>",
"address": "<string>",
"description": "<string>",
"email": "<string>",
"vertical": "<string>",
"profilePictureHandle": "<string>",
"websites": [
"<string>"
]
}
'import requests
url = "https://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile"
payload = {
"about": "<string>",
"address": "<string>",
"description": "<string>",
"email": "<string>",
"vertical": "<string>",
"profilePictureHandle": "<string>",
"websites": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
about: '<string>',
address: '<string>',
description: '<string>',
email: '<string>',
vertical: '<string>',
profilePictureHandle: '<string>',
websites: ['<string>']
})
};
fetch('https://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile', 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://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'about' => '<string>',
'address' => '<string>',
'description' => '<string>',
'email' => '<string>',
'vertical' => '<string>',
'profilePictureHandle' => '<string>',
'websites' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile"
payload := strings.NewReader("{\n \"about\": \"<string>\",\n \"address\": \"<string>\",\n \"description\": \"<string>\",\n \"email\": \"<string>\",\n \"vertical\": \"<string>\",\n \"profilePictureHandle\": \"<string>\",\n \"websites\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"about\": \"<string>\",\n \"address\": \"<string>\",\n \"description\": \"<string>\",\n \"email\": \"<string>\",\n \"vertical\": \"<string>\",\n \"profilePictureHandle\": \"<string>\",\n \"websites\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"about\": \"<string>\",\n \"address\": \"<string>\",\n \"description\": \"<string>\",\n \"email\": \"<string>\",\n \"vertical\": \"<string>\",\n \"profilePictureHandle\": \"<string>\",\n \"websites\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"channelId": "<string>",
"phoneNumberId": "<string>",
"profile": {
"websites": [
"<string>"
],
"about": "<string>",
"address": "<string>",
"description": "<string>",
"email": "<string>",
"vertical": "<string>",
"profilePictureUrl": "<string>"
}
}{
"error": {
"code": "M2M_AUTH_INSUFFICIENT_SCOPE",
"message": "M2M credential does not have required scope.",
"details": {
"requiredScopes": [
"conversations:write"
],
"missingScopes": [
"conversations:write"
]
}
}
}Authorizations
Server-side tenant-scoped credential created from Build > API Keys.
Path Parameters
Stored channel.id from list_channels or get_channel. Provider page, phone, account and WABA IDs are not this ID.
Pattern:
^[a-fA-F0-9]{24}$Body
application/json
⌘I
Update WhatsApp business profile
curl --request PATCH \
--url https://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"about": "<string>",
"address": "<string>",
"description": "<string>",
"email": "<string>",
"vertical": "<string>",
"profilePictureHandle": "<string>",
"websites": [
"<string>"
]
}
'import requests
url = "https://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile"
payload = {
"about": "<string>",
"address": "<string>",
"description": "<string>",
"email": "<string>",
"vertical": "<string>",
"profilePictureHandle": "<string>",
"websites": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
about: '<string>',
address: '<string>',
description: '<string>',
email: '<string>',
vertical: '<string>',
profilePictureHandle: '<string>',
websites: ['<string>']
})
};
fetch('https://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile', 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://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'about' => '<string>',
'address' => '<string>',
'description' => '<string>',
'email' => '<string>',
'vertical' => '<string>',
'profilePictureHandle' => '<string>',
'websites' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile"
payload := strings.NewReader("{\n \"about\": \"<string>\",\n \"address\": \"<string>\",\n \"description\": \"<string>\",\n \"email\": \"<string>\",\n \"vertical\": \"<string>\",\n \"profilePictureHandle\": \"<string>\",\n \"websites\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"about\": \"<string>\",\n \"address\": \"<string>\",\n \"description\": \"<string>\",\n \"email\": \"<string>\",\n \"vertical\": \"<string>\",\n \"profilePictureHandle\": \"<string>\",\n \"websites\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.visitoai.com/m2m/v1/channels/{channelId}/whatsapp/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"about\": \"<string>\",\n \"address\": \"<string>\",\n \"description\": \"<string>\",\n \"email\": \"<string>\",\n \"vertical\": \"<string>\",\n \"profilePictureHandle\": \"<string>\",\n \"websites\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"channelId": "<string>",
"phoneNumberId": "<string>",
"profile": {
"websites": [
"<string>"
],
"about": "<string>",
"address": "<string>",
"description": "<string>",
"email": "<string>",
"vertical": "<string>",
"profilePictureUrl": "<string>"
}
}{
"error": {
"code": "M2M_AUTH_INSUFFICIENT_SCOPE",
"message": "M2M credential does not have required scope.",
"details": {
"requiredScopes": [
"conversations:write"
],
"missingScopes": [
"conversations:write"
]
}
}
}