Phone numbers owned by an agent
curl --request GET \
--url https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers \
--header 'Authorization: Bearer <token>'import requests
url = "https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers', 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://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"items": [
{
"phone_number_uuid": "9bcb8f00-c0c5-4ee1-9b75-ad1e87a2bd8b",
"number": "+12084439178",
"country_code": "US",
"location": "Sassari, Sardegna",
"is_external": true,
"compliance": {
"requirements": [
{
"name": "<string>",
"description": "<string>"
}
]
},
"capabilities": {
"voice": true,
"sms": true,
"mms": true,
"fax": true,
"emergency": true,
"local_calling": true
},
"channel_settings": {
"voice": {
"enabled": true,
"channel_limit": 123,
"whitelisted_destinations": [
"US"
]
},
"sms": {
"enabled": true,
"channel_limit": 123,
"whitelisted_destinations": [
"US"
]
},
"inbound": {
"enabled": true,
"channel_limit": 123
}
},
"billing": {
"monthly_fee": 123,
"currency": "EUR"
},
"bindings": {
"call": {
"bound": true,
"agent_uuid": "<string>",
"agent_name": "<string>"
},
"sms": {
"bound": true,
"agent_uuid": "<string>",
"agent_name": "<string>"
},
"whatsapp": {
"bound": true,
"agent_uuid": "<string>",
"agent_name": "<string>"
}
},
"purchased_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"count": 123
}
}Agents
Phone numbers owned by an agent
Returns the full phone-number records bound to this agent on any channel (call, SMS, WhatsApp). Same shape as /api/v1/phone-numbers, scoped to the agent. Only includes numbers in your owned inventory — for external numbers (e.g. WhatsApp Business lines), use /api/v1/agents//channels.
GET
/
api
/
v1
/
agents
/
{uuid}
/
phone-numbers
Phone numbers owned by an agent
curl --request GET \
--url https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers \
--header 'Authorization: Bearer <token>'import requests
url = "https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers', 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://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/agents/{uuid}/phone-numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"items": [
{
"phone_number_uuid": "9bcb8f00-c0c5-4ee1-9b75-ad1e87a2bd8b",
"number": "+12084439178",
"country_code": "US",
"location": "Sassari, Sardegna",
"is_external": true,
"compliance": {
"requirements": [
{
"name": "<string>",
"description": "<string>"
}
]
},
"capabilities": {
"voice": true,
"sms": true,
"mms": true,
"fax": true,
"emergency": true,
"local_calling": true
},
"channel_settings": {
"voice": {
"enabled": true,
"channel_limit": 123,
"whitelisted_destinations": [
"US"
]
},
"sms": {
"enabled": true,
"channel_limit": 123,
"whitelisted_destinations": [
"US"
]
},
"inbound": {
"enabled": true,
"channel_limit": 123
}
},
"billing": {
"monthly_fee": 123,
"currency": "EUR"
},
"bindings": {
"call": {
"bound": true,
"agent_uuid": "<string>",
"agent_name": "<string>"
},
"sms": {
"bound": true,
"agent_uuid": "<string>",
"agent_name": "<string>"
},
"whatsapp": {
"bound": true,
"agent_uuid": "<string>",
"agent_name": "<string>"
}
},
"purchased_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"count": 123
}
}Authorizations
Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"
Path Parameters
Update a single procedure (and replace its steps if provided)Channels and phone numbers for an agent
⌘I