Me
9 operations in the WP Waterfall API.
- getValidate the current API key
- getCurrent user
- patchUpdate current user
- deleteRevoke a session
- getTell whether the session confirmed it is the person recently
- postConfirm the password for a sensitive action
- postConfirm with a passkey for a sensitive action
- postStart confirming with a passkey
- postSwitch the active workspace (an individual account or an agency)
Validate the current API key
get/api-keys/currentPermalink to Validate the current API key
Returns the key the call was made with: its id, name, scopes, the company it acts in (company_id), and company_ids, the companies it is limited to, or null when it has no such limit. Use it to check that a key works. A dashboard session gets 401.
Responses
| Status | Body | Description |
|---|---|---|
200 | CurrentApiKey | Current key |
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 |
|---|---|---|
id required | string (uuid) | |
name required | string | |
scopes required | array of string | |
company_id required | string | The company this call acts in. |
company_ids required | array or null | The companies the key reaches. Null means every company the person belongs to. |
Current user
get/users/mePermalink to Current user
Returns the signed-in person: their profile, the workspaces they can switch into with their role in each, the current company, and the role and permissions they hold there. Needs a dashboard session: an API key gets 401 and checks itself with GET /api-keys/current instead.
Responses
| Status | Body | Description |
|---|---|---|
200 | User | User |
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 |
|---|---|---|
id required | string | |
email required | string (email) | |
name required | string | |
locale required | string | Default: en. |
assistant_mode required | boolean | The person turned the Nami assistant screen on. It comes back on the next visit. Default: false. |
marketing_consent_at required | string or null (date-time) | When the person agreed to product news and tips by email, or null. Null means no marketing email. |
email_verified_at required | string or null (date-time) | |
created_at required | string (date-time) |
Update current user
patch/users/mePermalink to Update current user
Changes the person's own name, locale, assistant_mode, or marketing_consent. Fields left out keep their value. marketing_consent: true records the time of the opt-in, false clears it, and the audit log records each change of consent. Needs a dashboard session.
Responses
| Status | Body | Description |
|---|---|---|
200 | User | User |
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 |
|---|---|---|
id required | string | |
email required | string (email) | |
name required | string | |
locale required | string | Default: en. |
assistant_mode required | boolean | The person turned the Nami assistant screen on. It comes back on the next visit. Default: false. |
marketing_consent_at required | string or null (date-time) | When the person agreed to product news and tips by email, or null. Null means no marketing email. |
email_verified_at required | string or null (date-time) | |
created_at required | string (date-time) |
Revoke a session
delete/users/me/sessions/{id}Permalink to Revoke a session
- Dashboard session only, no API key
Ends one of the person's own sign-in sessions, the current one included, and records a security event. Answers 204, or 404 when the session 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 session, from the session list. |
Responses
| Status | Body | Description |
|---|---|---|
204 | Revoked | |
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 | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
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. |
Tell whether the session confirmed it is the person recently
get/users/me/step-upPermalink to Tell whether the session confirmed it is the person recently
- Dashboard session only, no API key
A signed-in session only. No API key may call it. Answers whether this session passed the confirmation (the password, or a passkey that checks the person) in the last 10 minutes, and when that ends. The field password_set is false for a person who signs in with Google, GitHub, or a company identity provider only. The field passkey_available is true when the person has a passkey that checks them. The field proof_available is true when either can confirm: a person who has neither cannot confirm and is not asked. The field recent_sign_in is true when the session started in the last 15 minutes, the time in which a person with neither can add a first passkey or a first password without more. After that they also send the 6 digit code emailed by POST /users/me/security/first-factor-code. The field google_only is true for a person who signs in with Google and has no password or passkey: they confirm with Google. The field google_fresh is true when that Google sign in began this session in the last 10 minutes, and then fresh is true too. The field expires_at is when the confirmation ends, for the password, a passkey, and Google alike. The field seconds_left is the whole seconds until then by the server's clock, and 0 when the session is not fresh. The dashboard reads both when a tool that needs a confirmation opens, so it asks before the person types and not after (ADR 301). It changes nothing. The hosted MCP server reads it before it accepts an approval from a person who has two-factor authentication on and a way to confirm.
Responses
| Status | Body | Description |
|---|---|---|
200 | object | Whether the confirmation is still fresh |
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 |
|---|---|---|
fresh required | boolean | |
expires_at required | one of string (date-time), null | |
seconds_left required | integer | |
password_set required | boolean | |
passkey_available required | boolean | |
proof_available required | boolean | |
recent_sign_in required | boolean | |
google_only required | boolean | |
google_fresh required | boolean |
Confirm the password for a sensitive action
post/users/me/step-upPermalink to Confirm the password for a sensitive action
- Dashboard session only, no API key
A signed-in session only. No API key may call it. Marks the session as freshly signed in for 10 minutes, which credential reveals and similar actions need. Wrong passwords are counted per session, and too many answer 429.
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, StepUpRequest
Fields
| Name | Type | Description |
|---|---|---|
password required | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | When the confirmation was recorded and when it ends |
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 password is not right |
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 wrong passwords. Try again in a few minutes |
200 response fields
| Name | Type | Description |
|---|---|---|
verified_at required | string (date-time) | |
expires_at required | string (date-time) |
Confirm with a passkey for a sensitive action
post/users/me/step-up/passkeyPermalink to Confirm with a passkey for a sensitive action
- Dashboard session only, no API key
A signed-in session only. No API key may call it. Checks the browser's WebAuthn answer against the saved key, the origin, the relying party id, the counter, and that the authenticator checked the person. A right answer marks the session as freshly signed in for 10 minutes, the same as the password does. A wrong answer is counted with the wrong passwords and answers 403 with the code passkey_failed.
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, StepUpPasskeyRequest
Fields
| Name | Type | Description |
|---|---|---|
response required | object |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | When the confirmation was recorded and when it ends |
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 passkey did not work |
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 wrong answers. Try again in a few minutes |
200 response fields
| Name | Type | Description |
|---|---|---|
verified_at required | string (date-time) | |
expires_at required | string (date-time) |
Start confirming with a passkey
post/users/me/step-up/passkey/optionsPermalink to Start confirming with a passkey
- Dashboard session only, no API key
A signed-in session only. No API key may call it. For a person who has a passkey that checks them (PIN, fingerprint, or face), including a person who signs in with Google, GitHub, or a company identity provider and has no password. Answers the WebAuthn options for the browser. The challenge is made by the server, works once, lasts three minutes, and is bound to this session (and to the acting session when staff act as a customer). It needs a browser.
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 | object | WebAuthn options |
400 | Problem | No passkey that checks the person is set up |
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 wrong answers. Try again in a few minutes |
200 response fields
| Name | Type | Description |
|---|---|---|
options required | object |
Switch the active workspace (an individual account or an agency)
post/users/me/workspacePermalink to Switch the active workspace (an individual account or an agency)
- Dashboard session only, no API key
Makes company_id the active workspace of this session and returns that workspace with the caller's role in it. Answers 403 when the caller is not a member of the workspace or it is closed. 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. |
Responses
| Status | Body | Description |
|---|---|---|
200 | Workspace | |
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 | You are not a member of that workspace |
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. |