Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Session Exchange Com Accounts API
version: 0.1.0
description: 'Operations tagged Accounts across 2 of this provider''s published API definitions: openapi.json, session-exchange-com-openapi.json. Each path carries the servers of the definition it was published in.'
tags:
- name: Accounts
paths:
/accounts/me/terms:
post:
summary: Accept Terms
description: 'Record the signed-in human''s acceptance of the current Terms. Body {version}; a stale version
is refused (409 `terms_version_mismatch`) so nobody accepts a text they were not shown.'
operationId: accept_terms_accounts_me_terms_post
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
/accounts/me/terms-updates:
get:
summary: Terms Updates
description: '#2037 (Terms § 12): the in-app note of every upcoming dated Terms version, EN and DE, each with
`dismissed` for the caller. Not a gate. Serving a note records, once per exact text, when it went live
(collector/terms_consumer_note.py).'
operationId: terms_updates_accounts_me_terms_updates_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
/accounts/me/terms-updates/{version}/dismiss:
post:
summary: Dismiss Terms Update
description: '#2037: hide the note of dated Terms version `version` for this account, on every device. Dismissing
accepts nothing and waives nothing: the right to object (§ 12) stays.'
operationId: dismiss_terms_update_accounts_me_terms_updates__version__dismiss_post
parameters:
- name: version
in: path
required: true
schema:
type: string
title: Version
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
/accounts/me:
get:
summary: Accounts Me
operationId: accounts_me_accounts_me_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
delete:
summary: Delete My Account
description: 'Delete the caller''s account (GDPR Art. 17). Body: {confirm: }. Erases:
OAuth identities, email, name, avatar, handle; every session and this host''s library tokens; the
seller profile of tenants the caller solely owned; memberships (a tenant the caller was the LAST
owner of is soft-deleted and purged by the reaper after its grace period — incl. the personal
library); scheduled cancellation of subscriptions; the TEXT of every email we sent them
(collector/mail — the delivery record survives, the body does not); the handle in item
attribution/provenance (collector/erasure.py, specs/erasure/v0.1). Retains what
RETAINED_ON_DELETE lists. Recorded in the erasure ledger so a restore re-applies it.'
operationId: delete_my_account_accounts_me_delete
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
/accounts/tenants/{tenant_id}/members:
get:
summary: List Members
operationId: list_members_accounts_tenants__tenant_id__members_get
parameters:
- name: tenant_id
in: path
required: true
schema:
type: string
title: Tenant Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
post:
summary: Set Member
description: 'Grant/change a user''s role in a tenant. Caller must be owner/admin of the tenant
(or a global admin).
Body `{user_id, role}` changes an existing MEMBER''s role (the id comes from the member list);
for someone who is not a member yet it is 409 `not_a_member` (RR01-SEC-B05) — except for a
global admin. Body `{email, role}` never grants on the spot (accounts:NF-10): it records a
pending invite and mails a single-use accept link to that address (#987 A, collector/invite_links.py),
and answers 202 with the same shape whether or not the email belongs to an account (no enumeration).'
operationId: set_member_accounts_tenants__tenant_id__members_post
parameters:
- name: tenant_id
in: path
required: true
schema:
type: string
title: Tenant Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
/accounts/tenants/{tenant_id}/invites:
get:
summary: List Invites
operationId: list_invites_accounts_tenants__tenant_id__invites_get
parameters:
- name: tenant_id
in: path
required: true
schema:
type: string
title: Tenant Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
/accounts/tenants/{tenant_id}/invites/{invite_id}:
delete:
summary: Revoke Invite
operationId: revoke_invite_accounts_tenants__tenant_id__invites__invite_id__delete
parameters:
- name: tenant_id
in: path
required: true
schema:
type: string
title: Tenant Id
- name: invite_id
in: path
required: true
schema:
type: string
title: Invite Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
/accounts/me/invites:
get:
summary: My Invites
operationId: my_invites_accounts_me_invites_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
/accounts/invites/{invite_id}/accept:
post:
summary: Accept Invite
description: '#987 A: a matching address only LISTS an invite; it never accepts one. A listed invite answers 409
`invite_accept_via_link` (with the masked address the link went to); anything else the same 404 as
before. Accepting takes the emailed link: POST /accounts/invite-links/accept, which decides and closes
the invite under the same per-invite lock (`InviteStore.locked`) as decline and revoke.'
operationId: accept_invite_accounts_invites__invite_id__accept_post
parameters:
- name: invite_id
in: path
required: true
schema:
type: string
title: Invite Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
/accounts/invites/{invite_id}/decline:
post:
summary: Decline Invite
description: '#987 A review: a matching address never closes an invite either. A former holder whom #990 still
lists must not be able to decline (and so deny) an invite meant for the address''s current holder:
declining takes the emailed link (POST /accounts/invite-links/decline); the inviter or a workspace admin
revokes. A listed invite answers 409 `invite_decline_via_link`; anything else the same 404 as before.'
operationId: decline_invite_accounts_invites__invite_id__decline_post
parameters:
- name: invite_id
in: path
required: true
schema:
type: string
title: Invite Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
/accounts/invites/{invite_id}/resend:
post:
summary: Resend Invite Link
description: '#987 A review: the invitee''s listing cannot re-send (every re-send kills the live link, so a former
holder could keep the real mailbox holder from ever using one). Only the inviter or a workspace admin
re-sends: POST /accounts/tenants/{tenant}/invites/{id}/resend. A listed invite answers 409
`invite_resend_by_inviter`; anything else the same 404 as before.'
operationId: resend_invite_link_accounts_invites__invite_id__resend_post
parameters:
- name: invite_id
in: path
required: true
schema:
type: string
title: Invite Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
/accounts/tenants/{tenant_id}/invites/{invite_id}/resend:
post:
summary: Admin Resend Invite Link
description: '#987 A: mail a fresh accept link for a pending invite — the inviter while STILL a member of the
workspace, or a workspace admin (or a global admin) only (#1007 review: someone removed from the
workspace keeps no say over its invites). Body {email}: the invited address, typed again (only its hash
is stored); it must match the invite (409 `invite_email_mismatch`). Wrong-address guesses are capped per
invite and per actor (429, then nothing is checked). Older links of the invite stop working. Sends are
rate limited per invite, per inviter and per workspace: 429 with `retry_after`.'
operationId: admin_resend_invite_link_accounts_tenants__tenant_id__invites__invite_id__resend_post
parameters:
- name: tenant_id
in: path
required: true
schema:
type: string
title: Tenant Id
- name: invite_id
in: path
required: true
schema:
type: string
title: Invite Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
/accounts/invite-links/open:
post:
summary: Open Invite Link
description: 'Body {t}: the token from the link''s fragment. No session needed (the person may still have to sign
in or up). A valid link answers the invite (workspace, role, expiry) and binds it to this browser
(HttpOnly cookie, its hash kept server-side) for the sign-in round trip; anything else is 404
`invite_link_invalid` — the same for an unknown, used, expired or revoked link. Rate limited per
client address.'
operationId: open_invite_link_accounts_invite_links_open_post
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
/accounts/invite-links/held:
get:
summary: Held Invite Link
description: 'The invite this browser opened, and the signed-in account that would join it (so a person signed in
to the wrong account can switch first), plus that account''s current role there, if any. Signed out
(e.g. right after "switch account"), `account` is null: the page asks the person to sign in.'
operationId: held_invite_link_accounts_invite_links_held_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
/accounts/invite-links/accept:
post:
summary: Accept Invite Link
description: 'Accept the invite this browser opened, for the SIGNED-IN account, whatever its e-mail: possession of
the link is the proof of mailbox control. Single use; never demotes an existing higher role.'
operationId: accept_invite_link_accounts_invite_links_accept_post
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
/accounts/invite-links/decline:
post:
summary: Decline Invite Link
description: 'Decline the invite this browser opened. Like accepting, this takes the emailed link (#987 A review):
a former holder whom #990 still lists cannot close an invite meant for the address''s current holder.
No session needed (whoever has the mailbox may say no without an account). Under the same per-invite
lock as accept, revoke and supersede; the link is used up and every other link of the invite dies.'
operationId: decline_invite_link_accounts_invite_links_decline_post
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
/accounts/invite-links/forget:
post:
summary: Forget Invite Link
description: '"Not now": this browser forgets the opened link (the link itself stays usable until it expires).'
operationId: forget_invite_link_accounts_invite_links_forget_post
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
/accounts/tenants/{tenant_id}/members/{user_id}:
delete:
summary: Remove Member
operationId: remove_member_accounts_tenants__tenant_id__members__user_id__delete
parameters:
- name: tenant_id
in: path
required: true
schema:
type: string
title: Tenant Id
- name: user_id
in: path
required: true
schema:
type: string
title: User Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
/accounts/me/tokens:
get:
summary: My Tokens
description: The library tokens the caller minted for agents on this host (active + revoked).
operationId: my_tokens_accounts_me_tokens_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
post:
summary: Mint My Token
description: 'Mint a SCOPED library token for a tool (docs/library-tokens.md). Body:
{label?, scopes: ["library:read"|"library:publish"|"library:acquire"|"profiles:read"|"profiles:write"|
"library:organize", ...], expires_in_days?}
(`expires_in_days` 1-365, default 90; every token expires). Needs your own session: a library token
can never mint another. The token is returned ONCE; only its hash is stored.'
operationId: mint_my_token_accounts_me_tokens_post
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
/accounts/me/tokens/{tid}/revoke:
post:
summary: Revoke My Token
description: 'Revoke ONE of the caller''s library tokens — or a connected app (an OAuth grant, #777): its
refresh tokens and every access token it holds.'
operationId: revoke_my_token_accounts_me_tokens__tid__revoke_post
parameters:
- name: tid
in: path
required: true
schema:
type: string
title: Tid
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
/accounts/me/sessions:
get:
summary: My Sessions
description: The caller's signed-in devices (live sessions); `current` marks this one.
operationId: my_sessions_accounts_me_sessions_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
tags:
- Accounts
/accounts/me/sessions/{sid}/revoke:
post:
summary: Revoke My Session
description: Sign out ONE device (session) of the caller's — including the current one.
operationId: revoke_my_session_accounts_me_sessions__sid__revoke_post
parameters:
- name: sid
in: path
required: true
schema:
type: string
title: Sid
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Accounts
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
x-refined-from:
- openapi.json
- session-exchange-com-openapi.json