Auth API Reference
Thirty-two operations
Generated from openapi.yaml, which is the source of truth for every BillDog SDK. If a page here and the spec disagree, the spec is right.
Base URL and authentication
POST https://api.billdog.io/v1/<endpoint>
Content-Type: application/json
X-BillDog-API-Key: bd_public_live_...The key is read from X-BillDog-API-Key only — never from Authorization: Bearer or the query string. The prefix selects the environment before any lookup.
| Credential | Used by |
|---|---|
Public key bd_public_* | Everything under Auth. Safe to ship in an app |
Secret key bd_secret_* | manage-jwt-templates. Server-side only |
| Operator session | Dashboard admin endpoints, owner or admin role |
SCIM token bd_scim_* | SCIM only. Bound to one connection |
| None | JWKS, and the SAML ACS — whose credential is the signed assertion |
The envelope
{
"success": true,
"data": { },
"meta": {
"request_id": "req_...",
"api_version": "1.0.0",
"timestamp": "2026-08-30T12:00:00.000Z"
}
}One endpoint does not use the envelope
auth-jwks returns a raw JWKS (RFC 7517). That is deliberate: it is a standard format consumed by generic tooling. Its errors are still enveloped.auth-introspect answers the envelope like every other endpoint: { success: true, data: { active, claims } }.Keep the request_id from a failed response. It is what lets an operator find the matching server-side log.
Auth — the client surface
Public key. Every endpoint answers 403 ACCESS_DENIED until auth is enabled on the project.
| Method | Path | Summary | Auth |
|---|---|---|---|
POST | /auth-config | What this project requires before a sign-up is accepted | Public key |
POST | /auth-sign-up | Begin a sign-up | Public key |
POST | /auth-prepare | Send a one-time code | Public key |
POST | /auth-attempt | Submit a factor. identifier is required for a first factor and optional for totp / backup_code, where mfa_token names the account | Public key |
POST | /auth-token | Refresh a session | Public key |
POST | /auth-revoke | Sign out | Public key |
POST | /auth-sessions | List a user's sessions | Public key |
POST | /auth-introspect | Is this token live right now? | Public key |
GET | /auth-jwks | Public keys for offline verification | None |
POST | /auth-set-password | Set a password — by reset code, or as a signed-in change | Public key |
POST | /auth-account | The signed-in user's own account view | Public key |
POST | /auth-user-factors | Manage second factors | Public key |
POST | /auth-passkey | WebAuthn registration and sign-in | Public key |
POST | /auth-org | Organizations, members, invitations and domains | Public key |
POST | /auth-oauth-verify | Exchange a provider ID token for a session | Public key |
POST | /auth-oauth-start | Begin a redirect sign-in (PKCE) | Public key |
POST | /auth-oauth-callback | Complete a redirect sign-in. Answers mfa_required + mfa_token with no session for an MFA-enrolled account, exactly like auth-attempt | Public key |
GET / POST | /auth-oauth-bounce | Where a provider returns to — Apple's form POST, and every native flow — before being forwarded to where the flow began. Registered with the provider once; not called by your code | None |
POST | /auth-sso-start | Route a work email to its enterprise connection | Public key |
POST | /auth-sso-callback | Complete an OIDC enterprise sign-in | Public key |
POST | /auth-sso-acs/{connection_id} | SAML assertion consumer service | None |
GET | /auth-sso-acs/{connection_id}/metadata | SP metadata for the IdP | None |
auth-set-password — the two modes
One endpoint, two proofs, named by mode. The schema is a discriminated union: a reset body has no refresh_token field at all, so a proxy that injects one (the hosted Worker does, for change mode) cannot turn a reset into a change. A body with no mode is still accepted for now — a code means reset, a refresh_token means change, both or neither is a 400 — but name the mode; that fallback exists for the in-flight hosted card and will go.
{
"mode": "reset",
"identifier": "ada@example.com",
"identifier_kind": "email",
"code": "123456",
"new_password": "a-new-long-passphrase"
}- The new password is checked against the project policy (length, composition, breach) before anything is written; a refusal is a
400naming the rule. - A wrong code, an unknown identifier, an expired code and a wrong current password are all the same opaque
401. A wrong code also burns one of that code's attempts. - Only a
reset_passwordcode is accepted here, andauth-attemptrefuses that purpose — neither endpoint takes the other's proof. - Limits: 3 per 10 seconds, keyed on the normalised identifier for a reset and on the user for a change, scoped to the project and environment; past that a
429withRetry-After. - A reset also clears any lockout on the account, so the brand-new password is not refused for fifteen minutes by a lock the person set off themselves.
Operator surface
Never call these from a browser with a secret key
manage-jwt-templates takes a project secret key and belongs on a server. The dashboard reaches the same functionality through manage-auth-settings with your operator session instead — that is why there are two doors rather than one.| Method | Path | Summary | Auth |
|---|---|---|---|
POST | /manage-auth-settings | Project auth settings, SSO connections, SCIM tokens and signing keys | Operator session |
POST | /manage-jwt-templates | JWT templates, programmatically | Secret key |
POST | /auth-provision-keys | Provision or rotate signing keys | Operator session |
POST | /auth-import | Import users from Clerk, Auth0 or Firebase | Operator session |
POST | /auth-impersonate | Act as a user, for support | Operator session |
SCIM 2.0
Called by an identity provider, not by your app. Base https://api.billdog.io/v1/scim-v2.
| Method | Path | Summary | Auth |
|---|---|---|---|
GET | /scim-v2/Users | List or filter provisioned users | SCIM token |
POST | /scim-v2/Users | Provision a user | SCIM token |
PATCH | /scim-v2/Users/{id} | Update or deactivate a user | SCIM token |
DELETE | /scim-v2/Users/{id} | Deprovision a user | SCIM token |
GET | /scim-v2/Groups | List directory groups | SCIM token |
GET | /scim-v2/ServiceProviderConfig | Advertised SCIM capabilities | SCIM token |
Was this page helpful?
Or rate this page: