cURL
curl --request POST \
--url https://api.fluents.ai/v1/numbers/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"example_context": {},
"outbound_only": true,
"label": "<string>",
"inbound_agent": {},
"description": "<string>"
}
'import requests
url = "https://api.fluents.ai/v1/numbers/update"
payload = {
"example_context": {},
"outbound_only": True,
"label": "<string>",
"inbound_agent": {},
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
example_context: {},
outbound_only: true,
label: '<string>',
inbound_agent: {},
description: '<string>'
})
};
fetch('https://api.fluents.ai/v1/numbers/update', 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.fluents.ai/v1/numbers/update",
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([
'example_context' => [
],
'outbound_only' => true,
'label' => '<string>',
'inbound_agent' => [
],
'description' => '<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.fluents.ai/v1/numbers/update"
payload := strings.NewReader("{\n \"example_context\": {},\n \"outbound_only\": true,\n \"label\": \"<string>\",\n \"inbound_agent\": {},\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.fluents.ai/v1/numbers/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"example_context\": {},\n \"outbound_only\": true,\n \"label\": \"<string>\",\n \"inbound_agent\": {},\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluents.ai/v1/numbers/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"example_context\": {},\n \"outbound_only\": true,\n \"label\": \"<string>\",\n \"inbound_agent\": {},\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"number": "+1234567890",
"example_context": {},
"active": true,
"label": "My Phone Number",
"inbound_agent_name": "Agent Name",
"outbound_only": false,
"telephony_provider": "twilio",
"description": "Business line for customer service",
"inbound_agent": "agent_123",
"telephony_account_connection": "550e8400-e29b-41d4-a716-446655440000"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 400
}{
"message": "<string>",
"error": "<string>",
"statusCode": 404
}Numbers
Update number
POST
/
v1
/
numbers
/
update
cURL
curl --request POST \
--url https://api.fluents.ai/v1/numbers/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"example_context": {},
"outbound_only": true,
"label": "<string>",
"inbound_agent": {},
"description": "<string>"
}
'import requests
url = "https://api.fluents.ai/v1/numbers/update"
payload = {
"example_context": {},
"outbound_only": True,
"label": "<string>",
"inbound_agent": {},
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
example_context: {},
outbound_only: true,
label: '<string>',
inbound_agent: {},
description: '<string>'
})
};
fetch('https://api.fluents.ai/v1/numbers/update', 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.fluents.ai/v1/numbers/update",
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([
'example_context' => [
],
'outbound_only' => true,
'label' => '<string>',
'inbound_agent' => [
],
'description' => '<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.fluents.ai/v1/numbers/update"
payload := strings.NewReader("{\n \"example_context\": {},\n \"outbound_only\": true,\n \"label\": \"<string>\",\n \"inbound_agent\": {},\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.fluents.ai/v1/numbers/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"example_context\": {},\n \"outbound_only\": true,\n \"label\": \"<string>\",\n \"inbound_agent\": {},\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluents.ai/v1/numbers/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"example_context\": {},\n \"outbound_only\": true,\n \"label\": \"<string>\",\n \"inbound_agent\": {},\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"number": "+1234567890",
"example_context": {},
"active": true,
"label": "My Phone Number",
"inbound_agent_name": "Agent Name",
"outbound_only": false,
"telephony_provider": "twilio",
"description": "Business line for customer service",
"inbound_agent": "agent_123",
"telephony_account_connection": "550e8400-e29b-41d4-a716-446655440000"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 400
}{
"message": "<string>",
"error": "<string>",
"statusCode": 404
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Body
application/json
Response
Example:
"550e8400-e29b-41d4-a716-446655440000"
Example:
"550e8400-e29b-41d4-a716-446655440000"
Example:
"+1234567890"
Example:
true
Example:
"My Phone Number"
Example:
"Agent Name"
Example:
false
Example:
"twilio"
Example:
"Business line for customer service"
Example:
"agent_123"
Example:
"550e8400-e29b-41d4-a716-446655440000"
Was this page helpful?
⌘I

