Skip to main content

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
default:"1"
Page number for pagination (minimum: 1)
limit
number
default:"20"
Number of results per page (minimum: 1, maximum: 100)
Search term to filter companies by name
status
string
Filter by company status. Options: ACTIVE, SUSPENDED
includeDeleted
boolean
default:"false"
Whether to include soft-deleted companies

Response

success
boolean
Indicates if the request was successful
data
array
Array of company objects
pagination
object
Pagination metadata
{
  "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>"
id
string
required
Company’s unique identifier (UUID)

Response

success
boolean
Indicates if the request was successful
data
object
Detailed company object including relationships
{
  "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>"
slug
string
required
Company’s unique slug (URL-friendly identifier)

Response

success
boolean
Indicates if the request was successful
data
object
Company object
{
  "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

Build docs developers (and LLMs) love