Update Current Agent Availability
curl --request PUT \
--url http://localhost:8080/api/v1/agents/me/availability \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "idle"
}
'import requests
url = "http://localhost:8080/api/v1/agents/me/availability"
payload = { "source": "idle" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({source: 'idle'})
};
fetch('http://localhost:8080/api/v1/agents/me/availability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/agents/me/availability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'source' => 'idle'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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 := "http://localhost:8080/api/v1/agents/me/availability"
payload := strings.NewReader("{\n \"source\": \"idle\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("http://localhost:8080/api/v1/agents/me/availability")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"idle\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/agents/me/availability")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"idle\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 1,
"created_at": "2025-08-28T10:00:00Z",
"updated_at": "2025-08-28T10:00:00Z",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"type": "agent",
"availability_status": "online",
"phone_number_country_code": "US",
"phone_number": "1234567890",
"avatar_url": "/avatars/agent1.jpg",
"enabled": true,
"last_active_at": "2025-08-28T10:00:00Z",
"last_login_at": "2025-08-28T10:00:00Z",
"roles": [
"admin"
],
"permissions": [
"conversations:read"
],
"custom_attributes": {},
"teams": [
{
"id": 1,
"name": "Support Team",
"emoji": "🛠️"
}
],
"api_key": "<string>",
"api_key_last_used_at": "2023-11-07T05:31:56Z"
}
}Agents & Teams
Update Current Agent Availability
PUT
/
api
/
v1
/
agents
/
me
/
availability
Update Current Agent Availability
curl --request PUT \
--url http://localhost:8080/api/v1/agents/me/availability \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "idle"
}
'import requests
url = "http://localhost:8080/api/v1/agents/me/availability"
payload = { "source": "idle" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({source: 'idle'})
};
fetch('http://localhost:8080/api/v1/agents/me/availability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/agents/me/availability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'source' => 'idle'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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 := "http://localhost:8080/api/v1/agents/me/availability"
payload := strings.NewReader("{\n \"source\": \"idle\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("http://localhost:8080/api/v1/agents/me/availability")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"idle\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/agents/me/availability")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"idle\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 1,
"created_at": "2025-08-28T10:00:00Z",
"updated_at": "2025-08-28T10:00:00Z",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"type": "agent",
"availability_status": "online",
"phone_number_country_code": "US",
"phone_number": "1234567890",
"avatar_url": "/avatars/agent1.jpg",
"enabled": true,
"last_active_at": "2025-08-28T10:00:00Z",
"last_login_at": "2025-08-28T10:00:00Z",
"roles": [
"admin"
],
"permissions": [
"conversations:read"
],
"custom_attributes": {},
"teams": [
{
"id": 1,
"name": "Support Team",
"emoji": "🛠️"
}
],
"api_key": "<string>",
"api_key_last_used_at": "2023-11-07T05:31:56Z"
}
}Authorizations
basicAuthtokenAuth
Basic authentication using base64 encoded API key and secret. Format: Authorization: Basic <base64(api_key:api_secret)>
Body
application/json
Availability status update
Availability status
Available options:
available, busy, away, offline Origin of the status change. 'user' is a manual change by the agent (default); 'idle' is an automatic idle-detection driven change. Idle transitions do not overwrite manual away states.
Available options:
user, idle Example:
"idle"
Was this page helpful?
⌘I

