> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gaintrace.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List companies

> Returns the workspace's companies, most-recently-updated first.

**Scope:** `read:companies`



## OpenAPI

````yaml /openapi.json get /companies
openapi: 3.1.0
info:
  title: GainTrace API
  version: 1.0.0
  description: >-
    The GainTrace REST API (v1). Read your customer data and push product-usage
    events, metric events, and signals into GainTrace.


    All endpoints are authenticated with a Bearer API key and scoped to a single
    workspace.
servers:
  - url: https://app.gaintrace.com/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Companies
    description: Read and manage canonical company records.
  - name: Signals
    description: Read, create, and manage buyer / risk signals.
  - name: Ingest
    description: Push product-usage and metric events into GainTrace.
  - name: Contacts
    description: Read and manage the people on an account.
  - name: Webhooks
    description: Subscribe to workspace events with signed, retried delivery.
paths:
  /companies:
    get:
      tags:
        - Companies
      summary: List companies
      description: |-
        Returns the workspace's companies, most-recently-updated first.

        **Scope:** `read:companies`
      operationId: listCompanies
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - name: healthStatus
          in: query
          schema:
            type: string
            enum:
              - healthy
              - at_risk
              - churning
        - name: segment
          in: query
          schema:
            type: string
        - name: plan
          in: query
          schema:
            type: string
        - name: search
          in: query
          description: Case-insensitive match on name or domain.
          schema:
            type: string
      responses:
        '200':
          description: A page of companies.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Company'
                  meta:
                    $ref: '#/components/schemas/Meta'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    limit:
      name: limit
      in: query
      description: Max rows to return. Default 50, max 100.
      schema:
        type: integer
        default: 50
        maximum: 100
        minimum: 1
    offset:
      name: offset
      in: query
      description: Rows to skip (pagination).
      schema:
        type: integer
        default: 0
        minimum: 0
  schemas:
    Company:
      type: object
      description: >-
        A canonical company record. Health, counts, and timestamps are
        read-only.
      properties:
        id:
          type: string
          format: uuid
        externalId:
          type:
            - string
            - 'null'
          description: Your stable external id (unique per workspace). Used for upsert.
        name:
          type: string
        domain:
          type:
            - string
            - 'null'
        industry:
          type:
            - string
            - 'null'
        employeeCount:
          type:
            - integer
            - 'null'
        plan:
          type:
            - string
            - 'null'
        segment:
          type:
            - string
            - 'null'
        region:
          type:
            - string
            - 'null'
        location:
          type:
            - string
            - 'null'
        lifecycleStage:
          type:
            - string
            - 'null'
        ownerEmail:
          type:
            - string
            - 'null'
        arr:
          type:
            - integer
            - 'null'
          description: Annual recurring revenue in integer minor units of `currency`.
        mrr:
          type:
            - integer
            - 'null'
          description: Monthly recurring revenue in integer minor units of `currency`.
        currency:
          type:
            - string
            - 'null'
          description: ISO 4217 code. Null = workspace reporting currency.
        contractStartDate:
          type:
            - string
            - 'null'
          format: date-time
        contractEndDate:
          type:
            - string
            - 'null'
          format: date-time
        autoRenew:
          type:
            - boolean
            - 'null'
        healthScore:
          type:
            - number
            - 'null'
          description: 0-100 (read-only).
        healthStatus:
          type: string
          enum:
            - healthy
            - at_risk
            - churning
          description: Read-only.
        contactCount:
          type:
            - integer
            - 'null'
        dealCount:
          type:
            - integer
            - 'null'
        isPhantom:
          type:
            - boolean
            - 'null'
        lastActivityAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Meta:
      type: object
      properties:
        limit:
          type: integer
        offset:
          type: integer
        count:
          type: integer
          description: Number of rows in this page.
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable, safe error message.
        detail:
          type: string
        code:
          type: string
      required:
        - error
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Insufficient scope, or API v1 is not enabled for the workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Per-key rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer API key. Secret server keys start with `gt_live_`; client-safe
        browser keys start with `gt_pub_` (write-only, origin-pinned). Create
        and scope keys in Settings → API Keys.

````