Skip to content

Account security

28 operations in the WP Waterfall API.

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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
token requiredstringThe token from the link in the email.

Responses

StatusBodyDescription
200CancelRecoveryResultStopped, or nothing to stop
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemA field is missing or not valid
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
cancelled requiredbooleanTrue 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
url requiredstring (uri)The address of the page the person was on.
notestringWhat the person typed. May be empty when a picture is sent. Default: .
screenshotobject or nullA picture of the page as the person saw it, or null when they sent none.
screenshot.content_type requiredstringThe kind of picture. One of: image/jpeg, image/png.
screenshot.data requiredstringThe picture in base64, with no data: prefix. At most 1.5 MB before base64.
viewportobjectThe size of the browser window, in CSS pixels.
viewport.width requiredintegerThe width of the window, in CSS pixels. Range: 1 to 20000.
viewport.height requiredintegerThe height of the window, in CSS pixels. Range: 1 to 20000.

Responses

StatusBodyDescription
202BugReportResponseReceived
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemRefused
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemA field is missing or not valid
429ProblemToo many attempts. Retry-After says when to try again
503ProblemNot set up on this server

202 response fields

NameTypeDescription
received requiredbooleanAlways 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

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200ConnectionListConnections
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
data requiredarray of object
data[].provider requiredstringOne of: google, github.
data[].available requiredbooleanThe server has client credentials for this provider, so the button can show.
data[].linked requiredboolean
data[].linked_atstring or null (date-time)When this person linked the account, or null when it is not linked.
next_cursorstring 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

NameInTypeDescription
provider requiredpathstring

Responses

StatusBodyDescription
204Unlinked
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemRefused
404ProblemNot found
409ProblemConflict with the current state
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA 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

NameInTypeDescription
provider requiredpathstring
Idempotency-Key requiredheaderstringSend 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

StatusBodyDescription
200RedirectUrlProvider address
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemRefused
404ProblemNot found
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
503ProblemNot set up on this server

200 response fields

