deactivate_user

Deactivate a user

act entity tenant-private since 2026-10-01

Marks a user deactivated: this is what the admin console's Delete button does. Their Clerk sessions are revoked and they cannot sign in; their memberships and records are kept, and their records keep their name. It is reversible with reinstate_user. A deactivated user can call no capability. Calling it again on a deactivated user changes nothing. An org admin can deactivate only a user whose every org they administer; staff can deactivate anyone but themselves.

Contract

shape
entity
authority
act
evidence
none
subscription
false
permission
any one of: org.admin (carried by the caller's role template in EVERY org the user `user_id` belongs to); account.owner (account role owner or higher in the account of EVERY org the user `user_id` belongs to; an org with no account blocks); staff.ops (the staff role staff_ops held in the Internal org, tradehq_role.staff_role); a deactivated caller is refused first
idempotency
natural
emits
user.deactivated
MCP tool
deactivate_user
decision_set
approve, reject, escalate
REST
POST https://api.containertradehq.com/v1/cap/deactivate_user

Through MCP this call returns an approval request first; see Approvals.

Idempotency: keyed by the contract's own inputs: the same inputs replay the first call's result

Inputs

nametyperequiredvalidation
user_iduser_idrequiredtradehq-user-id; 1 to 20 characters
The user to deactivate.

Response

  • user_id · string · The user.
  • deactivated_at · string · When they were deactivated: the first call's time on a replay.
  • orgs · string[] · The orgs the user belongs to, whose admins the event reaches.
Full JSON Schema
{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20,
      "pattern": "^[A-Za-z0-9_-]{1,20}$",
      "format": "tradehq-user-id",
      "description": "The user.",
      "x-data-class": "operational"
    },
    "deactivated_at": {
      "type": "string",
      "format": "date-time",
      "description": "When they were deactivated: the first call's time on a replay.",
      "x-data-class": "operational"
    },
    "orgs": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 20,
        "pattern": "^[A-Za-z0-9_-]{1,20}$",
        "format": "tradehq-org-id"
      },
      "description": "The orgs the user belongs to, whose admins the event reaches.",
      "x-data-class": "operational"
    }
  },
  "required": [
    "user_id",
    "deactivated_at",
    "orgs"
  ],
  "additionalProperties": false
}

Refusals

not yet declared

The platform refusals apply to every call: version, authentication, authority, validation and rate limits, each in the same envelope.

Surfaces

DesktopF
MobileF
APIF
MCPF*
VoiceD2
PushF
OneBoxN
OutboundN
  • MCP: approval required
  • Voice: degraded: confirmation
  • OneBox: no document originates a deactivation
  • Outbound: crosses to no counterparty

Events

Related

None.