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

# List legal entities

> List the legal entities of the company (paginated), default one first. Use their ids to filter employees by legal entity.

Version:
v4


## OpenAPI

````yaml openapi-v2.json GET /core/v4/legal-entities
openapi: 3.0.0
info:
  title: Sesame Public API v2
  description: >-
    Public API v2 — additive surface `/public/{context}/v{N}`,
    endpoint-versioned from v4
  version: 1.0.0
servers:
  - url: https://api.sesamehr.com
    description: Production
security:
  - Bearer: []
paths:
  /core/v4/legal-entities:
    get:
      tags:
        - Legal entities
      summary: List legal entities
      description: >-
        List the legal entities of the company (paginated), default one first.
        Use their ids to filter employees by legal entity.
      operationId: ListLegalEntities
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            maximum: 300
      responses:
        '200':
          description: The paginated legal entities of the company.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListLegalEntitiesResponse'
        '401':
          description: Missing or invalid API key
        '403':
          description: API consumer lacks permission over the requested resource
        '422':
          description: Validation error
components:
  schemas:
    ListLegalEntitiesResponse:
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/LegalEntityEntry'
        meta:
          $ref: '#/components/schemas/PaginationMetaEntry'
      type: object
    LegalEntityEntry:
      properties:
        id:
          type: string
          format: uuid
        name:
          description: Business name of the legal entity.
          type: string
        taxIdentificationNumber:
          type: string
          nullable: true
        socialSecurityNumber:
          description: Social Security employer number of the legal entity.
          type: string
          nullable: true
        vatType:
          description: Type of tax identification number, such as `cif`, `nif` or `vat`.
          type: string
          nullable: true
        billingEmail:
          description: Billing email address.
          type: string
          nullable: true
        phone:
          description: Contact phone number.
          type: string
          nullable: true
        fiscalAddress:
          description: Fiscal address.
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          description: State or province.
          type: string
          nullable: true
        zip:
          description: Postal code.
          type: string
          nullable: true
        country:
          description: ISO 3166-1 alpha-2 country code.
          type: string
          nullable: true
        isDefault:
          description: Whether this is the default legal entity of the company.
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    PaginationMetaEntry:
      properties:
        currentPage:
          description: Current page number (1-based).
          type: integer
        lastPage:
          description: Last available page number.
          type: integer
        total:
          description: Total number of items across all pages.
          type: integer
        perPage:
          description: Number of items per page.
          type: integer
      type: object
  securitySchemes:
    Bearer:
      type: http
      description: 'Sesame Public API consumer token (Authorization: Bearer <token>)'
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.