Skip to content

Reference

Session

The dashboard's sign-in: an emailed code or link, then an httpOnly cookie. No passwords.

View as Markdown

Every operation below is also in the OpenAPI document. One that names an MCP tool can be called through the MCP server; one that names none cannot.

Email a sign-in code and link#

POST /v1/session/code

Operation id startSignIn.

Starts a passwordless sign-in: emails a 6-digit code and a link to the address. The answer is the same whether or not the address has an account, so it cannot be used to find out who has one.

Who may call it. Anyone: no key or sign-in is needed.

Request body (StartSignInInput)

FieldTypeDescription
email *string (email)An email address.

* required

JSON
{
  "email": "owner@example.com"
}

Answers 202. Sent (the same answer for any address).

Fields (SignInStarted)

FieldTypeDescription
object *"sign_in"
email *string (email)An email address.
expires_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.

* required

Sign in with the code or link#

POST /v1/session/verify

Operation id verifySignIn.

Finishes sign-in with the emailed code (and email) or the link's token, and sets the httpOnly session cookie. A first sign-in creates the person's org. An invite token joins that invite's org instead.

Who may call it. Anyone: no key or sign-in is needed.

Request body (VerifySignInInput)

FieldTypeDescription
emailstring (email)An email address.
codestringThe 6-digit code from the email.
tokenstringThe token from the emailed link, instead of email and code.
invitestringAn invite token: a first sign-in joins that org instead of making one.
JSON
{
  "email": "owner@example.com",
  "code": "123456"
}

Answers 200. Signed in; the session cookie is set. A first sign-in makes an org.

Fields (Session)

FieldTypeDescription
object *"session"
member *MemberA person on the team. Signs in by an emailed code or link; there are no passwords.
org *OrgAn organization: the account. It holds both modes; every other record belongs to one of them.
orgs *array of objectEvery org this person belongs to.
created_org *booleanTrue when this sign-in made a new org (the first sign-in of a new address).
expires_at *string (date-time)When the session ends if unused (7 days idle).
mode"test" | "live"The mode the dashboard acts in. Sent only where live mode exists (production); absent means test.
live_availablebooleanTrue where this organization may switch the dashboard to live mode (production, and the org cleared for live). Absent means no.

* required

Errors of its own. sign_in_code_invalid, too_many_attempts, invite_invalid. The errors every operation can answer are on the errors page.

The current session#

GET /v1/session

Operation id getSession.

The signed-in member, the org and mode the session acts in, and every org the member belongs to. The dashboard calls this on load.

Who may call it. A signed-in dashboard member of any role.

Answers 200. The session.

Fields (Session)

FieldTypeDescription
object *"session"
member *MemberA person on the team. Signs in by an emailed code or link; there are no passwords.
org *OrgAn organization: the account. It holds both modes; every other record belongs to one of them.
orgs *array of objectEvery org this person belongs to.
created_org *booleanTrue when this sign-in made a new org (the first sign-in of a new address).
expires_at *string (date-time)When the session ends if unused (7 days idle).
mode"test" | "live"The mode the dashboard acts in. Sent only where live mode exists (production); absent means test.
live_availablebooleanTrue where this organization may switch the dashboard to live mode (production, and the org cleared for live). Absent means no.

* required

Sign out#

DELETE /v1/session

Operation id signOut.

Ends this dashboard session and clears its cookie. Answers 204 with no body.

Who may call it. A signed-in dashboard member of any role.

Answers 204. Signed out of this browser; the cookie is cleared. API keys and connected apps (an agent signed in as you) keep working: end those under Settings.

Switch to another of your orgs#

POST /v1/session/org

Operation id switchOrg.

Moves the session to another org the member belongs to. Everything after this call acts in that org.

Who may call it. A signed-in dashboard member of any role.

Request body (SwitchOrgInput)

FieldTypeDescription
org *stringAn id starting with org_.

* required

