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.

POSThttps://api.spyne.ai/console/v1/product-onboarding/vini/agent
AuthBearer token (console user), validated again by the central config serviceRate limitNot documentedProcessingSynchronous, 30-second forward timeout

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 false to an agent that is already offline still returns 200.

Request body

Requiredalways sendOptionalcan be left out
Request checklist
  1. Headers: set Authorization: Bearer YOUR_TOKEN and Content-Type: application/json.
  2. Identify the rooftop: send enterpriseId, teamId and entity.
  3. Switch it off: set entityConfig.agent.agentId and entityConfig.agent.isOnboarded: false.
  4. Check for 200 and data.agent.isOnboarded: false.
ParameterTypeRequiredDescription
enterpriseIdstringRequiredDealer group ID.
teamIdstringRequiredRooftop ID.
entitystringRequiredAgent type, for example sales_inbound.
enterpriseNamestringOptionalStored on the config if sent. The console sends it.
teamNamestringOptionalStored on the config if sent. The console sends it.
entityConfigobjectRequiredHolds the agent fields.
agentobjectRequiredSend only the two fields below unless you mean to change others.
agentIdstringRequiredTeam-agent mapping ID. Its presence makes this an update. teamAgentMappingId is accepted as another name for it.
isOnboardedbooleanRequiredfalse 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.


Did this page help you?