NameTypeDescription
url requiredstring (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

StatusBodyDescription
200IntercomIdentityThe identity
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemRefused
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
503ProblemNot set up on this server

200 response fields

NameTypeDescription
app_id requiredstringThe Intercom workspace id the Messenger boots with.
user_jwt requiredstringA 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 requiredstring (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

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200PasskeyListPasskeys
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
data requiredarray of object
data[].id requiredstring
data[].name requiredstring
data[].created_at requiredstring (date-time)
data[].last_used_at requiredstring or null (date-time)
data[].synced requiredbooleanThe operating system or a password manager keeps a copy, so it follows the person to a new device.
next_cursorstring 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
namestring
response requiredobject
email_codestringThe same code as the options call. It is used up here, when the first passkey is saved.

Responses

StatusBodyDescription
200PasskeyRegisterResultAdded
400ProblemThe request was not valid
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemConflict with the current state
422ProblemA field is missing or not valid
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
passkey requiredobject
passkey.id requiredstring
passkey.name requiredstring
passkey.created_at requiredstring (date-time)
passkey.last_used_at requiredstring or null (date-time)
passkey.synced requiredbooleanThe operating system or a password manager keeps a copy, so it follows the person to a new device.
recovery_codes requiredarray of stringTen 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
passwordstringNeeded when the account has a password. A person with no password has nothing to confirm.
email_codestringNeeded for a first passkey when the session started more than 15 minutes ago.

Responses

StatusBodyDescription
200PasskeyOptionsResultWebAuthn options
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemRefused
409ProblemConflict with the current state
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
options requiredobject

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

NameInTypeDescription
id requiredpathstringThe id of the passkey, from the passkey list.
Idempotency-KeyheaderstringOptional 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

NameTypeDescription
name requiredstring

Responses

StatusBodyDescription
200SecurityStatusRenamed
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemNot found
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemA field is missing or not valid
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
status requiredstring

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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
current_passwordstringRequired when the account already has a password. A Google or GitHub account has none yet.
new_password requiredstring
email_codestringNeeded 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

StatusBodyDescription
200SecurityStatusDone
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemRefused
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemA field is missing or not valid
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
status requiredstring

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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

StatusBodyDescription
200SecurityStatusSkipped
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
status requiredstring

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

StatusBodyDescription
200SecurityOverviewOverview
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
email requiredstring
email_verified requiredboolean
has_password requiredboolean
password_nudge requiredbooleanTrue for a person who signed in with Google or GitHub and has not made a password.
has_proof requiredbooleanTrue when a password or a passkey that checks the person can confirm sensitive actions.
recent_sign_in requiredbooleanTrue 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 requiredarray of string
two_factor requiredobject
two_factor.enabled requiredboolean
two_factor.passkeys requiredintegerHow many passkeys the person has. Range: 0 to any.
two_factor.totp requiredboolean
two_factor.email requiredboolean
two_factor.recovery_codes_remaining requiredinteger or nullRange: 0 to any.
two_factor.required_by_company requiredbooleanA company this person belongs to requires two factor.
two_factor.must_enroll requiredbooleanRequired and not set up yet: the dashboard sends this person to the Security page.
connections requiredarray of object
connections[].provider requiredstringOne of: google, github.
connections[].available requiredbooleanThe server has client credentials for this provider, so the button can show.
connections[].linked requiredboolean
connections[].linked_atstring or null (date-time)When this person linked the account, or null when it is not linked.
trusted_device_count requiredintegerRange: 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

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: at most 200, and 30 when left out. Default: 30. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200SecurityEventListEvents
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
data requiredarray of object
data[].id requiredstring (uuid)
data[].kind requiredstring
data[].outcome requiredstringOne of: success, failure, blocked.
data[].ip requiredstring or null
data[].user_agent requiredstring or null
data[].created_at requiredstring (date-time)
next_cursorstring 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

StatusBodyDescription
200FirstFactorCodeResultSent
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemConflict with the current state
422ProblemA field is missing or not valid
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
status requiredstring
email requiredstringThe account address the code went to, so the screen can say where to look.
expires_in_seconds requiredintegerHow long the code works, in seconds.
resend_after_seconds requiredintegerSeconds 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

StatusBodyDescription
200SecureAccountResultWhat ended
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemRefused
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
status requiredstring
sessions_ended requiredintegerRange: 0 to any.
trusted_browsers_forgotten requiredintegerRange: 0 to any.
connections_ended requiredintegerRange: 0 to any.
api_keys requiredarray of objectThe person's API keys that still work.
api_keys[].id requiredstring (uuid)
api_keys[].name requiredstring
api_keys[].prefix requiredstring
api_keys[].created_at requiredstring (date-time)
api_keys[].last_used_at requiredstring 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

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: at most 200, and 50 when left out. Default: 50. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200SessionListSessions
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
data requiredarray of object
data[].id requiredstring
data[].user_agent requiredstring or null
data[].ip requiredstring or null
data[].created_at requiredstring (date-time)
data[].last_active_at requiredstring (date-time)
data[].current requiredboolean
next_cursor requiredstring 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

StatusBodyDescription
200SessionsRevokedHow many ended
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
revoked requiredintegerRange: 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

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200TrustedDeviceListBrowsers
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
data requiredarray of object
data[].id requiredstring (uuid)
data[].created_at requiredstring (date-time)
data[].expires_at requiredstring (date-time)
next_cursorstring 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

StatusBodyDescription
204Done
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the trusted browser.

Responses

StatusBodyDescription
204Done
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemNot found
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
passwordstring
methodstringOne of: totp, email, passkey, all. Default: all.
passkey_idstringWith method passkey: the passkey to remove.
email_codestringFor 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_factorobjectA current second factor. Required: the password alone does not remove one.
second_factor.method requiredstringOne of: totp, recovery, passkey, email.
second_factor.codestring

Responses

StatusBodyDescription
200SecurityStatusTurned off
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemRefused
404ProblemNot found
409ProblemConflict with the current state
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
status requiredstring

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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
passwordstringNeeded when the account has a password. A person with no password has nothing to confirm.

Responses

StatusBodyDescription
200SendEmailCodeResultSent
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemRefused
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemA field is missing or not valid
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
status requiredstring
resend_after_seconds requiredintegerSeconds 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

StatusBodyDescription
200SendEmailCodeResultSent
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemConflict with the current state
422ProblemA field is missing or not valid
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
status requiredstring
resend_after_seconds requiredintegerSeconds 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
code requiredstring

Responses

StatusBodyDescription
200SecurityStatusTurned on
400ProblemThe request was not valid
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
status requiredstring

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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
passwordstringNeeded when the account has a password. A person with no password has nothing to confirm.
email_codestringAs for totpBegin.
second_factorobjectA current second factor. Required: the password alone does not make new codes.
second_factor.method requiredstringOne of: totp, recovery, passkey, email.
second_factor.codestring

Responses

StatusBodyDescription
200RecoveryCodesResultNew codes
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemRefused
409ProblemConflict with the current state
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
recovery_codes requiredarray 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
passwordstringNeeded when the account has a password. A person with no password has nothing to confirm.
email_codestring

Responses

StatusBodyDescription
200TotpBeginResultSetup details
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemRefused
409ProblemConflict with the current state
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
totp_uri requiredstringThe otpauth URI for a QR code.
secret requiredstringThe same secret as text, for typing into an app.
recovery_codes requiredarray of stringTen 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
code requiredstring

Responses

StatusBodyDescription
200SecurityStatusTurned on
400ProblemThe request was not valid
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemToo many attempts. Retry-After says when to try again

200 response fields

NameTypeDescription
status requiredstring