The Weel OpenAPI lets you automate the full user lifecycle — invite people when they're onboarded in your HR system, update their access when org changes happen, and deactivate them the moment they leave. This article covers the user provisioning endpoints.
Before you start
You will need:
- A Weel Enterprise plan.
- Admin access, or the API permission enabled for your role.
- An API key — see How to generate and manage API keys.
- Your Client ID, shown on the Settings > API page in the Weel web app.
Include your API key as a bearer token in the Authorization header of every request. The full endpoint reference, including request and response schemas, is at developer.letsweel.com.
Steps
1. Invite a user
- Fetch your business's roles with
GET /v1/businesses/{client_id}/rolesand note therole_idyou want to assign. - Send
POST /v1/businesses/{client_id}/inviteswith the person'semail, arole_id, andpayment_types— one or more ofbills,cards, andreimbursements. - Weel creates the invite and emails the person. The response includes the invite's ID, which you can use to cancel it later with
DELETE /v1/businesses/{client_id}/invites/{invite_id}.
Once the person accepts their invite, they appear as a user in GET /v1/businesses/{client_id}/users.
2. Update a user
Send PATCH /v1/businesses/{client_id}/users/{user_id}. All fields are optional — send only what you want to change:
-
role_id— assign a different role -
payment_types— change which payment types they can transact with -
out_of_office_mode,out_of_office_start_date,out_of_office_end_date, anddelegate_approver— manage out-of-office delegation. When turning out-of-office on, both dates are required.
3. Deactivate a user
Send DELETE /v1/businesses/{client_id}/users/{user_id}. Any requests they'd normally approve can be re-assigned in Weel — see What happens to pending approvals when I delete an employee?
Things to remember
- Invites and users are separate resources. Update and deactivate operations work on active users; a pending invite can only be cancelled.
- An invite must include at least one payment type, and the role must belong to your business.
- The delegate approver must belong to your business and must not have an overlapping out-of-office period.