Users API

Provision accounts on Bodek programmatically: create individual end-users, create business accounts with their own organization workspace, and add people to organization workspaces. It's the building block for partners who onboard their own customers onto the platform.

Base   https://dev.bodek.us/v1/users
Auth   Authorization: Bearer bf_live_…

This reference is public. Creating a key, however, requires approval — see below.

Getting access

The Users API is approval-gated to keep account creation safe. Before you can create a key:

  1. Submit the API access request with your use case.
  2. Once an administrator approves it, a Users section appears in your console.
  3. Create a Users key there and start calling the API.

Approval can be revoked at any time; revocation takes effect on the very next request. Every call is rate-limited and recorded in your key's audit log.

Authentication

Send your key as a bearer token. All endpoints accept and return JSON.

Authorization: Bearer bf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json

Create a user

POST /v1/users

Scope users:create. Creates an individual account and its personal workspace. If you omit password, a random one is set and the user verifies/sets it via the welcome email. The email must be unique.

curl -X POST https://dev.bodek.us/v1/users \
  -H "Authorization: Bearer bf_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jordan@example.com",
    "first_name": "Jordan",
    "last_name": "Lee",
    "phone": "+1 555 0100"
  }'

Returns 201 with the created account:

{
  "id": 8123,
  "email": "jordan@example.com",
  "first_name": "Jordan",
  "last_name": "Lee",
  "account_type": "individual",
  "workspace_id": 9001,
  "email_verified": false
}

Create a business

POST /v1/users/business

Scope business:create. Creates a business account plus an organization workspace owned by that user. organization_name is required; ein is optional (format 12-3456789).

curl -X POST https://dev.bodek.us/v1/users/business \
  -H "Authorization: Bearer bf_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "owner@acme.co",
    "first_name": "Sam",
    "last_name": "Rivera",
    "organization_name": "Acme Co",
    "ein": "12-3456789"
  }'

Add a user to a workspace

POST /v1/users/workspace-members

Scope workspace:invite. Sends an invitation to join an organization workspace. The key's owner must be an admin or owner of the target workspace, which must be an organization (not a personal) workspace.

curl -X POST https://dev.bodek.us/v1/users/workspace-members \
  -H "Authorization: Bearer bf_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": 9001,
    "email": "teammate@acme.co",
    "role": "member"
  }'

The invitee receives an email and joins on accept. role is member or admin.

Reset a password

POST /v1/users/password-reset

Scope users:password_reset. Resets the password of an account your integration created (you can't reset arbitrary Bodek accounts). Identify the user by user_id or email. Provide new_password to set a specific one, or omit it to have a strong temporary password generated and returned so you can deliver it to your user.

curl -X POST https://dev.bodek.us/v1/users/password-reset \
  -H "Authorization: Bearer bf_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "email": "jordan@example.com" }'
{ "id": 8123, "email": "jordan@example.com", "reset": true, "temporary_password": "Xf7…" }

Scopes

ScopeGrants
users:createCreate individual end-user accounts.
business:createCreate business accounts with an organization workspace.
workspace:inviteAdd members to organization workspaces you administer.
users:password_resetReset the password of accounts your integration created.

Errors

StatusCodeMeaning
403access_not_grantedNo active Users API grant (not approved or revoked).
403not_adminKey owner isn't an admin of the target workspace.
403not_permittedPassword reset attempted on an account your integration didn't create.
409email_takenAn account with that email already exists.
429rate_limitedPer-minute or per-day key limit exceeded.