Skip to main content
GET
https://app.cometly.com
/
public-api
/
v1
/
companies
List Companies
curl --request GET \
  --url https://app.cometly.com/public-api/v1/companies \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {}
  ],
  "path": "<string>",
  "per_page": 123,
  "next_cursor": {},
  "next_page_url": {},
  "prev_cursor": {},
  "prev_page_url": {},
  "message": "<string>"
}

Overview

This endpoint allows you to retrieve a list of companies from Cometly. Results are cursor-paginated for efficient data retrieval and ordered by creation date (newest first).

Query Parameters

Optional Parameters

per_page
integer
default:"200"
Number of companies to return per page. Minimum: 1, Maximum: 5000
cursor
string
Pagination cursor from a previous response. Use this to fetch the next page of results.
start_date
string
Filter companies created on or after this date. Format: YYYY-MM-DD HH:MM:SS. The timestamp is interpreted in your space’s timezone. Example: 2024-01-01 00:00:00
end_date
string
Filter companies created on or before this date. Format: YYYY-MM-DD HH:MM:SS. Must be after start_date. The timestamp is interpreted in your space’s timezone. Example: 2024-01-31 23:59:59

Response

Success Response

The response follows Laravel’s cursor pagination structure:
data
array
Array of company objects. Each company includes:
  • id (integer): The unique identifier of the company
  • domain (string): The domain associated with this company
path
string
The base URL path for the endpoint
per_page
integer
Number of items per page
next_cursor
string | null
Cursor for the next page of results. null if there are no more pages.
next_page_url
string | null
Full URL for the next page of results. null if there are no more pages.
prev_cursor
string | null
Cursor for the previous page of results. null if on the first page.
prev_page_url
string | null
Full URL for the previous page of results. null if on the first page.

Error Response

message
string
Error description explaining what went wrong

Example Requests

# Basic request without filters
curl -G "https://app.cometly.com/public-api/v1/companies" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"

# Request with date filtering
curl -G "https://app.cometly.com/public-api/v1/companies" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "start_date=2024-01-01 00:00:00" \
  -d "end_date=2024-01-31 23:59:59" \
  -d "per_page=100"

# Pagination request using cursor
curl -G "https://app.cometly.com/public-api/v1/companies" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0wMS0xNSAxMj..."

Status Codes

Status CodeDescription
200Companies successfully retrieved
401Missing or invalid API key
403API key doesn’t have permission or subscription is inactive
422Invalid parameters provided (check error message for details)
429Too many requests - rate limit exceeded. See Rate Limiting

Notes

  • Rate Limit: This endpoint has a limit of 15 requests per minute per Space. See Rate Limiting for details.
  • Results are ordered by creation date in descending order (newest first)
  • Cursor pagination is used for efficient traversal of large result sets
  • Date filtering is optional. When omitted, all companies are returned.
  • Dates are provided in your space’s configured timezone and converted to UTC for querying
  • Only company id and domain fields are returned in the response