Skip to content

End the shift

POST
/v1/desk/sessions/{id}/close
curl --request POST \
--url https://api.aerandil.com/v1/desk/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/close \
--header 'Authorization: Bearer <token>'

The desk signs out: the session closes (desk_session.closed) and no further token is minted for it. Only a bearer minted for this session may close it. Closing a closed session is a no-op.

id
required
string format: uuid

The desk_session id.

Closed.

Cache-Control
string

Always no-store. Object and link state is live data and is never cacheable.

The bearer was not minted for this desk session.

Media typeapplication/json

Structured error wrapper. Every non-2xx response from any Aerandil endpoint serialises to this shape; the HTTP status carries the failure class (4xx/5xx), the body adds a stable code for programmatic dispatch plus a human-readable message.

object
error
required
object
code
required

Stable, programmatic error code (e.g. unauthorized, forbidden, not_found, invalid_body, invalid_url, precondition_failed, no_secondary_key). Clients dispatch on code, not on the message (which may be localised or contextualised in future versions).

string
instance_id

Request-id correlation handle echoed on the request-id response header — support teams correlate without scraping logs.

string
message
required

Human-readable explanation of the failure.

string
parameters

Per-error structured detail. The shape varies by code (e.g. forbidden_action carries {"action": "..."}; precondition_failed carries {"current_version": N}).

Examplegenerated
{
"error": {
"code": "example",
"instance_id": "example",
"message": "example",
"parameters": "example"
}
}