WhatsApp Meta agent
Update Meta agent settings
Change any of the settings; omitted fields keep their value. Answering everyone needs a payment method in Meta Billing Hub; test mode (ALLOWLISTED_ONLY) does not.
PATCH
/
orgs
/
connections
/
{connection_id}
/
whatsapp
/
phone-numbers
/
{phone_number_id}
/
meta-agent
/
settings
Update Meta agent settings
curl --request PATCH \
--url https://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"handoff": {
"enabled": true,
"message": "<string>"
},
"followup": {
"enabled": true,
"followup_interval_in_seconds": 0,
"message": "<string>"
},
"never_say_phrases": [
"<string>"
]
}
'import requests
url = "https://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings"
payload = {
"handoff": {
"enabled": True,
"message": "<string>"
},
"followup": {
"enabled": True,
"followup_interval_in_seconds": 0,
"message": "<string>"
},
"never_say_phrases": ["<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({
handoff: {enabled: true, message: '<string>'},
followup: {enabled: true, followup_interval_in_seconds: 0, message: '<string>'},
never_say_phrases: ['<string>']
})
};
fetch('https://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings', 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.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings",
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([
'handoff' => [
'enabled' => true,
'message' => '<string>'
],
'followup' => [
'enabled' => true,
'followup_interval_in_seconds' => 0,
'message' => '<string>'
],
'never_say_phrases' => [
'<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://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings"
payload := strings.NewReader("{\n \"handoff\": {\n \"enabled\": true,\n \"message\": \"<string>\"\n },\n \"followup\": {\n \"enabled\": true,\n \"followup_interval_in_seconds\": 0,\n \"message\": \"<string>\"\n },\n \"never_say_phrases\": [\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://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"handoff\": {\n \"enabled\": true,\n \"message\": \"<string>\"\n },\n \"followup\": {\n \"enabled\": true,\n \"followup_interval_in_seconds\": 0,\n \"message\": \"<string>\"\n },\n \"never_say_phrases\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings")
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 \"handoff\": {\n \"enabled\": true,\n \"message\": \"<string>\"\n },\n \"followup\": {\n \"enabled\": true,\n \"followup_interval_in_seconds\": 0,\n \"message\": \"<string>\"\n },\n \"never_say_phrases\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"channel": "<string>",
"rollout": {
"enabled": true
},
"followup": {
"enabled": true,
"followup_interval_in_seconds": 0,
"message": "<string>"
},
"ai_audience": "EVERYONE",
"handoff": {
"enabled": true,
"message": "<string>",
"message_selection": "DEFAULT"
},
"never_say_phrases": [
"<string>"
]
}Path Parameters
Query Parameters
Body
application/jsonmultipart/form-data
Response
200 - application/json
Was this page helpful?
⌘I
Update Meta agent settings
curl --request PATCH \
--url https://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"handoff": {
"enabled": true,
"message": "<string>"
},
"followup": {
"enabled": true,
"followup_interval_in_seconds": 0,
"message": "<string>"
},
"never_say_phrases": [
"<string>"
]
}
'import requests
url = "https://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings"
payload = {
"handoff": {
"enabled": True,
"message": "<string>"
},
"followup": {
"enabled": True,
"followup_interval_in_seconds": 0,
"message": "<string>"
},
"never_say_phrases": ["<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({
handoff: {enabled: true, message: '<string>'},
followup: {enabled: true, followup_interval_in_seconds: 0, message: '<string>'},
never_say_phrases: ['<string>']
})
};
fetch('https://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings', 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.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings",
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([
'handoff' => [
'enabled' => true,
'message' => '<string>'
],
'followup' => [
'enabled' => true,
'followup_interval_in_seconds' => 0,
'message' => '<string>'
],
'never_say_phrases' => [
'<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://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings"
payload := strings.NewReader("{\n \"handoff\": {\n \"enabled\": true,\n \"message\": \"<string>\"\n },\n \"followup\": {\n \"enabled\": true,\n \"followup_interval_in_seconds\": 0,\n \"message\": \"<string>\"\n },\n \"never_say_phrases\": [\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://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"handoff\": {\n \"enabled\": true,\n \"message\": \"<string>\"\n },\n \"followup\": {\n \"enabled\": true,\n \"followup_interval_in_seconds\": 0,\n \"message\": \"<string>\"\n },\n \"never_say_phrases\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/settings")
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 \"handoff\": {\n \"enabled\": true,\n \"message\": \"<string>\"\n },\n \"followup\": {\n \"enabled\": true,\n \"followup_interval_in_seconds\": 0,\n \"message\": \"<string>\"\n },\n \"never_say_phrases\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"channel": "<string>",
"rollout": {
"enabled": true
},
"followup": {
"enabled": true,
"followup_interval_in_seconds": 0,
"message": "<string>"
},
"ai_audience": "EVERYONE",
"handoff": {
"enabled": true,
"message": "<string>",
"message_selection": "DEFAULT"
},
"never_say_phrases": [
"<string>"
]
}