Skip to content

List pending approval requests for the calling user's org (inbox)

GET
/api/sessions/approvals/pending
curl --request GET \
--url 'https://example.com/api/sessions/approvals/pending?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--header 'Authorization: Bearer <token>'

Return pending shell session approval requests for the organisation.

Gate

Caller must hold device.shell.approve for this org; 403 otherwise. Cross-org isolation is enforced by scoping all queries to organization_id.

Returns

List of pending approvals ordered oldest-first (most urgent at the top). Each item embeds the requestor’s id and email so the inbox can display human-readable identities without a second request.

Errors

403 — caller lacks device.shell.approve role.

organization_id
required
Organization Id
string format: uuid

Successful Response

Media type application/json
Response List Pending Approvals Api Sessions Approvals Pending Get
Array<object>
PendingApprovalResponse

Public representation of a pending approval (TASK-S19-004).

Returned by GET /sessions/approvals/pending.

object
approval_id
required
Approval Id
string
device_id
required
Device Id
string
expires_at
required
Expires At
string format: date-time
justification
required
Any of:
string
requested_at
required
Requested At
string format: date-time
requested_by
required
PendingApprovalUserResponse

Requestor identity embedded in PendingApprovalResponse.

object
email
required
Email
string
id
required
Id
string
session_id
required
Session Id
string
tier
required
Tier
string
Example generated
[
{
"approval_id": "example",
"device_id": "example",
"expires_at": "2026-04-15T12:00:00Z",
"justification": "example",
"requested_at": "2026-04-15T12:00:00Z",
"requested_by": {
"email": "example",
"id": "example"
},
"session_id": "example",
"tier": "example"
}
]

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"
}
]
}