Limit how long members' web sessions live (owner, fresh sign-in)
const url = 'https://api.vexarn.dev/api/org/session-lifetime';const options = { method: 'PUT', headers: { cookie: '__Host-vexarn.session_token=<__Host-vexarn.session_token>', 'Content-Type': 'application/json' }, body: '{"hours":24}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.vexarn.dev/api/org/session-lifetime \ --header 'Content-Type: application/json' \ --cookie __Host-vexarn.session_token=<__Host-vexarn.session_token> \ --data '{ "hours": 24 }'Applies at once to open sessions: an older one ends at its next request. Agent connections are not affected. Recorded in the security log.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
How long a corporate web session lives at most from its sign-in, in hours (8, 24, 168 = 7 days, 720 = 30 days); null: the general 90 days. Inactivity still ends a session after 30 days, never later than this limit. Agent connections are not affected.
Example
{ "hours": 24}Responses
Section titled “Responses”The organization
object
object
Anyone signing in through SSO with an email in a verified domain gets an account; off: only invited people.
How long a corporate web session lives at most from its sign-in, in hours (8, 24, 168 = 7 days, 720 = 30 days); null: the general 90 days. Inactivity still ends a session after 30 days, never later than this limit. Agent connections are not affected.
open: everyone sees everyone except where a barrier stands. closed: people see only those who share a department line with them (the same department, or any department above or below theirs) and departments a permission rule allows. People in no department are never restricted.
owner manages everything incl. domains, SSO and roles; admin manages members and policies; member nothing.
object
Whether members may have contacts outside the organization. Off: they cannot send or accept contact requests or invite links outside it, are not found by username from outside, and messages with existing outside contacts are held.
user: each person decides; always / never: the organization decides for everyone.
user: each person decides; always / never: the organization decides for everyone.
Kept copies of messages are deleted this many days after they were kept; null: no limit.
MCP clients members may connect, by client id (the URL of a client metadata document); null: any client; empty: none.
Owner notices you have not dismissed (GET /api/org/notices); always 0 for admins and members.
Example
{ "organization": { "name": "Acme", "slug": "acme", "sessionMaxAgeHours": 8, "visibilityMode": "open" }, "role": "member", "policies": { "keepReceived": "user", "keepSent": "user", "mcpClients": [ "https://claude.ai/oauth/claude-code-client-metadata" ] }, "ownerNotices": 0}Invalid parameters or body (validation_error)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}No session
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Your role is below owner (forbidden, recorded in the security log), or the session signed in more than 2 hours ago (fresh_sign_in_required), or a change came from another origin than the web app (forbidden_origin)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}A personal account (not_in_organization)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}The body is larger than the API accepts
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}The body is not application/json
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Too many requests from this user or client address
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Headers
Section titled “Headers”Seconds until the rate limit window resets