Companies API
Create, read, update, suspend, and delete companies managed by your reseller account.
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/reseller/companies | List companies. |
| POST | /v1/reseller/companies | Create a company. |
| GET | /v1/reseller/companies/{id} | Get company details. |
| PUT | /v1/reseller/companies/{id} | Update company details. |
| DELETE | /v1/reseller/companies/{id} | Delete a company. |
List Companies
Returns a paginated list of companies owned by the authenticated reseller.
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number. |
| per_page | integer | Items per page, capped at 100. |
| search | string | Filter by company name or contact email. |
| status | string | Filter by company status. |
Create or Update Company
| Field | Type | Description |
|---|---|---|
| name | string | Company display name. |
| contact_email | string | Primary contact email address. |
| seat_limit | integer | Maximum seats available to the company. |
| seat_limit_type | string | hard blocks overages; soft allows overages. |
| status | string | Company status such as active or suspended. |
Deletion Rule
A company can only be deleted when no active users remain. Otherwise the API returns HAS_ACTIVE_USERS.
Response Example
{
"data": {
"id": 1,
"name": "Acme Corporation",
"contact_email": "admin{'@'}example.com",
"status": "active",
"seat_limit": 100,
"seat_limit_type": "hard",
"seats_used": 45
}
}