Update Agents in Team
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/teams/{team_id}/team_members \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"user_ids": [
1
]
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_ids: [1]})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/teams/{team_id}/team_members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/teams/{team_id}/team_members"
payload = { "user_ids": [1] }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)[
{
"id": 123,
"account_id": 123,
"availability_status": "online",
"auto_offline": true,
"confirmed": true,
"email": "<string>",
"available_name": "<string>",
"name": "<string>",
"role": "agent",
"thumbnail": "<string>",
"custom_role_id": 123,
"system_role": "commercial"
}
]{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Teams
Update Agents in Team
All agents except the one passed in params will be removed
PATCH
/
api
/
v1
/
accounts
/
{account_id}
/
teams
/
{team_id}
/
team_members
Update Agents in Team
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/teams/{team_id}/team_members \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"user_ids": [
1
]
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_ids: [1]})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/teams/{team_id}/team_members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/teams/{team_id}/team_members"
payload = { "user_ids": [1] }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)[
{
"id": 123,
"account_id": 123,
"availability_status": "online",
"auto_offline": true,
"confirmed": true,
"email": "<string>",
"available_name": "<string>",
"name": "<string>",
"role": "agent",
"thumbnail": "<string>",
"custom_role_id": 123,
"system_role": "commercial"
}
]{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
Path Parameters
Response
Success
The effective availability status of the agent, derived from the configured availability, auto-offline setting, and current presence. To update an agent's configured availability, use the availability field in create or update requests.
Available options:
online, busy, offline