The Signal House API uses JSON Web Tokens (JWT) for authentication. Tokens can be obtained in two ways:
All authenticated requests must include the token in the Authorization header as a Bearer token.
A third kind of token exists but cannot be used here: the access token issued by the OAuth connector flow. Every route under /user, and the authenticated routes under /auth, reject a connector token with 403. A connector acts for a user who signed in through their Signal House account rather than handing over a credential, so it must not be able to mint API keys, change a password, read token history, or end sessions. Tokens from user login and from a service user are unaffected.
Authenticate a user by posting their credentials to the /auth endpoint. On success, the response contains a JWT valid for 12 hours.
Exchange email and password for a JWT Bearer token valid for 12 hours.
| Field | Type | Required | Description |
|---|---|---|---|
email | String | Required | The registered email address. |
password | String | Required | Account password (min 8 characters). |
{
"email": "user@example.com",
"password": "your-password"
}{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"role": "admin"
}Service users are non-interactive accounts designed for programmatic access. They issue tokens with a 365-day expiry, making them ideal for backend integrations, scripts, and automated workflows.
Create a non-login Service User (API Key) and instantly receive a JWT with a 365-day expiry.
The following roles are required to use this endpoint: admin, developer
| Field | Type | Required | Description |
|---|---|---|---|
groupId | String | Optional | Group ID the service user belongs to (starts with G, exactly 8 chars). Required when role is 'api'; omit for 'signalhouse_api'. |
name | String | Required | A descriptive name for the service user. |
role | String | Required | Must be 'api' (or 'signalhouse_api' for internal accounts). |
allowedIps | Array<String> | Optional | Only accept this key from these IPv4/IPv6 addresses or CIDR ranges, e.g. ["203.0.113.10", "198.51.100.0/24"]. Max 100. Omit or [] for no IP restriction. 'api' keys only. |
allowedCountries | Array<String> | Optional | Only accept this key from these countries (ISO 3166-1 alpha-2, e.g. ["US", "CA"]). Must be an assigned code: "UK" is rejected (use "GB"), as is "ZZ". Max 250. Omit or [] for no country restriction. When both lists are set, a request must match both. 'api' keys only. |
allowedDestinationCountries | Array<String> | Optional | Only let this key send messages to these countries (ISO 3166-1 alpha-2, e.g. ["US", "CA"]). A send with any recipient elsewhere is rejected with 403 DESTINATION_COUNTRY_NOT_ALLOWED and nothing goes out. US toll-free numbers count as US; Guernsey (GG), Jersey (JE) and the Isle of Man (IM) are separate from GB. Max 250. Omit or [] for any country. 'api' keys only. |
| Role | Description |
|---|---|
admin | Full access to the customer's group and all its resources. |
developer | Access to messaging, numbers, API keys, and webhooks. |
billing | Access to billing, invoices, and payment settings. |
user | Basic access with limited permissions. |
api | Programmatic access for service users (API keys). One of the two roles allowed when creating a service user, alongside the internal signalhouse_api role. |
{
"groupId": "G1234567",
"name": "My Integration Bot",
"role": "api"
}{
"user": {
"user": {
"_id": "60f7b2a1c9e77c001a2b3c5d",
"firstName": "My Integration Bot",
"role": "api",
"activeGroupId": "G1234567",
"status": "active",
"mfaEnabled": false,
"viewGroupIds": [
"G1234567"
],
"createdAt": "2024-01-15T12:00:00.000Z",
"updatedAt": "2024-01-15T12:00:00.000Z"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}When making raw HTTP requests, include the token in the Authorization header:
Authorization: Bearer <token>When you initialize the SDK with an apiKey, that token is sent automatically with every request.
You can override the default API key on any individual call by passing options: { token }. This is useful when an application authenticates on behalf of multiple users.
allowedIps and/or allowedCountries when creating the key (or later with PUT /user/:id, or on the API Keys page) so a leaked key is useless anywhere else. A request from outside the allowed IPs or countries gets a 403 whose message names the caller's IP and country, so a misconfiguration is easy to spot. The IP checked is the address that connects to Signal House, so allow your servers' public egress IPs. To cap what a leaked key could cost you, also set allowedDestinationCountries to the countries you actually message: a send anywhere else is rejected before it goes out.api role (or signalhouse_api for internal accounts). Scope each service user to a single group and reuse it only for the integration it was created for.401 responses and re-authenticate or refresh the token when needed.options: { token }) when your application acts on behalf of multiple users, rather than reinitializing the SDK.Authenticate a user and receive a JWT Bearer token for subsequent API requests. A response that carries a token also carries role, the signed-in user's role (for example admin, developer, billing or user), so a client can show or hide features without decoding the JWT; authorization is still enforced by the API on every request. If the account has two-factor authentication on, the response is a challenge instead of a token: { mfaRequired: true, challengeId, methods, primaryMethod, hasBackupCodes }. Complete it with POST /auth/2fa/challenge/:challengeId/verify (see Two-factor authentication below). If a group the user belongs to requires two-factor authentication (PUT /group/:id with requireTwoFactor) and the user hasn't turned it on, the response is { token, role, twoFactorSetupRequired: true }: a setup-only session that can only use the /auth/2fa endpoints, GET /auth/oauth/links, POST /auth/oauth/:provider/reauth, POST /auth/oauth/reauth/confirm and GET /user for the user's own id. Every other request with it is refused with a 403. Once a method is on, sign in again for a full session.
| Field | Type | Required | Description |
|---|---|---|---|
email | String | Required | The registered email address. |
password | String | Required | Account password (min 8 characters). |
deviceToken | String | Optional | A trusted-device token returned by an earlier 2FA verification with rememberDevice. While it's valid (30 days), the second factor is skipped. |
{
"email": "developer@example.com",
"password": "securepassword123"
}{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MGY3YjJhMWM5ZTc3YzAwMWEyYjNjNGQiLCJncm91cElkIjoiRzEyMzQ1NjciLCJyb2xlIjoiYWRtaW4iLCJpYXQiOjE2OTAwMDAwMDAsImV4cCI6MTY5MDA0MzIwMH0.placeholder_signature",
"role": "admin"
}Verify a new account's email using the single-use token from the verification email link. On success the account's email is marked verified and a session JWT is returned for the user the link was emailed to, so clicking the link signs that account in on any device — use the token exactly as you would the one from POST /auth. The token field is omitted when a session cannot be established (a link issued before auto-login shipped, an inactive/ineligible account, or an account with two-factor authentication on, because the link is not a second factor and that user signs in normally); verified is still true in that case, so treat a missing token as 'verified, please log in' rather than a failure. The link is single-use, expires 24 hours after it is issued, and this endpoint is rate limited per source IP. Public — no authentication required.
| Field | Type | Required | Description |
|---|---|---|---|
token | String | Required | The single-use verification token from the email link. |
{
"token": "9f1c0b7a2d4e6f8a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f3a5b7c9d1e3f5a"
}{
"verified": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Retrieve the authenticated caller's customer-safe onboarding preferences — the selections captured at signup plus the gate flags derived from them. This endpoint never returns internal KYC, staff assignment, referral, or external-reference data. Staff roles and sessions with no active group receive a synthetic verified, selection-free record rather than an error.
{
"acceptedTermsOfService": true,
"emailVerified": true,
"products": [
"api"
],
"estimatedVolume": "10k-100k",
"pendingExternalLink": null
}Request a password-reset link be emailed to the given address. Always responds with { success: true } regardless of whether an account exists for the email, so the endpoint cannot be used to enumerate registered emails. Public — no authentication required.
| Field | Type | Required | Description |
|---|---|---|---|
email | String | Required | The email address to send a reset link to. |
{
"email": "jordan@reyesretail.com"
}{
"success": true
}Reset a password using the single-use token from a password-reset email link. The token is consumed on first use and the user's existing sessions are invalidated. Public — no authentication required.
| Field | Type | Required | Description |
|---|---|---|---|
token | String | Required | The single-use reset token from the email link. |
password | String | Required | The new password to set (min 8 characters). |
{
"token": "a1b2c3d4e5f6...",
"password": "newSecurePassword123"
}{
"success": true
}Resend the account verification email to the authenticated caller (the email is sent to the caller's own address). Issuing a new link invalidates the previous one, and only the most recent link will work. Rate limited per user.
The following roles are required to use this endpoint: admin, developer, billing, user, api
{}{
"sent": true
}Reset the password for a specific user ID.
The following roles are required to use this endpoint: admin, api, self
| Field | Type | Required | Description |
|---|---|---|---|
id | URL Param | Required | The User's ObjectId. |
newPassword | String | Required | The new password (min 8 characters). |
{
"newPassword": "newSecurePassword123!"
}{
"Message": "Password reset successfully"
}Retrieve token login history for a group or user. signInMethod is how the user signed in: password, google, microsoft or apple.
The following roles are required to use this endpoint: admin, api, self
| Field | Type | Required | Description |
|---|---|---|---|
groupId | Query Param | Optional | Filter by Group ID. At least one of groupId or userId must be supplied. |
userId | Query Param | Optional | Filter by User ObjectId. At least one of groupId or userId must be supplied. |
page | Query Param | Optional | Page number for pagination (default: 1). |
limit | Query Param | Optional | Results per page (default: 20, max 100). |
[
{
"_id": "60f7b2a1c9e77c001a2b3c4d",
"groupId": "G1234567",
"userId": "60f7b2a1c9e77c001a2b3c4e",
"deviceName": "Chrome 120 on Windows",
"ipAddress": "192.168.1.100",
"tokenExpiration": "2024-01-16T12:00:00.000Z",
"signInMethod": "password",
"location": {
"city": "Springfield",
"state": "Missouri",
"country": "United States"
},
"createdAt": "2024-01-15T12:00:00.000Z",
"updatedAt": "2024-01-15T12:00:00.000Z"
}
]Log out every other user in the caller's active group by invalidating their tokens. Operates only on the caller's own active group; takes no request body and does not target any other group.
The following roles are required to use this endpoint: admin
{
"loggedOutCount": 2
}Return the Group ID associated with the caller's JWT (the caller's active group). Lets API users discover their own groupId — required on most other requests — without any additional lookup. Takes no parameters.
The following roles are required to use this endpoint: admin, developer, billing, user, api
{
"groupId": "G1234567"
}Mint a single-use, short-lived (15 minute) external-link token bound to the caller's active group. The token is handed to an external integration (Go High Level or Shopify) so its backend can link the caller's existing account to its tenant. The caller must have an active group.
The following roles are required to use this endpoint: admin, developer, billing, user, api
| Field | Type | Required | Description |
|---|---|---|---|
product | String | Required | The external system to link to. One of 'ghl' or 'shopify'. |
{
"product": "ghl"
}{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Users can sign in with Google, Microsoft or Apple instead of a password, or through their organization's own identity provider with Enterprise SSO. The flow is a browser redirect, not an API call: send the browser to GET /auth/oauth/:provider. After the user approves, the API redirects them to the portal at /auth/callback?ticket=… (or ?error=…). The ticket is single-use and expires after 10 minutes; a JWT is never placed in a URL.
Enterprise SSO uses sso as the provider and takes the user's work email: GET /auth/oauth/sso?email=…. The API finds the group that has verified that email's domain (see Groups › Enterprise SSO) and sends the browser to that group's OpenID Connect provider. The provider is only trusted for the group's verified domains, and only ever signs people in to that group: an existing account in the group with that email is linked, and someone new gets an account in the group with the user role.
Linking a provider to an account that is already signed in is also a browser redirect. Confirm it's you (POST /auth/2fa/confirm-identity), get a single-use link ticket from POST /auth/oauth/:provider/link, then send the browser to GET /auth/oauth/:provider?linkTicket=…. The API returns the browser to the portal's /Settings/Security?pendingLink=… (or ?linkError=<code>). Nothing is linked yet: finish with POST /auth/oauth/links/confirm from the same signed-in account. Only the account the link was started for can confirm it, so a link URL opened in someone else's browser can't attach their provider to your account. An account can't unlink its only way to sign in.
Read the ticket with POST /auth/oauth/ticket to see what it resolves to. A session ticket is exchanged for a JWT with POST /auth/oauth/exchange. A select ticket means the email belongs to several accounts: show the accounts and exchange with the chosen userId. A signup ticket means the email has no account yet. Send the person to the Signal House sign-up page to create one.
Callback error codes: access_denied, invalid_state, provider_error, verification_failed, email_unverified, account_not_eligible, account_email_unverified, provider_unavailable, server_error, and for Enterprise SSO sso_not_configured (the email's domain has no verified single sign-on) and sso_domain_mismatch (the identity provider returned an email outside the group's verified domains). Linking can also return already_linked. An Apple "Hide My Email" address is never matched to an existing account by email; it only reaches an account it was linked to. Only identities whose email the provider has verified are accepted, and Signal House staff and API users cannot sign in with a provider. A provider sign-in is linked to an existing account only when that account's user has proven they own the email (by opening a verification or password-reset email, or by signing up through a provider); otherwise the callback returns account_email_unverified and the user signs in with their password or resets it first.
List the sign-in providers enabled on this API. Only providers with credentials configured are returned. 'sso' is listed when Enterprise SSO is enabled on this API; whether a particular email can use it is only known once GET /auth/oauth/sso is called with that email.
[
{
"id": "google",
"label": "Google"
},
{
"id": "microsoft",
"label": "Microsoft"
},
{
"id": "apple",
"label": "Apple"
},
{
"id": "sso",
"label": "Enterprise SSO"
}
]Start a provider sign-in, or link a provider to a signed-in account. Navigate the browser here (do not call it with fetch): the API sets a short-lived HttpOnly state cookie and responds 302 to the provider's consent screen. If the sign-in can't start it redirects to the portal's /auth/callback?error=<code> instead: provider_unavailable, sso_not_configured, or invalid_state for a bad link ticket (a failed link goes to /Settings/Security?linkError=<code>). An optional next path is kept with the sign-in's single-use state and handed back on the final redirect, so the user can be returned to where they started.
| Field | Type | Required | Description |
|---|---|---|---|
provider | URL Param | Required | One of 'google', 'microsoft', 'apple' or 'sso' (Enterprise SSO). |
email | Query Param | Optional | Required for 'sso': the user's work email. Its domain picks the organization's identity provider, and it is passed to that provider as a login hint. |
linkTicket | Query Param | Optional | Link the provider to the signed-in account that requested this ticket (POST /auth/oauth/:provider/link) instead of signing in. Single-use, valid for 2 minutes, and only for the provider it was issued for. Not accepted for 'sso'. |
reauthTicket | Query Param | Optional | Sign in again with a provider already linked to the signed-in account, to confirm it's you (POST /auth/oauth/:provider/reauth) instead of signing in. Single-use, valid for 2 minutes, and only for the provider it was issued for. With 'sso', email isn't needed. The provider is asked to make the person sign in again (prompt=login, max_age=0); the API then returns the browser to the portal's /Settings/Security?pendingReauth=<token>, which the session that started it redeems with POST /auth/oauth/reauth/confirm, or ?reauthError=<code> (reauth_wrong_account, reauth_unsupported when the provider sent no auth_time, reauth_stale when the sign-in is more than 5 minutes old, invalid_state, access_denied, provider_error). |
next | Query Param | Optional | A path on the portal to return to after sign-in, e.g. /oauth/consent?request=abc. It must start with a single '/', contain no backslash or control characters, and be at most 512 characters; anything else is ignored and the sign-in continues without it. |
The provider's redirect target; register this URL with each provider (for Enterprise SSO, each organization registers /auth/oauth/sso/callback with its own identity provider). Google, Microsoft and SSO providers call it with GET; Apple form-posts to it (POST, response_mode=form_post). It verifies the state and ID token, then redirects (303) to the portal's /auth/callback with ?ticket=… on success (plus &next=<path> when the sign-in was started with one) or ?error=<code> on failure. A link flow redirects to /Settings/Security?pendingLink=<ticket> (confirm it with POST /auth/oauth/links/confirm) or ?linkError=<code> instead. Not called directly by integrations.
| Field | Type | Required | Description |
|---|---|---|---|
provider | URL Param | Required | One of 'google', 'microsoft', 'apple' or 'sso'. |
code | Query Param | Optional | Authorization code from the provider (a form field for Apple). |
state | Query Param | Optional | The state issued when the sign-in started (a form field for Apple). |
error | Query Param | Optional | Provider error, e.g. access_denied when the user declines. |
Read what a sign-in ticket resolves to, without consuming it. kind is 'session' (exchange it), 'select' (choose one of accounts, then exchange) or 'signup' (finish registration; profile holds the provider's details).
| Field | Type | Required | Description |
|---|---|---|---|
ticket | String | Required | The ticket from the /auth/callback redirect. |
{
"ticket": "Jx3l9b5m0n2Q8rV1sT4uW7yZ"
}{
"kind": "select",
"provider": "google",
"accounts": [
{
"userId": "60f7b2a1c9e77c001a2b3c4e",
"groupId": "G1234567",
"groupName": "Reyes Retail Co.",
"role": "admin"
},
{
"userId": "60f7b2a1c9e77c001a2b3c4f",
"groupId": "G7654321",
"groupName": "Reyes Wholesale",
"role": "user"
}
]
}Exchange a 'session' or 'select' ticket for a JWT Bearer token. Consumes the ticket. For a 'select' ticket, userId must be one of the offered accounts; choosing it links the provider to that account for next time. 'signup' tickets are rejected: the email has no account yet, and the person must create one on the Signal House sign-up page. Like POST /auth, an account with two-factor authentication on gets a challenge ({ mfaRequired: true, challengeId, ... }) instead of a token.
| Field | Type | Required | Description |
|---|---|---|---|
ticket | String | Required | The ticket from the /auth/callback redirect. |
userId | String | Optional | Required for a 'select' ticket: the chosen account's userId. |
deviceToken | String | Optional | A trusted-device token from an earlier 2FA verification; skips the second factor while valid. |
{
"ticket": "Jx3l9b5m0n2Q8rV1sT4uW7yZ",
"userId": "60f7b2a1c9e77c001a2b3c4e"
}{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}List your sign-in methods: whether you chose your own password (passwordKnown is false for an account created through a provider or Enterprise SSO until it sets a password through a reset link sent to the email its sign-in provider verified; changing the password while signed in doesn't count), and every provider linked to your account. Requires signing in directly: an OAuth connector token is rejected with 403.
The following roles are required to use this endpoint: admin, developer, billing, user
{
"passwordKnown": true,
"links": [
{
"provider": "google",
"email": "jordan@gmail.com",
"linkedAt": "2026-10-01T12:00:00.000Z",
"lastLoginAt": "2026-10-14T09:30:00.000Z"
}
]
}Start linking Google, Microsoft or Apple to your account. Returns a single-use link ticket valid for 2 minutes; send the browser to GET /auth/oauth/:provider?linkTicket=<ticket> to choose the provider account. The provider must confirm the account's email address. One account per provider: to switch, unlink first. Requires a fresh POST /auth/2fa/confirm-identity from the same session, which this spends; without one the request is refused with a 403. Signal House staff and API users can't link providers. An Enterprise SSO identity can't be linked here; it is linked by signing in through the organization's provider.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
provider | URL Param | Required | One of 'google', 'microsoft' or 'apple'. |
{
"linkTicket": "qH7vZ2mK9pR4sT1uW3xY5a",
"expiresInSeconds": 120
}Start signing in again with a provider already linked to your account, to confirm it's you. Returns a single-use ticket valid for 2 minutes; send the browser to GET /auth/oauth/:provider?reauthTicket=<ticket>. The ticket is tied to your linked provider account and to this session, and spends nothing. The response also carries a single-use reauthSecret, returned only here: keep it in the browser that starts the flow. The provider round trip returns a pendingReauth, which counts only once this same session redeems it, with that secret, through POST /auth/oauth/reauth/confirm. With two-factor authentication off, a redeemed re-sign-in counts as a POST /auth/2fa/confirm-identity for this session. With it on, it doesn't replace a code, but it is required, together with a code, to turn two-factor authentication off on an account that never chose a password and has a linked Microsoft, Apple or Enterprise SSO sign-in that is currently offered (an account that signs in only with Google turns it off with a code alone). Refused with a 400 when that provider isn't linked to your account, or when it can't confirm a fresh sign-in: Google sends no auth_time, so it is never offered for this (use a code instead). Requires signing in directly: an OAuth connector token is rejected with 403.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
provider | URL Param | Required | One of 'google', 'microsoft', 'apple' or 'sso'; must be linked to your account. |
{
"reauthTicket": "Lm4pQ8sV2xZ6bD1fH3jK5n",
"reauthSecret": "Zt6wE3rY9uI1oP5aS8dF2g",
"expiresInSeconds": 120
}Finish signing in again with a linked provider. After the provider round trip the API returns the browser to the portal's /Settings/Security?pendingReauth=<token>; send that token here, with the reauthSecret, from the session that called POST /auth/oauth/:provider/reauth. It counts only for that session and that secret: redeemed by another account, another session or without the secret, it is refused with a 403 and used up, so a start link opened in someone else's browser can never confirm your session, even when that browser holds a copy of the same token. Single use, valid for 5 minutes. identityConfirmed is true when two-factor authentication is off, meaning the re-sign-in also counts as POST /auth/2fa/confirm-identity. Requires signing in directly: an OAuth connector token is rejected with 403.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
pendingReauth | String | Required | The pendingReauth query parameter from the /Settings/Security redirect. |
reauthSecret | String | Required | The reauthSecret POST /auth/oauth/:provider/reauth returned when this re-sign-in was started. |
{
"pendingReauth": "Qe5rT1yU7iO3pA9sD2fG4h",
"reauthSecret": "Zt6wE3rY9uI1oP5aS8dF2g"
}{
"identityConfirmed": true
}Finish linking a provider. After the provider round trip the API returns the browser to the portal's /Settings/Security?pendingLink=<ticket>; send that ticket here from the signed-in session. The link is made only for the account it was started for: a pending link started for a different account is refused with a 403 and is used up, so a link URL opened in someone else's browser can never attach their provider to your account. A pending link is single use and expires after 10 minutes. Refused with a 400 when a different account from the same provider is already linked. Requires signing in directly: an OAuth connector token is rejected with 403.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
pendingLink | String | Required | The pendingLink query parameter from the /Settings/Security redirect. |
{
"pendingLink": "Vb3kX9mQ2rT7wY1zA4cE6gJ8"
}{
"passwordKnown": true,
"links": [
{
"provider": "google",
"email": "jordan@gmail.com",
"linkedAt": "2026-10-17T12:00:00.000Z",
"lastLoginAt": null
}
]
}Unlink a provider from your account. Refused with a 400 when it is your only way to sign in: another linked provider, or a password you chose yourself, must remain (set a password with the password-reset flow first). With two-factor authentication on, an account that never chose a password also can't unlink its last linked Microsoft, Apple or Enterprise SSO sign-in that is currently offered (400): turning two-factor authentication off needs a re-sign-in with one, so turn it off or set a password first. Requires a fresh POST /auth/2fa/confirm-identity from the same session; a refused unlink doesn't use it up. Returns your remaining sign-in methods.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
provider | URL Param | Required | One of 'google', 'microsoft', 'apple' or 'sso'. |
{
"passwordKnown": true,
"links": []
}Users can protect their account with a second factor: an authenticator app (TOTP), a text message or an email code. When it's on, every sign-in (password or provider) returns a challenge instead of a token. The caller sends a code if the method needs one, verifies it, and only then receives the JWT. Ten single-use backup codes are issued with the first method, and a device can be trusted for 30 days so it skips the second factor.
Sign-in flow: POST /auth (or POST /auth/oauth/exchange) returns { mfaRequired: true, challengeId, methods, primaryMethod, hasBackupCodes }. For a text or email method, call POST /auth/2fa/challenge/:challengeId/send; an authenticator app needs no send. Then call POST /auth/2fa/challenge/:challengeId/verify with the code (or a backup code) to get the token. A challenge lasts 10 minutes and allows 5 wrong codes. Across all challenges, an account allows 5 wrong codes; the 5th starts a 15-minute lockout, during which verification is refused with a 400 and the sign-in has to start over.
API service users (role api) authenticate with keys and can't use two-factor authentication. The authenticated /auth/2fa endpoints below require signing in directly: an OAuth connector token is rejected with 403.
Confirm it's you: a session alone can't weaken an account. Starting an enrollment, removing a method, replacing backup codes, turning two-factor authentication off, linking or unlinking a sign-in provider, and changing or removing Enterprise SSO each need a fresh POST /auth/2fa/confirm-identity first: a current code or backup code while two-factor authentication is on; while it's off, the account password, or for an account that never chose a password (it signed up through a provider or SSO), a code emailed to the address its sign-in provider verified (never the editable profile email). A confirmation lasts 5 minutes, belongs to the session that made it, and unlocks one change.
Get your two-factor settings: enrolled methods (targets masked), the default method, the methods this API offers, backup-code counts and trusted devices. Secrets, codes and device tokens are never returned.
The following roles are required to use this endpoint: admin, developer, billing, user
{
"enabled": true,
"primaryMethod": "app",
"methods": {
"app": {
"label": "Authenticator app",
"target": "Code from your authenticator app",
"addedAt": "2026-10-01T12:00:00.000Z",
"lastUsedAt": null
},
"email": {
"label": "Email",
"target": "j•••@reyesretail.com",
"addedAt": "2026-10-01T12:05:00.000Z",
"lastUsedAt": null
}
},
"availableMethods": [
{
"id": "app",
"label": "Authenticator app"
},
{
"id": "sms",
"label": "Text message (SMS)",
"sender": "+18335550142"
},
{
"id": "email",
"label": "Email"
}
],
"backupCodes": {
"remaining": 9,
"total": 10,
"generatedAt": "2026-10-01T12:00:00.000Z"
},
"trustedDevices": [
{
"deviceId": "dev_Q2hyb21l",
"name": "Chrome on Windows",
"ipAddress": "203.0.113.7",
"trustedAt": "2026-10-01T12:10:00.000Z",
"expiresAt": "2026-10-31T12:10:00.000Z"
}
]
}Confirm it's really you before a sensitive change: POST /auth/2fa/enroll, DELETE /auth/2fa/methods/:method, POST /auth/2fa/backup-codes, DELETE /auth/2fa, POST or DELETE /auth/oauth/:provider/link, PUT /group/sso or DELETE /group/sso. While two-factor authentication is on, send a current code from an enrolled method (or a backup code, which is spent); the password is not accepted. While it's off, send the account password; an account that never chose a password (GET /auth/oauth/links returns passwordKnown: false) instead sends a code emailed by POST /auth/2fa/confirm-identity/send with method 'email'. A confirmation lasts 5 minutes, only counts for the session (token) that made it, and is used up by the next one of those changes. An account that never chose a password can instead sign in again with its linked provider (POST /auth/oauth/:provider/reauth) while two-factor authentication is off. Wrong codes and passwords count toward the same limit as sign-in codes: 5 wrong, then a 15-minute lockout.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
password | String | Optional | The account password. Required while two-factor authentication is off, unless the account never chose a password. |
code | String | Optional | A code from an enrolled method, or a backup code, while two-factor authentication is on; or the emailed code for an account without a password of its own. |
method | String | Optional | The method the code came from: 'app', 'sms' or 'email'. Defaults to the primary method. Send 'email' with an emailed code for an account without a password of its own. |
usingBackupCode | Boolean | Optional | Set true when code is a backup code. |
{
"code": "418502",
"method": "app"
}{
"confirmed": true,
"expiresInSeconds": 300
}Send a 6-digit code through an enrolled text or email method, to use with POST /auth/2fa/confirm-identity. An authenticator app needs no send. An account with two-factor authentication off that never chose a password can send method 'email' to get the code at the address its sign-in provider verified when it was linked (not the profile email, which a session can change); if no linked provider verified an address it is refused with a 400. Codes can be re-sent after 30 seconds, and sending counts toward the limits listed under POST /auth/2fa/challenge/:challengeId/send.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
method | String | Required | An enrolled 'sms' or 'email' method, or 'email' for an account without a password of its own. |
{
"method": "email"
}{
"sent": true,
"target": "j•••@reyesretail.com",
"expiresInSeconds": 300
}Start enrolling a method. For 'app' the response carries the setup secret and an otpauth:// URI to show as a QR code. For 'sms' and 'email' a 6-digit code is sent to the phone or address. Confirm with POST /auth/2fa/enroll/:enrollmentId/verify within 10 minutes. Enrolling a method that's already set up replaces it. Sending a code counts toward the limits listed under POST /auth/2fa/challenge/:challengeId/send. Requires a fresh POST /auth/2fa/confirm-identity from the same session; without one the request is refused with a 403. A start that is rejected for its own input (for example a refused phone number) does not use up the confirmation.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
method | String | Required | One of 'app', 'sms' or 'email' (see availableMethods). |
phone | String | Optional | Required for 'sms': a US, Canadian or US-territory mobile number (e.g. +14145550137 or (414) 555-0137). International, toll-free and premium-rate numbers are refused with a 400. |
address | String | Optional | Required for 'email': the address to send codes to. |
deviceName | String | Optional | For 'app': a label for the authenticator, e.g. '1Password'. |
{
"method": "app",
"deviceName": "1Password"
}{
"enrollmentId": "kq3Lr8Zt0wYc1dVb6nXf2pHs",
"method": "app",
"secret": "JBSWY3DPEHPK3PXPJBSWY3DPEHPK3PXP",
"otpauthUri": "otpauth://totp/Signal%20House:jordan%40reyesretail.com?secret=JBSWY3DPEHPK3PXPJBSWY3DPEHPK3PXP&issuer=Signal%20House&algorithm=SHA1&digits=6&period=30"
}Confirm an enrollment with the code from the app, text or email. The first method turns two-factor authentication on and returns 10 backup codes, shown only in this response. Later methods return backupCodes: null. Five wrong codes close the enrollment.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
enrollmentId | URL Param | Required | From POST /auth/2fa/enroll. |
code | String | Required | The 6-digit code. |
{
"code": "418502"
}{
"settings": {
"enabled": true,
"primaryMethod": "app",
"methods": {
"app": {
"label": "Authenticator app",
"target": "Code from your authenticator app"
}
},
"backupCodes": {
"remaining": 10,
"total": 10
}
},
"backupCodes": [
"k7mp-3xqa",
"w9de-tr2c",
"h4ns-8bvz",
"p2qx-7kfm",
"c6rt-y3wn",
"z8ga-5mhe",
"n3vb-q9ds",
"e5jk-2tpu",
"r7wy-6ncx",
"t4hm-d8qa"
]
}Choose which enrolled method is offered first at sign-in.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
method | String | Required | An enrolled method: 'app', 'sms' or 'email'. |
{
"method": "email"
}{
"enabled": true,
"primaryMethod": "email",
"methods": {
"...": "..."
}
}Remove an enrolled method. If it was the default, the next remaining method becomes the default. Removing the last method turns two-factor authentication off and clears backup codes and trusted devices, so a member of a group that requires two-factor authentication can't remove it (403); they add another method first. Requires a fresh POST /auth/2fa/confirm-identity from the same session; without one the request is refused with a 403. Removing the last method takes the same proofs as DELETE /auth/2fa, including its provider re-sign-in where that applies.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
method | URL Param | Required | 'app', 'sms' or 'email'. |
{
"enabled": true,
"primaryMethod": "app",
"methods": {
"...": "..."
}
}Replace all backup codes with a new set of 10. The previous codes stop working immediately. The new codes are returned only in this response; they're stored as hashes and can't be shown again. Requires a fresh POST /auth/2fa/confirm-identity from the same session; without one the request is refused with a 403.
The following roles are required to use this endpoint: admin, developer, billing, user
{
"codes": [
"k7mp-3xqa",
"w9de-tr2c",
"..."
],
"settings": {
"backupCodes": {
"remaining": 10,
"total": 10,
"generatedAt": "2026-10-01T12:00:00.000Z"
}
}
}Stop trusting a device. Its next sign-in asks for the second factor again. Changing or resetting the password also forgets every trusted device.
The following roles are required to use this endpoint: admin, developer, billing, user
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | URL Param | Required | From trustedDevices in GET /auth/2fa. |
{
"enabled": true,
"trustedDevices": []
}Turn two-factor authentication off: removes every method, backup code and trusted device. Requires a fresh POST /auth/2fa/confirm-identity from the same session; without one the request is refused with a 403. An account that never chose a password and has a linked Microsoft, Apple or Enterprise SSO sign-in that is currently offered (GET /auth/oauth/providers) must also have just signed in again with that provider (POST /auth/oauth/:provider/reauth) from the same session; without it the request is refused with a 403 and the code's confirmation is kept. A member of a group that requires two-factor authentication can't turn it off: the request is refused with a 403 before the confirmation is spent. If it is already off, this is a no-op and needs no confirmation.
The following roles are required to use this endpoint: admin, developer, billing, user
{
"enabled": false,
"primaryMethod": null,
"methods": {},
"backupCodes": null,
"trustedDevices": []
}Whether to show the 'secure your account' prompt: due from the second sign-in while two-factor authentication is off, once per sign-in, and never again after it has been dismissed three times.
The following roles are required to use this endpoint: admin, developer, billing, user
{
"due": true
}Dismiss the prompt ('Set up later') until the next sign-in.
The following roles are required to use this endpoint: admin, developer, billing, user
{
"due": false
}Send a sign-in code by text or email for a pending challenge. Codes last 5 minutes. Not needed for an authenticator app (returns sent: false). Limits (each returns a 400): one send per method every 30 seconds, 5 per challenge, 10 codes per user per hour, 20 code requests per IP address per hour, and 5 texts per phone number per hour. Text messages go only to US, Canadian and US-territory numbers, and may be temporarily unavailable platform-wide; use another method or a backup code when they are.
| Field | Type | Required | Description |
|---|---|---|---|
challengeId | URL Param | Required | From the mfaRequired sign-in response. |
method | String | Required | 'sms' or 'email'. |
{
"method": "email"
}{
"sent": true,
"target": "j•••@reyesretail.com",
"expiresInSeconds": 300
}Verify a sign-in code (or a backup code) and receive the session JWT. Consumes the challenge. With rememberDevice, the response also carries a deviceToken: pass it as deviceToken on later sign-ins to skip the second factor on that device for 30 days. A backup code works once. After 5 wrong codes for the account, across all challenges, verification is refused for 15 minutes and the sign-in has to start over.
| Field | Type | Required | Description |
|---|---|---|---|
challengeId | URL Param | Required | From the mfaRequired sign-in response. |
code | String | Required | The 6-digit code, or a backup code (xxxx-xxxx; case and dashes are ignored). |
method | String | Optional | The method the code came from. Defaults to the primary method. |
usingBackupCode | Boolean | Optional | True when code is a backup code. |
rememberDevice | Boolean | Optional | Trust this device for 30 days. |
deviceName | String | Optional | Label for the trusted device, e.g. 'Chrome on Windows'. |
{
"code": "418502",
"method": "app",
"rememberDevice": true,
"deviceName": "Chrome on Windows"
}{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"deviceToken": "dev_Q2hyb21l.x9Vb2..."
}Cancel a pending sign-in challenge.
| Field | Type | Required | Description |
|---|---|---|---|
challengeId | URL Param | Required | From the mfaRequired sign-in response. |
{
"cancelled": true
}