Take an agent offline
Pause an existing agent for a rooftop by setting isOnboarded to false. The agent and its settings are kept, and you can put it live again with the same call and true.
This is the same call as Put an agent live. The conversation service mapping is updated first, then the stored agent record. The onboarding console uses it as an on/off switch on the sales inbound tab.
Auth: Bearer token of a signed-in console user, validated again by the central config service · Rate limit: not documented · Processing: synchronous, same as Put an agent live
Before you call it
- You need the team-agent mapping ID (
agentId) of an active agent at this rooftop. - Nothing checks whether the agent is currently live. Sending
falseto an agent that is already offline still returns200.
Request body
- Headers: set
Authorization: Bearer YOUR_TOKENandContent-Type: application/json. - Identify the rooftop: send
enterpriseId,teamIdandentity. - Switch it off: set
entityConfig.agent.agentIdandentityConfig.agent.isOnboarded: false. - Check for
200anddata.agent.isOnboarded: false.
| Parameter | Type | Required | Description |
|---|---|---|---|
enterpriseId | string | Required | Dealer group ID. |
teamId | string | Required | Rooftop ID. |
entity | string | Required | Agent type, for example sales_inbound. |
enterpriseName | string | Optional | Stored on the config if sent. The console sends it. |
teamName | string | Optional | Stored on the config if sent. The console sends it. |
entityConfig | object | Required | Holds the agent fields. |
agent | object | Required | Send only the two fields below unless you mean to change others. |
agentId | string | Required | Team-agent mapping ID. Its presence makes this an update. teamAgentMappingId is accepted as another name for it. |
isOnboarded | boolean | Required | false to take the agent offline. |
Sample request
curl -X POST "https://api.spyne.ai/console/v1/product-onboarding/vini/agent" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enterpriseId": "<enterpriseId>",
"teamId": "<teamId>",
"entity": "sales_inbound",
"entityConfig": { "agent": { "agentId": "<agentId>", "isOnboarded": false } }
}'import requests
res = requests.post(
"https://api.spyne.ai/console/v1/product-onboarding/vini/agent",
headers={"Authorization": "Bearer YOUR_TOKEN"},
json={
"enterpriseId": "<enterpriseId>",
"teamId": "<teamId>",
"entity": "sales_inbound",
"entityConfig": {"agent": {"agentId": "<agentId>", "isOnboarded": False}},
},
)
print(res.status_code, res.json())const res = await fetch(
'https://api.spyne.ai/console/v1/product-onboarding/vini/agent',
{
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
enterpriseId: '<enterpriseId>',
teamId: '<teamId>',
entity: 'sales_inbound',
entityConfig: { agent: { agentId: '<agentId>', isOnboarded: false } },
}),
}
);
console.log(res.status, await res.json());Sample response
{
"success": true,
"message": "Agent updated successfully",
"data": {
"agentId": "<agentId>",
"entity": "sales_inbound",
"created": false,
"agent": {
"agentId": "<agentId>",
"agentName": "<agentName>",
"isOnboarded": false
}
}
}Error responses are the same as for Put an agent live.
Response parameters (200)
Same as Put an agent live. data.agent.isOnboarded is false.
Errors
Same as Put an agent live.
What happens next
The agent stops being picked for routing, speed-to-lead SMS, web calls, transfers and the campaign summary job. To resume, call Put an agent live.
Updated about 1 hour ago
