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

# List companies



## OpenAPI

````yaml /openapi.yaml get /companies
openapi: 3.0.3
info:
  title: Leonar API
  description: >
    REST API for accessing and managing workspace data in Leonar CRM.


    ## Authentication


    All API requests require a Bearer token in the Authorization header:


    ```

    Authorization: Bearer leo_xxxxx

    ```


    API keys can be created and managed in Settings > API.


    ## Rate limiting


    - **2000 requests per hour by default**, configurable per workspace and
    shared by all API keys owned by the same user

    - Rate limit headers are included in all responses


    ## Pagination


    List endpoints support pagination via `limit` and `offset` query parameters.
  version: 1.0.0
  contact:
    name: Leonar Support
    url: https://leonar.ai
    email: support@leonar.ai
servers:
  - url: https://app.leonar.app/api/v1
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Contacts
    description: Manage contacts in your workspace
  - name: Companies
    description: Manage companies and their relationships
  - name: Deals
    description: Track and manage sales deals
  - name: Deal Pipelines
    description: View deal pipeline configurations
  - name: Projects
    description: Organize recruiting projects
  - name: Pipeline Entries
    description: Manage candidates in project pipelines
  - name: Tasks
    description: Track to-dos and follow-ups
  - name: Tags
    description: Organize resources with tags
  - name: Notes
    description: Manage notes on contacts, companies, deals, and projects
  - name: Sequences
    description: Automate outreach campaigns
  - name: Conversations
    description: View conversations across channels
  - name: Messages
    description: Send messages via email, LinkedIn, or WhatsApp
  - name: Enrichment
    description: Find emails and phone numbers for contacts
  - name: Sourcing
    description: Search and import candidates
  - name: Connected Accounts
    description: View linked LinkedIn accounts
paths:
  /companies:
    get:
      tags:
        - Companies
      summary: List companies
      operationId: list-companies
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/updatedAfter'
        - $ref: '#/components/parameters/updatedBefore'
        - name: search
          in: query
          schema:
            type: string
          description: Search by name or domain
        - name: industry
          in: query
          schema:
            type: string
        - name: owner_id
          in: query
          schema:
            type: string
            format: uuid
        - name: status_id
          in: query
          schema:
            type: string
            format: uuid
          description: >-
            Filter by company status ID. Use `GET /companies/statuses` to list
            available statuses.
        - name: sort
          in: query
          schema:
            type: string
            default: '-created_at'
          description: 'Options: `created_at`, `updated_at`, `name`'
      responses:
        '200':
          description: List of companies
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Company'
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 50
      description: Items per page
    offset:
      name: offset
      in: query
      schema:
        type: integer
        minimum: 0
        default: 0
      description: Items to skip
    updatedAfter:
      name: updated_after
      in: query
      schema:
        type: string
        format: date-time
      description: >-
        Return resources changed after this RFC 3339 timestamp. Contacts may
        redeliver rows exactly at the boundary; consumers must upsert
        idempotently.
    updatedBefore:
      name: updated_before
      in: query
      schema:
        type: string
        format: date-time
      description: >-
        Return resources with `updated_at` less than or equal to this RFC 3339
        timestamp.
  schemas:
    Company:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        domain:
          type: string
          nullable: true
        industry:
          type: string
          nullable: true
        company_size:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        location:
          type: string
          nullable: true
        logo_url:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        linkedin_url:
          type: string
          nullable: true
        annual_revenue:
          type: number
          nullable: true
        owner_id:
          type: string
          format: uuid
          nullable: true
        status_id:
          type: string
          format: uuid
          nullable: true
        status:
          allOf:
            - $ref: '#/components/schemas/CompanyStatus'
          nullable: true
        custom_data:
          $ref: '#/components/schemas/CustomFieldValueMap'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        archived_at:
          type: string
          format: date-time
          nullable: true
      example:
        id: b2c3d4e5-6789-01ab-cdef-234567890abc
        name: Doctolib
        domain: doctolib.com
        industry: Health Tech
        company_size: 1001-5000
        description: null
        location: Paris, France
        logo_url: https://logo.clearbit.com/doctolib.com
        phone: null
        linkedin_url: https://www.linkedin.com/company/doctolib
        annual_revenue: null
        owner_id: null
        status_id: 550e8400-e29b-41d4-a716-446655440000
        status:
          id: 550e8400-e29b-41d4-a716-446655440000
          name: Customer
          color: '#22c55e'
          position: 1
          is_default: false
        custom_data:
          crm_tier: enterprise
        created_at: '2025-01-10T08:00:00Z'
        updated_at: '2025-01-20T14:00:00Z'
        archived_at: null
    PaginationMeta:
      type: object
      properties:
        total:
          type: integer
          description: Total number of results matching the query
        limit:
          type: integer
          description: Maximum items per page
        offset:
          type: integer
          description: Number of items skipped
        has_more:
          type: boolean
          description: Whether more pages are available
      example:
        total: 142
        limit: 50
        offset: 0
        has_more: true
    CompanyStatus:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        color:
          type: string
          nullable: true
        position:
          type: integer
          nullable: true
        is_default:
          type: boolean
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
      example:
        id: 550e8400-e29b-41d4-a716-446655440000
        name: Customer
        color: '#22c55e'
        position: 1
        is_default: false
        created_at: '2026-03-27T10:00:00Z'
    CustomFieldValueMap:
      type: object
      additionalProperties: true
      description: >
        Object keyed by custom field `key`.

        Use `GET /contacts/custom-fields` or `GET /companies/custom-fields` to
        discover available keys and types.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - invalid_api_key
                - insufficient_scope
                - rate_limit_exceeded
                - validation_error
                - not_found
                - internal_error
                - billing_required
                - plan_upgrade_required
              description: >
                Error codes:

                - `invalid_api_key` — API key is missing, malformed, or revoked

                - `insufficient_scope` — API key lacks the required scope for
                this endpoint

                - `rate_limit_exceeded` — Too many requests (2000/hour)

                - `validation_error` — Request body or parameters failed
                validation

                - `not_found` — The requested resource does not exist

                - `internal_error` — Unexpected server error

                - `billing_required` — Workspace has no active subscription

                - `plan_upgrade_required` — Current plan does not include this
                feature
            message:
              type: string
              description: Human-readable error description
  responses:
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_api_key
              message: Invalid API key
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key starting with `leo_`

````