This guide explains how to use the API to manage customer profiles, organizations, and user invitations. Whether you are building an automated onboarding flow or handling administrative reporting, these endpoints provide full control over your customer accounts.
The Onboarding Workflow
When a new customer signs up, you typically need to provision an organization, customize it, and mark their setup as complete. The API provides a streamlined sequence for this.
sequenceDiagram
participant Client
participant API
Client->>API: POST /v1/organization
API-->>Client: Returns {organization_id}
Client->>API: POST /v1/organization/{organization_id}/upload-logo
Client->>API: POST /v1/organization/{organization_id}/complete-onboarding
API-->>Client: 200 OK (Status: Active)- 1
Create the organization
Start by creating a new organization workspace. Make a
POSTrequest to/v1/organizationwith the customer's initial details. The response will include the neworganization_id. - 2
Upload branding assets
Personalize the customer's workspace by uploading their company logo using
POST /v1/organization/{organization_id}/upload-logo. - 3
Complete onboarding
Once all initial settings are configured, finalize the process by calling
POST /v1/organization/{organization_id}/complete-onboarding. This activates the organization and triggers any necessary background provisioning.
Managing Organizations
You can manage the lifecycle and settings of organizations using standard RESTful endpoints.
| Action | Method | Endpoint | Description |
|---|---|---|---|
| List My Organizations | GET | /v1/organization | Returns all organizations the current authenticated user belongs to. |
| Get Details | GET | /v1/organization/{organization_id} | Retrieves the configuration and status of a specific organization. |
| Update Settings | PUT | /v1/organization/{organization_id} | Modifies the organization's profile or settings. |
| Delete | DELETE | /v1/organization/{organization_id} | Permanently removes the organization and its associated data. |
Deleting an organization is irreversible. Ensure you prompt the user for confirmation before invoking the DELETE endpoint.
Users and Invitations
Organizations are collaborative. Use these endpoints to manage the users within an organization and handle the invitation lifecycle.
| Action | Method | Endpoint |
|---|---|---|
| List Users | GET | /v1/organization/{organization_id}/user |
| List Pending Invites | GET | /v1/invitations |
| Accept Invite | POST | /v1/invitations/{invitation_id}/accept |
| Remove User | DELETE | /v1/organization/{organization_id}/user/{user_id} |
When a user logs in, you can check /v1/invitations to display any pending requests they have to join other organizations, allowing them to accept via the UI.
Administration & Reporting
If you are building an internal dashboard or require system-level access, use the administrative endpoints. These require elevated privileges and allow you to view data across all organizations.
| Action | Method | Endpoint |
|---|---|---|
| List All Organizations | GET | /v1/organization/all |
| List All Customers | GET | /v1/admin/customers |
| Customer Overview | GET | /v1/admin/customers/{organization_id} |
| Export to CSV | GET | /v1/admin/customers/export |
Server-to-Server (S2S) Actions: For internal billing or feature flagging, you can toggle active subscriptions directly via the internal endpoint: POST /internal/subscriptions/{organization_id}/toggle-active.
Frequently Asked Questions
How do I export my customer list?
Administrators can generate a CSV of all customer data by making a GET request to /v1/admin/customers/export. This is useful for importing into CRMs or external reporting tools.
What happens when onboarding is completed?
Calling the complete-onboarding endpoint transitions the organization's status from pending to active. Depending on your system configuration, this may also trigger welcome emails or begin billing cycles.
Can a user belong to multiple organizations?
Yes. A single authenticated user can be invited to and accept invitations for multiple organizations. The GET /v1/organization endpoint will return an array of all organizations they currently have access to.