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

# Retrieve an organization



## OpenAPI

````yaml /api-reference/openapi.json get /v1/organizations/{organization_id}
openapi: 3.1.0
info:
  description: >-
    The Sailer REST API for CRM, conversations, and campaigns.


    **Authentication.** Send a scoped token as `Authorization: Bearer
    sk_live_...`.

    Tokens are workspace-scoped; the workspace is implied by the token, so no

    tenant header is needed. A workspace administrator creates and revokes them;

    the secret is shown once at creation and cannot be recovered afterwards.


    **Pagination.** Collections return `{data, meta, links}`. Follow
    `links.next`

    until it is `null`; treat the cursor as opaque.


    **Errors.** Every non-2xx response is `{"error": {...}}` with a stable
    `code`.

    Quote `error.request_id` when contacting support.


    **Custom fields.** Workspace-defined fields appear under `custom_fields`,
    keyed

    by `field_key`. Read a record to see which keys a workspace uses; a
    dedicated

    field-discovery endpoint is not part of this release.
  title: Sailer API
  version: 1.0.0
servers:
  - url: https://api.chatsailer.com
security:
  - SailerApiToken: []
tags:
  - description: Token introspection and workspace capabilities.
    name: Meta
  - description: >-
      People you talk to. Called *leads* in older Sailer surfaces; `contact` is
      the current name.
    name: Contacts
  - description: Companies that contacts belong to (B2B accounts).
    name: Organizations
  - description: Opportunities moving through a pipeline.
    name: Deals
  - description: Pipelines and their stages.
    name: Pipelines
  - description: Field definitions, including custom fields.
    name: Fields
  - description: Free-text annotations on CRM records.
    name: Notes
  - description: Scheduled and logged CRM activities.
    name: Activities
  - description: Per-entity label catalogs.
    name: Tags
  - description: Message threads with contacts, across every channel.
    name: Conversations
  - description: Outbound campaigns and their participants.
    name: Campaigns
paths:
  /v1/organizations/{organization_id}:
    get:
      tags:
        - Organizations
      summary: Retrieve an organization
      operationId: get_organization
      parameters:
        - in: path
          name: organization_id
          required: true
          schema:
            description: Unique identifier for an organization.
            examples:
              - org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4
            pattern: ^org_[0-9a-f]{32}$
            title: Organization Id
            type: string
        - description: >-
            Comma-separated relationships to inline in the response. Unexpanded
            relations are still identified by their `*_id` field.
          in: query
          name: expand
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Comma-separated relationships to inline in the response.
              Unexpanded relations are still identified by their `*_id` field.
            examples:
              - organization,owner
            title: Expand
        - description: >-
            Comma-separated fields to return. `object` and `id` are always
            included. Reduces payload size, not query cost.
          in: query
          name: fields
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Comma-separated fields to return. `object` and `id` are always
              included. Reduces payload size, not query cost.
            examples:
              - name,email,organization_id
            title: Fields
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - SailerApiToken: []
components:
  schemas:
    Organization:
      description: A company a contact belongs to.
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        custom_fields:
          additionalProperties: true
          description: >-
            Every custom field defined on organizations in this workspace, keyed
            by field key and typed from its definition. Unset fields are `null`,
            so reading any organization shows the full set of keys in use.
          title: Custom Fields
          type: object
        id:
          description: Unique identifier for an organization.
          examples:
            - org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4
          pattern: ^org_[0-9a-f]{32}$
          title: Id
          type: string
        name:
          title: Name
          type: string
        object:
          const: organization
          default: organization
          title: Object
          type: string
        owner:
          anyOf:
            - $ref: '#/components/schemas/Owner'
            - type: 'null'
          description: >-
            Whoever is responsible for this record. Always populated when the
            record has an owner — this is not an `expand` target.
        owner_id:
          anyOf:
            - description: Unique identifier for an user.
              examples:
                - usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4
              pattern: ^usr_[0-9a-f]{32}$
              type: string
            - type: 'null'
          deprecated: true
          description: >-
            Deprecated: use `owner` instead, which also covers AI-owned records.
            Still populated for teammate-owned records; will be removed in a
            future release.
          title: Owner Id
        tags:
          items:
            $ref: '#/components/schemas/Tag'
          title: Tags
          type: array
        updated_at:
          format: date-time
          title: Updated At
          type: string
        visibility:
          $ref: '#/components/schemas/RecordVisibility'
          description: >-
            Governs who sees this record in the Sailer UI. API tokens are
            workspace-scoped and are not filtered by it.
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
      required:
        - id
        - name
        - visibility
        - created_at
        - updated_at
      title: Organization
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    Owner:
      description: >-
        Whoever is responsible for a record — a teammate or an AI agent.


        One nested object rather than a spread of ``owner_id`` /

        ``owner_user_id`` / ``owner_agent_id`` / ``owner_kind`` columns. Those
        exist

        internally because ownership by an AI was added to a schema that assumed
        a

        human, and a partner should not have to reconstruct "who owns this" from

        four fields and a rule about which take precedence.


        ``kind`` is the discriminator and ``id`` is prefixed accordingly, so the
        two

        can never disagree: an ``agt_…`` id is an agent by construction.
      properties:
        id:
          description: Prefixed id — `usr_…` for a teammate, `agt_…` for an agent.
          title: Id
          type: string
        kind:
          enum:
            - user
            - agent
          title: Kind
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        object:
          const: owner
          default: owner
          title: Object
          type: string
      required:
        - kind
        - id
      title: Owner
      type: object
    Tag:
      description: A CRM label. The catalogue is per entity type.
      properties:
        color:
          anyOf:
            - type: string
            - type: 'null'
          description: Hex colour used by the Sailer UI, e.g. `#FFAA00`.
          title: Color
        id:
          description: Unique identifier for a tag.
          examples:
            - tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4
          pattern: ^tag_[0-9a-f]{32}$
          title: Id
          type: string
        name:
          title: Name
          type: string
        object:
          const: tag
          default: tag
          title: Object
          type: string
      required:
        - id
        - name
      title: Tag
      type: object
    RecordVisibility:
      description: >-
        CRM record visibility levels; resolved live against the owner's current
        teams.
      enum:
        - private
        - team
        - team_and_subteams
        - company
      title: RecordVisibility
      type: string
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    SailerApiToken:
      description: >-
        A workspace API token. Create one in Settings → API. Send it as
        `Authorization: Bearer sk_live_...`.
      scheme: bearer
      type: http

````