JSON
{
  "org": "org_other"
}

Answers 200. Switched.

Fields (Session)

FieldTypeDescription
object *"session"
member *MemberA person on the team. Signs in by an emailed code or link; there are no passwords.
org *OrgAn organization: the account. It holds both modes; every other record belongs to one of them.
orgs *array of objectEvery org this person belongs to.
created_org *booleanTrue when this sign-in made a new org (the first sign-in of a new address).
expires_at *string (date-time)When the session ends if unused (7 days idle).
mode"test" | "live"The mode the dashboard acts in. Sent only where live mode exists (production); absent means test.
live_availablebooleanTrue where this organization may switch the dashboard to live mode (production, and the org cleared for live). Absent means no.

* required

Switch the dashboard between test and live mode#

POST /v1/session/mode

Operation id switchMode.

Moves the dashboard session between test and live mode. Live exists only on production, for an organization an operator cleared; test is always allowed.

Who may call it. A signed-in dashboard member of any role.

Request body (SwitchModeInput)

FieldTypeDescription
mode *"test" | "live"

* required

JSON
{
  "mode": "live"
}

Answers 200. Switched. Live mode exists only on production, for an organization cleared for it.

Fields (Session)

FieldTypeDescription
object *"session"
member *MemberA person on the team. Signs in by an emailed code or link; there are no passwords.
org *OrgAn organization: the account. It holds both modes; every other record belongs to one of them.
orgs *array of objectEvery org this person belongs to.
created_org *booleanTrue when this sign-in made a new org (the first sign-in of a new address).
expires_at *string (date-time)When the session ends if unused (7 days idle).
mode"test" | "live"The mode the dashboard acts in. Sent only where live mode exists (production); absent means test.
live_availablebooleanTrue where this organization may switch the dashboard to live mode (production, and the org cleared for live). Absent means no.

* required

Your signed-in devices#

GET /v1/session/devices

Operation id listSignedInDevices.

The member's own signed-in browsers and phones across every org, this one first, then the most recently active.

Who may call it. A signed-in dashboard member of any role.

ParameterInTypeDescription
limitqueryintegerHow many to return, 1 to 100 (default 20).
starting_afterquerystringAn id from the page before: the page after it.
ending_beforequerystringAn id from the page after: the page before it. A list read from the database offers it as the list comes and filtered by event alone, in the default order, and answers parameter_invalid to any other…

Answers 200. Your own sessions in every org: this device first, then the most recently active.

Fields

FieldTypeDescription
object *"list"
data *array of SignedInDeviceThis page, newest first.
has_more *booleanTrue when there is another page: pass the last id as starting_after.
url *"/v1/session/devices"The path this list came from (/v1/session/devices).

* required

Sign out one of your devices#

DELETE /v1/session/devices/{id}

Operation id signOutDevice.

Ends one of the member's own sessions by its handle. Signing out the current one clears its cookie too. Someone else's session is resource_missing.

Who may call it. A signed-in dashboard member of any role.

ParameterInTypeDescription
id *pathstringA signed-in device (ses_…): a handle for one dashboard session, never its cookie or hash.

Answers 200. Signed out (this device too: its cookie is cleared). Another person's or an ended session answers resource_missing.

Fields (SignedOutDevice)

FieldTypeDescription
object *"signed_in_device"
id *stringA signed-in device (ses_…): a handle for one dashboard session, never its cookie or hash.
signed_out *true
this_device *booleanTrue when it was this session: its cookie is cleared too.

* required

Sign out everywhere else#

POST /v1/session/sign_out_others

Operation id signOutOthers.

Ends every session of this person but the one making the call, and every app they connected: a stolen session may have made one, and it lasts longer.

Who may call it. A signed-in dashboard member of any role.

Answers 200. Every other session ended, and every app this person connected.

Fields (SignedOutOthers)

FieldTypeDescription
object *"signed_out_others"
revoked *integerHow many other sessions ended.

* required