Account security
28 operations in the WP Waterfall API.
- postStop an account recovery change with the emailed link
- postReport a bug from the dashboard
- getGoogle and GitHub sign-in connections
- deleteUnlink Google or GitHub
- postStart linking Google or GitHub
- getThe signed identity for the Nami chat
- getList passkeys
- postFinish adding a passkey
- postStart adding a passkey
- patchRename a passkey
- postChange the password, or create one
- postSkip the prompt to create a password
- getPassword, two-factor, and connection state
- getRecent sign-ins and security changes
- postEmail a code to add a first password or passkey
- postSecure my account
- getList sign-in sessions
- deleteSign out every other session
- getList trusted browsers
- deleteForget every trusted browser
- deleteForget one trusted browser
- postTurn off a two-factor method, or all of them
- postStart emailed sign-in codes
- postEmail a code to confirm a two-factor change
- postFinish emailed sign-in codes
- postMake ten new recovery codes
- postStart the authenticator app setup
- postFinish the authenticator app setup
Stop an account recovery change with the emailed link
post/auth/recovery/cancelPermalink to Stop an account recovery change with the emailed link
- Dashboard session only, no API key
No sign-in. Takes the token from the link WP Waterfall emails to the old address when support asks to change an account after a recovery request (ADR 325). Opening the link changes nothing: the dashboard page /recovery-cancel calls this with a POST. The token's only power is to stop that one change during its 24 hour wait. Answers cancelled: false for an unknown, used, or ended link. Wrong links are throttled per address.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, CancelRecoveryRequest
Fields
| Name | Type | Description |
|---|---|---|
token required | string | The token from the link in the email. |
Responses
| Status | Body | Description |
|---|---|---|
200 | CancelRecoveryResult | Stopped, or nothing to stop |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | A field is missing or not valid |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
cancelled required | boolean | True when this call stopped the change. False when it had already ended. |
Report a bug from the dashboard
post/users/me/bug-reportsPermalink to Report a bug from the dashboard
- Dashboard session only, no API key
The dashboard's Report a bug button posts here. Emails the report to WP Waterfall staff with the person's address as the reply address, and stores nothing: the address of the page, what the person typed, the size of their browser window, their browser's name, and a picture of the page when they sent one (JPEG or PNG in base64, at most 1.5 MB). A dashboard session only: an API key is refused, and so is WP Waterfall staff acting as the customer. Limited to 10 reports an hour for a person and 30 for a company. The audit entry holds the path of the page only.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, BugReportRequest
Fields
| Name | Type | Description |
|---|---|---|
url required | string (uri) | The address of the page the person was on. |
note | string | What the person typed. May be empty when a picture is sent. Default: . |
screenshot | object or null | A picture of the page as the person saw it, or null when they sent none. |
screenshot.content_type required | string | The kind of picture. One of: image/jpeg, image/png. |
screenshot.data required | string | The picture in base64, with no data: prefix. At most 1.5 MB before base64. |
viewport | object | The size of the browser window, in CSS pixels. |
viewport.width required | integer | The width of the window, in CSS pixels. Range: 1 to 20000. |
viewport.height required | integer | The height of the window, in CSS pixels. Range: 1 to 20000. |
Responses
| Status | Body | Description |
|---|---|---|
202 | BugReportResponse | Received |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | Refused |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | A field is missing or not valid |
429 | Problem | Too many attempts. Retry-After says when to try again |
503 | Problem | Not set up on this server |
202 response fields
| Name | Type | Description |
|---|---|---|
received required | boolean | Always true: the report was emailed to WP Waterfall staff. |
Google and GitHub sign-in connections
get/users/me/connectionsPermalink to Google and GitHub sign-in connections
- Dashboard session only, no API key
Returns one row for Google and one for GitHub: available (sign-in with the provider is set up here), linked, and linked_at. Needs a dashboard session: an API key cannot call it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | ConnectionList | Connections |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of object | |
data[].provider required | string | One of: google, github. |
data[].available required | boolean | The server has client credentials for this provider, so the button can show. |
data[].linked required | boolean | |
data[].linked_at | string or null (date-time) | When this person linked the account, or null when it is not linked. |
next_cursor | string or null |
Unlink Google or GitHub
delete/users/me/connections/{provider}Permalink to Unlink Google or GitHub
- Dashboard session only, no API key
Refused for the last way to sign in. Needs a recent sign-in: answers 403 step-up-required otherwise.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
provider required | path | string |
Responses
| Status | Body | Description |
|---|---|---|
204 | Unlinked | |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | Refused |
404 | Problem | Not found |
409 | Problem | Conflict with the current state |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
Start linking Google or GitHub
post/users/me/connections/{provider}/linkPermalink to Start linking Google or GitHub
- Dashboard session only, no API key
Adds a way to sign in, so it needs a recent sign-in: answers 403 step-up-required otherwise. The provider account must carry the address of this account, checked by the provider.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
provider required | path | string | |
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Responses
| Status | Body | Description |
|---|---|---|
200 | RedirectUrl | Provider address |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | Refused |
404 | Problem | Not found |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
503 | Problem | Not set up on this server |
200 response fields
| Name | Type | Description |
|---|---|---|
url required | string (uri) |
The signed identity for the Nami chat
get/users/me/intercomPermalink to The signed identity for the Nami chat
- Dashboard session only, no API key
The Nami chat runs on Intercom's Messenger. The answer is a JSON Web Token, signed with HS256 by the Messenger secret, that tells Intercom who the signed-in person is: their user id, email, name, and the company in use. It lasts one hour, so the dashboard asks again before expires_at. Answers 403 while staff act as a customer, and 503 when the server has no Messenger secret.
Responses
| Status | Body | Description |
|---|---|---|
200 | IntercomIdentity | The identity |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | Refused |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
503 | Problem | Not set up on this server |
200 response fields
| Name | Type | Description |
|---|---|---|
app_id required | string | The Intercom workspace id the Messenger boots with. |
user_jwt required | string | A JSON Web Token signed with HS256. Its claims are user_id, email, name, company (the id and name of the company in use), iat, and exp. |
expires_at required | string (date-time) | When the token stops working. Ask again before then. |
List passkeys
get/users/me/passkeysPermalink to List passkeys
- Dashboard session only, no API key
Name, when it was added, and when it was last used. No key material.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | PasskeyList | Passkeys |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of object | |
data[].id required | string | |
data[].name required | string | |
data[].created_at required | string (date-time) | |
data[].last_used_at required | string or null (date-time) | |
data[].synced required | boolean | The operating system or a password manager keeps a copy, so it follows the person to a new device. |
next_cursor | string or null |
Finish adding a passkey
post/users/me/passkeysPermalink to Finish adding a passkey
- Dashboard session only, no API key
Checks the browser's WebAuthn answer and saves the public key. The first passkey on an account with no authenticator app also makes ten recovery codes, shown once in recovery_codes. Writes an audit event and emails the account address.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, PasskeyRegisterRequest
Fields
| Name | Type | Description |
|---|---|---|
name | string | |
response required | object | |
email_code | string | The same code as the options call. It is used up here, when the first passkey is saved. |
Responses
| Status | Body | Description |
|---|---|---|
200 | PasskeyRegisterResult | Added |
400 | Problem | The request was not valid |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | Conflict with the current state |
422 | Problem | A field is missing or not valid |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
passkey required | object | |
passkey.id required | string | |
passkey.name required | string | |
passkey.created_at required | string (date-time) | |
passkey.last_used_at required | string or null (date-time) | |
passkey.synced required | boolean | The operating system or a password manager keeps a copy, so it follows the person to a new device. |
recovery_codes required | array of string | Ten new recovery codes when this is the first passkey and no app is on. Shown once. Otherwise empty. |
Start adding a passkey
post/users/me/passkeys/optionsPermalink to Start adding a passkey
- Dashboard session only, no API key
Asks for the password first when the account has one. A person with no password and no passkey whose session started more than 15 minutes ago also sends email_code (see POST /users/me/security/first-factor-code); the code is used up here. The answer holds WebAuthn options for the browser: attestation none, user verification preferred, and a resident key preferred so a passkey synced by the system works. At most ten passkeys per person. Browser only: an API key cannot use it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, PasskeyRegisterOptionsRequest
Fields
| Name | Type | Description |
|---|---|---|
password | string | Needed when the account has a password. A person with no password has nothing to confirm. |
email_code | string | Needed for a first passkey when the session started more than 15 minutes ago. |
Responses
| Status | Body | Description |
|---|---|---|
200 | PasskeyOptionsResult | WebAuthn options |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | Refused |
409 | Problem | Conflict with the current state |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
options required | object |
Rename a passkey
patch/users/me/passkeys/{id}Permalink to Rename a passkey
- Dashboard session only, no API key
Gives one of the person's own passkeys a new name of 1 to 60 characters and records a security event. Answers 404 when the passkey is not theirs. Needs a dashboard session: an API key cannot call it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | The id of the passkey, from the passkey list. |
Idempotency-Key | header | string | Optional on PUT and PATCH. When the call starts a job, a retry with the same key, path, and body within 24 hours returns that job instead of starting another. A different path or body starts a new job. |
Request body application/json, required, RenamePasskeyRequest
Fields
| Name | Type | Description |
|---|---|---|
name required | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | SecurityStatus | Renamed |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | Not found |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | A field is missing or not valid |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
200 response fields
| Name | Type | Description |
|---|---|---|
status required | string |
Change the password, or create one
post/users/me/passwordPermalink to Change the password, or create one
- Dashboard session only, no API key
A person with a password sends the current one. A person who signed in with Google or GitHub and has none sends only the new one, and also email_code when their session started more than 15 minutes ago (see POST /users/me/security/first-factor-code). Answers 403 with email_code_required when the code is missing, email_code_invalid when it is wrong, expired, or used. Every other session ends.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, SetPasswordRequest
Fields
| Name | Type | Description |
|---|---|---|
current_password | string | Required when the account already has a password. A Google or GitHub account has none yet. |
new_password required | string | |
email_code | string | Needed for a first password when the session started more than 15 minutes ago: the code sent by POST /users/me/security/first-factor-code. |
Responses
| Status | Body | Description |
|---|---|---|
200 | SecurityStatus | Done |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | Refused |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | A field is missing or not valid |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
status required | string |
Skip the prompt to create a password
post/users/me/password/skipPermalink to Skip the prompt to create a password
- Dashboard session only, no API key
Records that the person skipped the prompt to create a password, which a person who signed in with Google or GitHub sees. The body is an empty object, and the answer is status: skipped. Needs a dashboard session: an API key cannot call it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, SkipPasswordPromptRequest
Responses
| Status | Body | Description |
|---|---|---|
200 | SecurityStatus | Skipped |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
200 response fields
| Name | Type | Description |
|---|---|---|
status required | string |
Password, two-factor, and connection state
get/users/me/securityPermalink to Password, two-factor, and connection state
- Dashboard session only, no API key
Returns the person's sign-in state: whether they have a password, their sign-in methods, the two-factor methods that are on (passkeys, the authenticator app, and emailed codes), the recovery codes left, and whether a company requires two-factor. Needs a dashboard session: an API key cannot call it.
Responses
| Status | Body | Description |
|---|---|---|
200 | SecurityOverview | Overview |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
200 response fields
| Name | Type | Description |
|---|---|---|
email required | string | |
email_verified required | boolean | |
has_password required | boolean | |
password_nudge required | boolean | True for a person who signed in with Google or GitHub and has not made a password. |
has_proof required | boolean | True when a password or a passkey that checks the person can confirm sensitive actions. |
recent_sign_in required | boolean | True when this session started in the last 15 minutes, so a person with no password and no passkey may add the first one without more. False means the first one also needs the 6 digit code emailed to the account address. |
sign_in_methods required | array of string | |
two_factor required | object | |
two_factor.enabled required | boolean | |
two_factor.passkeys required | integer | How many passkeys the person has. Range: 0 to any. |
two_factor.totp required | boolean | |
two_factor.email required | boolean | |
two_factor.recovery_codes_remaining required | integer or null | Range: 0 to any. |
two_factor.required_by_company required | boolean | A company this person belongs to requires two factor. |
two_factor.must_enroll required | boolean | Required and not set up yet: the dashboard sends this person to the Security page. |
connections required | array of object | |
connections[].provider required | string | One of: google, github. |
connections[].available required | boolean | The server has client credentials for this provider, so the button can show. |
connections[].linked required | boolean | |
connections[].linked_at | string or null (date-time) | When this person linked the account, or null when it is not linked. |
trusted_device_count required | integer | Range: 0 to any. |
Recent sign-ins and security changes
get/users/me/security/eventsPermalink to Recent sign-ins and security changes
- Dashboard session only, no API key
Lists the person's own sign-ins and security changes of the last 3 days, each with its IP address and browser, in pages of up to 200 (default 30). Needs a dashboard session: an API key cannot call it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: at most 200, and 30 when left out. Default: 30. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | SecurityEventList | Events |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of object | |
data[].id required | string (uuid) | |
data[].kind required | string | |
data[].outcome required | string | One of: success, failure, blocked. |
data[].ip required | string or null | |
data[].user_agent required | string or null | |
data[].created_at required | string (date-time) | |
next_cursor | string or null |
Email a code to add a first password or passkey
post/users/me/security/first-factor-codePermalink to Email a code to add a first password or passkey
- Dashboard session only, no API key
For a person with no password and no passkey whose session started more than 15 minutes ago. Sends a 6 digit one-time code to the account address. It works for 10 minutes, once, and is void after 5 wrong tries. At most 3 codes an hour per person: the 4th answers 429 with Retry-After. A newer code replaces an older one. Send the code as email_code with the first password or the first passkey. Answers 409 first_factor_code_not_needed when the person already has a password or passkey, or the session is recent. Answers 422 when the mail provider refuses the message. Browser sessions only; staff acting as a customer cannot use it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Responses
| Status | Body | Description |
|---|---|---|
200 | FirstFactorCodeResult | Sent |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | Conflict with the current state |
422 | Problem | A field is missing or not valid |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
status required | string | |
email required | string | The account address the code went to, so the screen can say where to look. |
expires_in_seconds required | integer | How long the code works, in seconds. |
resend_after_seconds required | integer | Seconds before another code can be sent. Range: 0 to any. |
Secure my account
post/users/me/security/secure-accountPermalink to Secure my account
- Dashboard session only, no API key
Ends every other session, forgets every trusted browser, and ends every assistant connection the person approved, with the API key behind each. Lists the person's API keys that still work, so the screen can offer to revoke them. Sends the account a security notice. Needs a recent sign-in: answers 403 step-up-required otherwise.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, SecureAccountRequest
Responses
| Status | Body | Description |
|---|---|---|
200 | SecureAccountResult | What ended |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | Refused |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
200 response fields
| Name | Type | Description |
|---|---|---|
status required | string | |
sessions_ended required | integer | Range: 0 to any. |
trusted_browsers_forgotten required | integer | Range: 0 to any. |
connections_ended required | integer | Range: 0 to any. |
api_keys required | array of object | The person's API keys that still work. |
api_keys[].id required | string (uuid) | |
api_keys[].name required | string | |
api_keys[].prefix required | string | |
api_keys[].created_at required | string (date-time) | |
api_keys[].last_used_at required | string or null (date-time) |
List sign-in sessions
get/users/me/sessionsPermalink to List sign-in sessions
- Dashboard session only, no API key
Every session of the signed-in person, newest first. current marks this one.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: at most 200, and 50 when left out. Default: 50. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | SessionList | Sessions |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of object | |
data[].id required | string | |
data[].user_agent required | string or null | |
data[].ip required | string or null | |
data[].created_at required | string (date-time) | |
data[].last_active_at required | string (date-time) | |
data[].current required | boolean | |
next_cursor required | string or null |
Sign out every other session
delete/users/me/sessionsPermalink to Sign out every other session
- Dashboard session only, no API key
Sends the account a security notice.
Responses
| Status | Body | Description |
|---|---|---|
200 | SessionsRevoked | How many ended |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
200 response fields
| Name | Type | Description |
|---|---|---|
revoked required | integer | Range: 0 to any. |
List trusted browsers
get/users/me/trusted-devicesPermalink to List trusted browsers
- Dashboard session only, no API key
Lists the person's trusted browsers, each with the time it was trusted (created_at) and the time the trust ends (expires_at). Needs a dashboard session: an API key cannot call it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | TrustedDeviceList | Browsers |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of object | |
data[].id required | string (uuid) | |
data[].created_at required | string (date-time) | |
data[].expires_at required | string (date-time) | |
next_cursor | string or null |
Forget every trusted browser
delete/users/me/trusted-devicesPermalink to Forget every trusted browser
- Dashboard session only, no API key
Sends the account a security notice.
Responses
| Status | Body | Description |
|---|---|---|
204 | Done | |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
Forget one trusted browser
delete/users/me/trusted-devices/{id}Permalink to Forget one trusted browser
- Dashboard session only, no API key
Forgets one of the person's trusted browsers and records a security event. Answers 204, or 404 when the browser was not found. Needs a dashboard session: an API key cannot call it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the trusted browser. |
Responses
| Status | Body | Description |
|---|---|---|
204 | Done | |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | Not found |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
Turn off a two-factor method, or all of them
post/users/me/two-factor/disablePermalink to Turn off a two-factor method, or all of them
- Dashboard session only, no API key
method is totp, email, passkey (with passkey_id), or all. The password is not enough: send a current second_factor too, an authenticator code, a recovery code, a passkey confirmed in the last 10 minutes, or (when emailed codes are the only method) an emailed code. Answers 403 second_factor_required without one and second_factor_invalid for a wrong one; wrong ones count against the same per person lock as sign-in. A person with no password and no passkey that checks them, whose session started more than 15 minutes ago, also sends email_code. Ends every trusted browser and every other session, and sends a security notice. Answers 409 with the code two_factor_required_by_company when it would remove the last method of a person whose company requires two-factor.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, DisableTwoFactorRequest
Fields
| Name | Type | Description |
|---|---|---|
password | string | |
method | string | One of: totp, email, passkey, all. Default: all. |
passkey_id | string | With method passkey: the passkey to remove. |
email_code | string | For a person with no password and no passkey that checks them, whose session started more than 15 minutes ago: the code from POST /users/me/security/first-factor-code. |
second_factor | object | A current second factor. Required: the password alone does not remove one. |
second_factor.method required | string | One of: totp, recovery, passkey, email. |
second_factor.code | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | SecurityStatus | Turned off |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | Refused |
404 | Problem | Not found |
409 | Problem | Conflict with the current state |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
status required | string |
Start emailed sign-in codes
post/users/me/two-factor/emailPermalink to Start emailed sign-in codes
- Dashboard session only, no API key
Sends a code to the account address. Answers 422 when the mail provider refuses the message, and a new code can be asked for at once.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, PasswordConfirmRequest
Fields
| Name | Type | Description |
|---|---|---|
password | string | Needed when the account has a password. A person with no password has nothing to confirm. |
Responses
| Status | Body | Description |
|---|---|---|
200 | SendEmailCodeResult | Sent |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | Refused |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | A field is missing or not valid |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
status required | string | |
resend_after_seconds required | integer | Seconds before another code can be sent. Range: 0 to any. |
Email a code to confirm a two-factor change
post/users/me/two-factor/email/codePermalink to Email a code to confirm a two-factor change
- Dashboard session only, no API key
For a person whose only two-factor method is emailed codes. Sends a code to the account address, to send as second_factor { method: "email", code } when turning two-factor off. Answers 409 when emailed codes are not the person's only method. Counts against the same per person limit as sign-in codes.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Responses
| Status | Body | Description |
|---|---|---|
200 | SendEmailCodeResult | Sent |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | Conflict with the current state |
422 | Problem | A field is missing or not valid |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
status required | string | |
resend_after_seconds required | integer | Seconds before another code can be sent. Range: 0 to any. |
Finish emailed sign-in codes
post/users/me/two-factor/email/confirmPermalink to Finish emailed sign-in codes
- Dashboard session only, no API key
Send the emailed code to finish turning on emailed sign-in codes. A right code turns two-factor on, ends the person's other sessions, and sends them a notice. A wrong code answers 400 invalid_code, and an expired one answers 400 code_expired. Needs a dashboard session: an API key cannot call it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, CodeConfirmRequest
Fields
| Name | Type | Description |
|---|---|---|
code required | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | SecurityStatus | Turned on |
400 | Problem | The request was not valid |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
status required | string |
Make ten new recovery codes
post/users/me/two-factor/recovery-codesPermalink to Make ten new recovery codes
- Dashboard session only, no API key
The old codes stop working. The new ones are shown once. Needs the password and a current second_factor, as for turning two-factor off.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, RegenerateRecoveryCodesRequest
Fields
| Name | Type | Description |
|---|---|---|
password | string | Needed when the account has a password. A person with no password has nothing to confirm. |
email_code | string | As for totpBegin. |
second_factor | object | A current second factor. Required: the password alone does not make new codes. |
second_factor.method required | string | One of: totp, recovery, passkey, email. |
second_factor.code | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | RecoveryCodesResult | New codes |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | Refused |
409 | Problem | Conflict with the current state |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
recovery_codes required | array of string |
Start the authenticator app setup
post/users/me/two-factor/totpPermalink to Start the authenticator app setup
- Dashboard session only, no API key
Answers the secret, the otpauth address for a QR code, and ten recovery codes. Nothing is on until /two-factor/totp/confirm accepts a code from the app. A person with no password and no passkey that checks them, whose session started more than 15 minutes ago, also sends email_code (see POST /users/me/security/first-factor-code).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, TotpBeginRequest
Fields
| Name | Type | Description |
|---|---|---|
password | string | Needed when the account has a password. A person with no password has nothing to confirm. |
email_code | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | TotpBeginResult | Setup details |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | Refused |
409 | Problem | Conflict with the current state |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
totp_uri required | string | The otpauth URI for a QR code. |
secret required | string | The same secret as text, for typing into an app. |
recovery_codes required | array of string | Ten single use recovery codes. Shown once. |
Finish the authenticator app setup
post/users/me/two-factor/totp/confirmPermalink to Finish the authenticator app setup
- Dashboard session only, no API key
Send the code from the authenticator app to finish the setup that POST /users/me/two-factor/totp started. A right code turns two-factor on, ends the person's other sessions, and sends them a notice. A wrong code answers 400 invalid_code, and repeated wrong codes lock the check for a while. Needs a dashboard session: an API key cannot call it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, CodeConfirmRequest
Fields
| Name | Type | Description |
|---|---|---|
code required | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | SecurityStatus | Turned on |
400 | Problem | The request was not valid |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | Too many attempts. Retry-After says when to try again |
200 response fields
| Name | Type | Description |
|---|---|---|
status required | string |