Authentication
All company endpoints require authentication via Bearer token:
Authorization: Bearer <access_token>
List Companies
curl -X GET "https://api.example.com/api/companies?page=1&limit=20&status=ACTIVE" \
-H "Authorization: Bearer <access_token>"
Page number for pagination (minimum: 1)
Number of results per page (minimum: 1, maximum: 100)
Search term to filter companies by name
Filter by company status. Options: ACTIVE, SUSPENDED
Whether to include soft-deleted companies
Response
Indicates if the request was successful
Array of company objects
Company’s unique identifier (UUID)
Company name (max 255 characters)
URL-friendly company identifier (max 80 characters)
URL to company logo (max 500 characters)
Additional company metadata (JSON object)
Company status: ACTIVE or SUSPENDED
ISO 8601 timestamp of soft deletion
ISO 8601 timestamp of company creation
ISO 8601 timestamp of last update
{
"success": true,
"data": [
{
"id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation",
"slug": "acme-corp",
"logo": "https://example.com/logos/acme.png",
"description": "Leading provider of innovative solutions",
"metadata": {
"industry": "Technology",
"size": "50-200"
},
"status": "ACTIVE",
"deletedAt": null,
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-03-04T10:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 15,
"totalPages": 1
}
}
Platform admins see all companies. Regular users only see companies where they have membership.
Get Company by ID
curl -X GET "https://api.example.com/api/companies/{id}" \
-H "Authorization: Bearer <access_token>"
Company’s unique identifier (UUID)
Response
Indicates if the request was successful
Detailed company object including relationships
Company’s unique identifier (UUID)
URL-friendly company identifier
Additional company metadata
Company status: ACTIVE or SUSPENDED
ISO 8601 timestamp of company creation
ISO 8601 timestamp of last update
{
"success": true,
"data": {
"id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation",
"slug": "acme-corp",
"logo": "https://example.com/logos/acme.png",
"description": "Leading provider of innovative solutions",
"metadata": {
"industry": "Technology",
"size": "50-200"
},
"status": "ACTIVE",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-03-04T10:00:00Z"
}
}
Get Company by Slug
curl -X GET "https://api.example.com/api/companies/slug/{slug}" \
-H "Authorization: Bearer <access_token>"
Company’s unique slug (URL-friendly identifier)
Response
Indicates if the request was successful
{
"success": true,
"data": {
"id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation",
"slug": "acme-corp",
"logo": "https://example.com/logos/acme.png",
"description": "Leading provider of innovative solutions",
"metadata": {},
"status": "ACTIVE",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-03-04T10:00:00Z"
}
}
Company Status Enum
The status field can have one of the following values:
ACTIVE - Company is active and operational
SUSPENDED - Company access is temporarily suspended