Approve a pending shell session (peer approval)
POST
/api/sessions/{session_id}/approve
const url = 'https://example.com/api/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/approve?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://example.com/api/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/approve?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "reason": "example" }'Approve a pending shell session approval request.
The caller must hold device.shell.approve in this organisation.
Self-approval (approver == requestor) is always rejected.
Errors
400 — self-approval attempt.
403 — caller lacks device.shell.approve.
404 — no pending approval for this session in this org.
409 — approval already decided.
422 — validation error.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” session_id
required
Session Id
string format: uuid
Query Parameters
Section titled “ Query Parameters ” organization_id
required
Organization Id
string format: uuid
Request Bodyrequired
Section titled “ Request Bodyrequired ”Responses
Section titled “ Responses ”Successful Response
Media type application/json
ApprovalResponse
Public representation of an approval decision (S19-002).
Returned by POST /sessions/{id}/approve and POST /sessions/{id}/deny.
object
Example generated
{ "approver_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "decided_at": "2026-04-15T12:00:00Z", "decision": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}