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:
- Submit the API access request with your use case.
- Once an administrator approves it, a Users section appears in your console.
- 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
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
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
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
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
| Scope | Grants |
|---|---|
users:create | Create individual end-user accounts. |
business:create | Create business accounts with an organization workspace. |
workspace:invite | Add members to organization workspaces you administer. |
users:password_reset | Reset the password of accounts your integration created. |
Errors
| Status | Code | Meaning |
|---|---|---|
| 403 | access_not_granted | No active Users API grant (not approved or revoked). |
| 403 | not_admin | Key owner isn't an admin of the target workspace. |
| 403 | not_permitted | Password reset attempted on an account your integration didn't create. |
| 409 | email_taken | An account with that email already exists. |
| 429 | rate_limited | Per-minute or per-day key limit exceeded. |