Assign a contact
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contacts/{contact_id}/assignments \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"assignee_id": 123
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({assignee_id: 123})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/contacts/{contact_id}/assignments', 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}/contacts/{contact_id}/assignments"
payload = { "assignee_id": 123 }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Contacts
Assign a contact
Assign an agent to a contact.
POST
/
api
/
v1
/
accounts
/
{account_id}
/
contacts
/
{contact_id}
/
assignments
Assign a contact
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contacts/{contact_id}/assignments \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"assignee_id": 123
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({assignee_id: 123})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/contacts/{contact_id}/assignments', 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}/contacts/{contact_id}/assignments"
payload = { "assignee_id": 123 }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Authorizations
Body
application/json
User id to assign. Null unassigns.
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 Whether the agent is automatically marked offline when they are away.
Whether the agent has confirmed their email address.
The email of the agent
The available name of the agent
The name of the agent
The role of the agent
Available options:
agent, administrator The thumbnail of the agent
The custom role id of the agent