curl --request PATCH \
--url https://api.routera.io/users/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "Jane Doe",
"phone": "+15551234567",
"office_status": true,
"time_zone": "America/New_York",
"working_hours": [
{
"days": "Mon - Fri",
"start_date": "09:00",
"end_date": "17:00"
}
],
"out_office_dates": [
{
"start_date": "2026-09-10T00:00:00.000Z",
"end_date": "2026-09-12T23:59:59.000Z"
}
],
"role_id": "770e8400-e29b-41d4-a716-446655440002"
}
'import requests
url = "https://api.routera.io/users/{userId}"
payload = {
"full_name": "Jane Doe",
"phone": "+15551234567",
"office_status": True,
"time_zone": "America/New_York",
"working_hours": [
{
"days": "Mon - Fri",
"start_date": "09:00",
"end_date": "17:00"
}
],
"out_office_dates": [
{
"start_date": "2026-09-10T00:00:00.000Z",
"end_date": "2026-09-12T23:59:59.000Z"
}
],
"role_id": "770e8400-e29b-41d4-a716-446655440002"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
full_name: 'Jane Doe',
phone: '+15551234567',
office_status: true,
time_zone: 'America/New_York',
working_hours: [{days: 'Mon - Fri', start_date: '09:00', end_date: '17:00'}],
out_office_dates: [{start_date: '2026-09-10T00:00:00.000Z', end_date: '2026-09-12T23:59:59.000Z'}],
role_id: '770e8400-e29b-41d4-a716-446655440002'
})
};
fetch('https://api.routera.io/users/{userId}', 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.routera.io/users/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => 'Jane Doe',
'phone' => '+15551234567',
'office_status' => true,
'time_zone' => 'America/New_York',
'working_hours' => [
[
'days' => 'Mon - Fri',
'start_date' => '09:00',
'end_date' => '17:00'
]
],
'out_office_dates' => [
[
'start_date' => '2026-09-10T00:00:00.000Z',
'end_date' => '2026-09-12T23:59:59.000Z'
]
],
'role_id' => '770e8400-e29b-41d4-a716-446655440002'
]),
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.routera.io/users/{userId}"
payload := strings.NewReader("{\n \"full_name\": \"Jane Doe\",\n \"phone\": \"+15551234567\",\n \"office_status\": true,\n \"time_zone\": \"America/New_York\",\n \"working_hours\": [\n {\n \"days\": \"Mon - Fri\",\n \"start_date\": \"09:00\",\n \"end_date\": \"17:00\"\n }\n ],\n \"out_office_dates\": [\n {\n \"start_date\": \"2026-09-10T00:00:00.000Z\",\n \"end_date\": \"2026-09-12T23:59:59.000Z\"\n }\n ],\n \"role_id\": \"770e8400-e29b-41d4-a716-446655440002\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.routera.io/users/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"Jane Doe\",\n \"phone\": \"+15551234567\",\n \"office_status\": true,\n \"time_zone\": \"America/New_York\",\n \"working_hours\": [\n {\n \"days\": \"Mon - Fri\",\n \"start_date\": \"09:00\",\n \"end_date\": \"17:00\"\n }\n ],\n \"out_office_dates\": [\n {\n \"start_date\": \"2026-09-10T00:00:00.000Z\",\n \"end_date\": \"2026-09-12T23:59:59.000Z\"\n }\n ],\n \"role_id\": \"770e8400-e29b-41d4-a716-446655440002\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.routera.io/users/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"Jane Doe\",\n \"phone\": \"+15551234567\",\n \"office_status\": true,\n \"time_zone\": \"America/New_York\",\n \"working_hours\": [\n {\n \"days\": \"Mon - Fri\",\n \"start_date\": \"09:00\",\n \"end_date\": \"17:00\"\n }\n ],\n \"out_office_dates\": [\n {\n \"start_date\": \"2026-09-10T00:00:00.000Z\",\n \"end_date\": \"2026-09-12T23:59:59.000Z\"\n }\n ],\n \"role_id\": \"770e8400-e29b-41d4-a716-446655440002\"\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "user@example.com",
"full_name": "Jane Doe",
"first_name": "Jane",
"last_name": "Doe",
"role": "Administrator",
"external_id": null,
"phone": null,
"office_status": true,
"working_hours": [
{
"days": "Mon - Fri",
"start_date": "09:00",
"end_date": "17:00"
},
{
"days": "saturday",
"start_date": "10:00",
"end_date": "14:00"
}
],
"out_office_dates": [
{
"start_date": "2026-04-02T12:00:00.000Z",
"end_date": "2026-04-03T12:00:00.000Z",
"created_by": "user@example.com"
}
],
"time_zone": "America/New_York",
"calendars": {
"outlook": "user@example.com"
},
"capacity": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Leads",
"current_capacity": 2,
"max_capacity": 10,
"assignment_type": "user"
}
],
"can_receive_notifications": true,
"notification_preferences": [
"billing",
"routing",
"system"
],
"archived": false
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}Update user
PATCH /users/ — update writable member fields
curl --request PATCH \
--url https://api.routera.io/users/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "Jane Doe",
"phone": "+15551234567",
"office_status": true,
"time_zone": "America/New_York",
"working_hours": [
{
"days": "Mon - Fri",
"start_date": "09:00",
"end_date": "17:00"
}
],
"out_office_dates": [
{
"start_date": "2026-09-10T00:00:00.000Z",
"end_date": "2026-09-12T23:59:59.000Z"
}
],
"role_id": "770e8400-e29b-41d4-a716-446655440002"
}
'import requests
url = "https://api.routera.io/users/{userId}"
payload = {
"full_name": "Jane Doe",
"phone": "+15551234567",
"office_status": True,
"time_zone": "America/New_York",
"working_hours": [
{
"days": "Mon - Fri",
"start_date": "09:00",
"end_date": "17:00"
}
],
"out_office_dates": [
{
"start_date": "2026-09-10T00:00:00.000Z",
"end_date": "2026-09-12T23:59:59.000Z"
}
],
"role_id": "770e8400-e29b-41d4-a716-446655440002"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
full_name: 'Jane Doe',
phone: '+15551234567',
office_status: true,
time_zone: 'America/New_York',
working_hours: [{days: 'Mon - Fri', start_date: '09:00', end_date: '17:00'}],
out_office_dates: [{start_date: '2026-09-10T00:00:00.000Z', end_date: '2026-09-12T23:59:59.000Z'}],
role_id: '770e8400-e29b-41d4-a716-446655440002'
})
};
fetch('https://api.routera.io/users/{userId}', 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.routera.io/users/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => 'Jane Doe',
'phone' => '+15551234567',
'office_status' => true,
'time_zone' => 'America/New_York',
'working_hours' => [
[
'days' => 'Mon - Fri',
'start_date' => '09:00',
'end_date' => '17:00'
]
],
'out_office_dates' => [
[
'start_date' => '2026-09-10T00:00:00.000Z',
'end_date' => '2026-09-12T23:59:59.000Z'
]
],
'role_id' => '770e8400-e29b-41d4-a716-446655440002'
]),
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.routera.io/users/{userId}"
payload := strings.NewReader("{\n \"full_name\": \"Jane Doe\",\n \"phone\": \"+15551234567\",\n \"office_status\": true,\n \"time_zone\": \"America/New_York\",\n \"working_hours\": [\n {\n \"days\": \"Mon - Fri\",\n \"start_date\": \"09:00\",\n \"end_date\": \"17:00\"\n }\n ],\n \"out_office_dates\": [\n {\n \"start_date\": \"2026-09-10T00:00:00.000Z\",\n \"end_date\": \"2026-09-12T23:59:59.000Z\"\n }\n ],\n \"role_id\": \"770e8400-e29b-41d4-a716-446655440002\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.routera.io/users/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"Jane Doe\",\n \"phone\": \"+15551234567\",\n \"office_status\": true,\n \"time_zone\": \"America/New_York\",\n \"working_hours\": [\n {\n \"days\": \"Mon - Fri\",\n \"start_date\": \"09:00\",\n \"end_date\": \"17:00\"\n }\n ],\n \"out_office_dates\": [\n {\n \"start_date\": \"2026-09-10T00:00:00.000Z\",\n \"end_date\": \"2026-09-12T23:59:59.000Z\"\n }\n ],\n \"role_id\": \"770e8400-e29b-41d4-a716-446655440002\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.routera.io/users/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"Jane Doe\",\n \"phone\": \"+15551234567\",\n \"office_status\": true,\n \"time_zone\": \"America/New_York\",\n \"working_hours\": [\n {\n \"days\": \"Mon - Fri\",\n \"start_date\": \"09:00\",\n \"end_date\": \"17:00\"\n }\n ],\n \"out_office_dates\": [\n {\n \"start_date\": \"2026-09-10T00:00:00.000Z\",\n \"end_date\": \"2026-09-12T23:59:59.000Z\"\n }\n ],\n \"role_id\": \"770e8400-e29b-41d4-a716-446655440002\"\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "user@example.com",
"full_name": "Jane Doe",
"first_name": "Jane",
"last_name": "Doe",
"role": "Administrator",
"external_id": null,
"phone": null,
"office_status": true,
"working_hours": [
{
"days": "Mon - Fri",
"start_date": "09:00",
"end_date": "17:00"
},
{
"days": "saturday",
"start_date": "10:00",
"end_date": "14:00"
}
],
"out_office_dates": [
{
"start_date": "2026-04-02T12:00:00.000Z",
"end_date": "2026-04-03T12:00:00.000Z",
"created_by": "user@example.com"
}
],
"time_zone": "America/New_York",
"calendars": {
"outlook": "user@example.com"
},
"capacity": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Leads",
"current_capacity": 2,
"max_capacity": 10,
"assignment_type": "user"
}
],
"can_receive_notifications": true,
"notification_preferences": [
"billing",
"routing",
"system"
],
"archived": false
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}{
"message": "<string>",
"error": true,
"field": "<string>"
}Endpoint
PATCH https://api.routera.io/users/{userId}
/users/{userId}Authentication: Bearer JWT Partial update with a flat JSON body (not
{ fields: { ... } }). At least one writable field is required.
Path parameters
| Parameter | Required | Description |
|---|---|---|
userId | Yes | User ID (UUID) |
Request body
| Field | Description |
|---|---|
full_name | Display name |
first_name | First name |
last_name | Last name |
phone | Phone number |
office_status | Whether the member is in office (boolean) |
time_zone | IANA time zone (e.g. America/New_York) |
external_id | External identifier |
working_hours | Array of { days, start_date, end_date } (days e.g. Mon - Fri or monday; times as HH:mm) |
out_office_dates | Array of { start_date, end_date } (ISO date or timestamp); extra keys like created_by are ignored |
capacity | Capacity configuration |
can_receive_notifications | Whether the member can receive notifications |
notification_preferences | Notification preference categories |
role_id | Role UUID that belongs to the authenticated account |
Read-only (rejected if present)
id, email, calendars, archived, archived_by
Unknown or read-only keys return 400.
{
"full_name": "Jane Doe",
"phone": "+15551234567",
"office_status": true,
"time_zone": "America/New_York",
"working_hours": [
{
"days": "Mon - Fri",
"start_date": "09:00",
"end_date": "17:00"
}
],
"out_office_dates": [
{
"start_date": "2026-09-10T00:00:00.000Z",
"end_date": "2026-09-12T23:59:59.000Z"
}
],
"role_id": "770e8400-e29b-41d4-a716-446655440002"
}
Response
200 — Updated user object (same shape as get){
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "user@example.com",
"full_name": "Jane Doe",
"first_name": "Jane",
"last_name": "Doe",
"role": "Administrator",
"external_id": null,
"phone": null,
"office_status": true,
"working_hours": [
{
"days": "Mon - Fri",
"start_date": "09:00",
"end_date": "17:00"
},
{
"days": "saturday",
"start_date": "10:00",
"end_date": "14:00"
}
],
"out_office_dates": [
{
"start_date": "2026-04-02T12:00:00.000Z",
"end_date": "2026-04-03T12:00:00.000Z",
"created_by": "user@example.com"
}
],
"time_zone": "America/New_York",
"calendars": {
"outlook": "user@example.com"
},
"capacity": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Leads",
"current_capacity": 2,
"max_capacity": 10,
"assignment_type": "user"
}
],
"can_receive_notifications": true,
"notification_preferences": [
"billing",
"routing",
"system"
],
"archived": false
}
Errors
| Status | When |
|---|---|
400 | Invalid path/id, JSON body, unknown/read-only fields, or invalid role_id / time_zone / out_office_dates |
401 | Missing or invalid account context in JWT |
404 | Member not found for this account |
409 | Cannot update an archived user |
500 | Internal server error |
Authorizations
Bearer JWT with valid account context.
Path Parameters
User ID (UUID)
Body
Partial update body. At least one writable field is required. Unknown or read-only keys return 400.
IANA time zone (e.g. America/New_York)
Working hour ranges (days, start_date, end_date as HH:mm)
Hide child attributes
Hide child attributes
Day or range: monday…sunday, Mon - Fri / mon-fri, Sat - Sun / sat-sun, saturday, or sunday
"Mon - Fri"
Start time in HH:mm (member time zone)
"09:00"
End time in HH:mm (member time zone)
"17:00"
Role UUID that belongs to the authenticated account
Response
Updated user
Account member (user + member_account). Role is the display name string. Archived members include archived timestamp and archived_by.
User ID (UUID)
Role display name (read-only)
Working hour ranges. Empty array means available 24/7. Times are interpreted in time_zone.
Hide child attributes
Hide child attributes
Day or range: monday…sunday, Mon - Fri / mon-fri, Sat - Sun / sat-sun, saturday, or sunday
"Mon - Fri"
Start time in HH:mm (member time zone)
"09:00"
End time in HH:mm (member time zone)
"17:00"
[
{
"days": "Mon - Fri",
"start_date": "09:00",
"end_date": "17:00"
},
{
"days": "saturday",
"start_date": "10:00",
"end_date": "14:00"
}
]
IANA time zone
"America/New_York"
false when active, or ISO timestamp when archived
Present when archived
Was this page helpful?
