Agents
Move an agent's waiting turns onto its current phone
After the agent’s phone is replaced (PATCH /v1/agents/{id}), its
turns still queued on the old phone keep waiting there. This moves
them: each is cancelled on the old phone and sent again, as a new
session, on the agent’s current phone. stranded counts turns
whose re-send failed; they stay queued on the old phone. With
deviceCheckFailed, phone status could not be read and nothing was
moved: retry.
POST
/
v1
/
agents
/
{id}
/
queue
/
retarget
Move an agent's waiting turns onto its current phone
curl --request POST \
--url https://api.lusor.ai/v1/agents/{id}/queue/retarget \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({workspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.lusor.ai/v1/agents/{id}/queue/retarget', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/agents/{id}/queue/retarget"
payload = { "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"moved": 123,
"stranded": 123,
"deviceId": "<string>",
"deviceCheckFailed": true
}
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
ApiKeyBearerAuth
Path Parameters
Was this page helpful?
⌘I
Move an agent's waiting turns onto its current phone
curl --request POST \
--url https://api.lusor.ai/v1/agents/{id}/queue/retarget \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({workspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.lusor.ai/v1/agents/{id}/queue/retarget', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/agents/{id}/queue/retarget"
payload = { "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"moved": 123,
"stranded": 123,
"deviceId": "<string>",
"deviceCheckFailed": true
}
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}
