Hanzo
OpenapiLink

Logs out one account and stops the sessions it was running.

Logs out one account and stops the sessions it was running.

DELETE /v1/link/{id}

Addresshttps://api.hanzo.ai/v1/link/{id}
MethodDELETE
Operationdelete_link_by_id
AuthAuthorization: Bearer $HANZO_API_KEY

Logs out one account and stops the sessions it was running.

It revokes a single linked account and stops the agent sessions that ran under it, answering with the revoked row and how many sessions stopped. The link is RETAINED with a revoked status rather than deleted, so its usage history and the audit trail survive the log-out — which also means a revoked account still appears in the list, and is excluded from the route plan rather than absent from it. The session stop is narrowed to the revoking user's own sessions on that device, provider and account, and a stop that fails does not fail the revoke: the revoked row is the durable truth. An id that does not exist, or belongs to another user or org, is the same 404.

Request

1 field.

FieldInTypeRequiredDescription
idpathstringyesID is the link to act on, from the path.

Response

StatusBodyMeaning
200revokeRespok

200 body — 18 fields.

FieldInTypeAlwaysDescription
linksbodylinkView[]Links is each revoked row with its new status — retained, not deleted, so usage history and the audit trail survive the log-out.
links[].accountbodystringAccount is the provider-side account identifier, when the collector knows it.
links[].billingbodystringBilling is how this account's inference bills — plan (the user's own subscription, metered here for visibility only) or commerce (the gateway path).
links[].createdAtbodystringCreatedAt is when the link was first registered, RFC 3339 UTC.
links[].hostbodystringHost is the machine's human hostname label, from its most recent report.
links[].idbodystringID is the link's opaque handle ("link_" + 32 hex chars).
links[].kindbodystringKind is how the account authenticates: subscription or apikey.
links[].lastSeenbodystringLastSeen is when the account last reported, RFC 3339 UTC.
links[].machinebodystringMachine is the stable machine identifier the collector reports.
links[].osbodystringOS is the machine's operating system label.
links[].planbodystringPlan is the provider plan label (e.g.
links[].providerbodystringProvider is the AI provider this account belongs to (claude, openai, hanzo…).
links[].statusbodystringStatus is linked or revoked.
links[].updatedAtbodystringUpdatedAt is when the link was last refreshed, RFC 3339 UTC.
links[].usagebodyanyUsage is the last good usage snapshot, clamped and re-serialized to known fields at ingest.
links[].userbodystringUser is the owning subject — the validated caller who registered the link.
revokedbodyintegerRevoked is how many links this call revoked.
sessionsStoppedbodyintegerSessionsStopped is how many of the caller's own agent sessions stopped.

Failure carries the platform error shape — see Errors.

Examples

hanzo links rm <id>

Link API · All Hanzo APIs · Interactive reference

How is this guide?

On this page