Deactivate an agent
Deactivates the specified agent of the caller’s team.
Effects:
- The agent’s license seat is released immediately.
- All CRM sessions and access tokens of the agent are revoked; subsequent API calls with the agent’s tokens are rejected.
- The agent’s leads, deals and data remain untouched and stay assigned to the agent.
- The operation is reversible via the reactivate endpoint; it is NOT a deletion.
Constraints:
- The caller must have team-agent management permission (MANAGE_TEAM_AGENT or MANAGE_TEAM_AGENT_DEPARTMENT).
- The target agent must belong to the caller’s team, must currently be active, and must not be the team owner, an office owner or the caller themselves.
Path Parameters
User ID of the agent to deactivate.
x >= 1Response
Always returned once authentication passes, whether the call succeeded or not. On success the body is {"success":true}. On failure the body is {"code":,"message":<description>} instead - the HTTP status stays 200, so check code (absent/0 means success) rather than the status to detect errors. Failure codes: invalid agent id (20012), agent already deactivated (990105), agent has not completed onboarding / no password set (990113), agent is office or team owner (990106), deactivating own account (990107), or not authorized (1900012).