Add contacts to an assistant's contact filter
curl --request POST \
--url https://api.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'business-id: <business-id>' \
--data '
{
"phone_numbers": [
"<string>"
],
"label": "<string>"
}
'import requests
url = "https://api.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries"
payload = {
"phone_numbers": ["<string>"],
"label": "<string>"
}
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'business-id': '<business-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({phone_numbers: ['<string>'], label: '<string>'})
};
fetch('https://api.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries', 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.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries",
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([
'phone_numbers' => [
'<string>'
],
'label' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"business-id: <business-id>"
],
]);
$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.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries"
payload := strings.NewReader("{\n \"phone_numbers\": [\n \"<string>\"\n ],\n \"label\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("business-id", "<business-id>")
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.post("https://api.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_numbers\": [\n \"<string>\"\n ],\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["business-id"] = '<business-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_numbers\": [\n \"<string>\"\n ],\n \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"added": [
{
"created": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number": "<string>",
"label": "<string>"
}
],
"already_listed": [
"<string>"
],
"invalid": [
"<string>"
]
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"code": "<string>"
}businesses
Add contacts to an assistant's contact filter
Adds up to 500 phone numbers to the allowlist or blocklist in one call. Numbers are stored in canonical E.164 form, so different spellings of one number are one entry. Adding a number that is already listed is not an error; the response reports it separately, along with any input that is not a usable phone number.
POST
/
api
/
v1
/
businesses
/
chatbots
/
{chatbot_id}
/
contact-filter
/
entries
Add contacts to an assistant's contact filter
curl --request POST \
--url https://api.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'business-id: <business-id>' \
--data '
{
"phone_numbers": [
"<string>"
],
"label": "<string>"
}
'import requests
url = "https://api.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries"
payload = {
"phone_numbers": ["<string>"],
"label": "<string>"
}
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'business-id': '<business-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({phone_numbers: ['<string>'], label: '<string>'})
};
fetch('https://api.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries', 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.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries",
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([
'phone_numbers' => [
'<string>'
],
'label' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"business-id: <business-id>"
],
]);
$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.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries"
payload := strings.NewReader("{\n \"phone_numbers\": [\n \"<string>\"\n ],\n \"label\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("business-id", "<business-id>")
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.post("https://api.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_numbers\": [\n \"<string>\"\n ],\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/businesses/chatbots/{chatbot_id}/contact-filter/entries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["business-id"] = '<business-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_numbers\": [\n \"<string>\"\n ],\n \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"added": [
{
"created": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number": "<string>",
"label": "<string>"
}
],
"already_listed": [
"<string>"
],
"invalid": [
"<string>"
]
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"code": "<string>"
}Authorizations
Headers
Body
application/json