curl -X POST https://api.magpipe.ai/functions/v1/manage-call-whitelist \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"caller_number": "+16045551234",
"forward_to": "+16045559876",
"label": "Kyler'\''s son"
}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/manage-call-whitelist',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
agent_id: '3f2504e0-4f89-11d3-9a0c-0305e82c3301',
caller_number: '+16045551234',
forward_to: '+16045559876',
label: "Kyler's son",
}),
}
);
const { entry } = await response.json();
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/manage-call-whitelist',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'agent_id': '3f2504e0-4f89-11d3-9a0c-0305e82c3301',
'caller_number': '+16045551234',
'forward_to': '+16045559876',
'label': "Kyler's son",
}
)
entry = response.json()['entry']
{
"entry": {
"id": "a1b2c3d4-0000-0000-0000-000000000001",
"caller_number": "+16045551234",
"forward_to": "+16045559876",
"label": "Kyler's son",
"created_at": "2026-03-15T08:00:00Z"
}
}
{
"error": {
"code": "duplicate",
"message": "A whitelist entry for this caller number already exists on this agent"
}
}
{
"error": {
"code": "invalid_param",
"message": "caller_number and forward_to must be in E.164 format (e.g. +16045551234)"
}
}
Call Whitelist
Add Whitelist Entry
Add a call forwarding rule to an agent’s whitelist
POST
/
manage-call-whitelist
curl -X POST https://api.magpipe.ai/functions/v1/manage-call-whitelist \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"caller_number": "+16045551234",
"forward_to": "+16045559876",
"label": "Kyler'\''s son"
}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/manage-call-whitelist',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
agent_id: '3f2504e0-4f89-11d3-9a0c-0305e82c3301',
caller_number: '+16045551234',
forward_to: '+16045559876',
label: "Kyler's son",
}),
}
);
const { entry } = await response.json();
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/manage-call-whitelist',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'agent_id': '3f2504e0-4f89-11d3-9a0c-0305e82c3301',
'caller_number': '+16045551234',
'forward_to': '+16045559876',
'label': "Kyler's son",
}
)
entry = response.json()['entry']
{
"entry": {
"id": "a1b2c3d4-0000-0000-0000-000000000001",
"caller_number": "+16045551234",
"forward_to": "+16045559876",
"label": "Kyler's son",
"created_at": "2026-03-15T08:00:00Z"
}
}
{
"error": {
"code": "duplicate",
"message": "A whitelist entry for this caller number already exists on this agent"
}
}
{
"error": {
"code": "invalid_param",
"message": "caller_number and forward_to must be in E.164 format (e.g. +16045551234)"
}
}
Creates a new whitelist entry. When an inbound call matches the
caller_number, it is blind-forwarded to forward_to without invoking the AI agent. The call is still recorded and logged.
Request Body
string
required
UUID of the agent to add the whitelist entry to.Example:
3f2504e0-4f89-11d3-9a0c-0305e82c3301string
required
The inbound caller number to match, in E.164 format.Example:
+16045551234string
required
The destination phone number to forward the call to, in E.164 format.Example:
+16045559876string
Optional human-readable label for this entry.Example:
Kyler's sonResponse
Returns the created whitelist entry on success (201 Created).
object
curl -X POST https://api.magpipe.ai/functions/v1/manage-call-whitelist \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"caller_number": "+16045551234",
"forward_to": "+16045559876",
"label": "Kyler'\''s son"
}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/manage-call-whitelist',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
agent_id: '3f2504e0-4f89-11d3-9a0c-0305e82c3301',
caller_number: '+16045551234',
forward_to: '+16045559876',
label: "Kyler's son",
}),
}
);
const { entry } = await response.json();
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/manage-call-whitelist',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'agent_id': '3f2504e0-4f89-11d3-9a0c-0305e82c3301',
'caller_number': '+16045551234',
'forward_to': '+16045559876',
'label': "Kyler's son",
}
)
entry = response.json()['entry']
{
"entry": {
"id": "a1b2c3d4-0000-0000-0000-000000000001",
"caller_number": "+16045551234",
"forward_to": "+16045559876",
"label": "Kyler's son",
"created_at": "2026-03-15T08:00:00Z"
}
}
{
"error": {
"code": "duplicate",
"message": "A whitelist entry for this caller number already exists on this agent"
}
}
{
"error": {
"code": "invalid_param",
"message": "caller_number and forward_to must be in E.164 format (e.g. +16045551234)"
}
}
⌘I