Skip to main content
DELETE
Terminate Session

Terminate Session

DELETE /v1/agent-sessions/{sessionID} Immediately terminates an active agent session. The session’s access token and refresh token are invalidated, and the session status transitions to "terminated". Any subsequent API calls using this session’s tokens will be rejected.
Session termination is recorded in the audit log with a AGENT_SESSION_TERMINATED event. A termination receipt is not automatically generated — use the receipts API to create one if your compliance workflow requires it.

Authentication

Requires X-API-Key header or Bearer JWT token. Tenant-scoped via X-Tenant-ID.

Path Parameters

string
required
The MAIP session identifier (e.g., maip-sess:a1b2c3d4:9f8e7d6c5b4a3210).

Request Body

string
Optional explanation for the termination. Recorded in the audit log. Maximum 1024 characters.

Response

string
Updated status, always "terminated" on success.
string
The MAIP session identifier that was terminated.

Example


Bulk Session Cleanup

To terminate all active sessions for a specific agent (e.g., during incident response), list sessions filtered by agent and status, then terminate each:
For faster incident response, suspending the agent immediately blocks all session operations without requiring individual session termination.

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Path Parameters

sessionId
string<uuid>
required

Session identifier

Body

application/json
reason
string
required

Reason for termination

Response

Session terminated

session_id
string<uuid>
agent_id
string<uuid>
token
string

Session bearer token (returned once on creation)

scopes
string[]
status
enum<string>
Available options:
active,
terminated,
expired
metadata
object
expires_at
string<date-time>
created_at
string<date-time>
terminated_at
string<date-time>