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

# Select company domain

> Select a domain from multiple possibilities for a company.



## OpenAPI

````yaml post /api/companies/{company_id}/select-domain
openapi: 3.1.0
info:
  title: CRM Backend
  description: >

    CRM Backend API for managing contacts, companies, deals, activities, and
    AI-powered chat.


    ## Authentication


    Protected endpoints accept either:


    - **JWT (Bearer)**: `Authorization: Bearer <jwt>` with `X-Account-ID` header

    - **API Key**: `Authorization: Bearer sk_xxx` or `X-API-Key: sk_xxx`


    API keys are created in Developer Settings and provide account-level access.
  version: 0.1.0
servers:
  - url: https://api.morphic.io
    description: Production
security: []
tags:
  - name: Contacts
    description: Manage contacts (people) in the CRM.
  - name: Companies
    description: Manage companies and their teams.
  - name: Deals
    description: Manage deals and pipeline stages.
  - name: Activities
    description: Log and track activities (calls, meetings, tasks).
  - name: Notes
    description: Create and manage notes attached to CRM entities.
  - name: Favorites
    description: Bookmark records and organize them into folders.
  - name: Exports
    description: Export CRM data to CSV files.
  - name: Imports
    description: Import data into the CRM from CSV files.
  - name: Email Drafts
    description: Create, manage, and send email drafts.
  - name: Email Templates
    description: Create and manage reusable email templates.
  - name: Knowledge Base
    description: Manage knowledge base documents and pages.
  - name: Chats
    description: AI-powered chat conversations and messages.
  - name: Cortex Search
    description: Semantic search and AI-powered Q&A over CRM data.
  - name: Custom Fields
    description: Define and manage custom field definitions and values.
  - name: Categories
    description: Organize CRM entities with categories and tags.
  - name: Transcription
    description: Transcribe audio files using AI.
paths:
  /api/companies/{company_id}/select-domain:
    post:
      tags:
        - Companies
      summary: Select company domain
      description: Select a domain from multiple possibilities for a company.
      operationId: select-company-domain
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            title: Company Id
        - name: x-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Account-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SelectDomainRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKey: []
components:
  schemas:
    SelectDomainRequest:
      properties:
        selected_domain:
          type: string
          title: Selected Domain
      type: object
      required:
        - selected_domain
      title: SelectDomainRequest
    Company:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        domains:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Domains
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
        company_size:
          anyOf:
            - type: string
            - type: 'null'
          title: Company Size
        employee_count:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Employee Count
        annual_revenue:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Annual Revenue
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Email
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        linkedin_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Linkedin Url
        facebook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Facebook Url
        instagram_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Instagram Url
        twitter_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Twitter Url
        twitter_handle:
          anyOf:
            - type: string
            - type: 'null'
          title: Twitter Handle
        twitter_follower_count:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Twitter Follower Count
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo Url
        connection_strength:
          anyOf:
            - type: string
            - type: 'null'
          title: Connection Strength
          description: weak, medium, or strong
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: lead, qualified, engaged, opportunity, customer, inactive
        categories:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Categories
        team_ids:
          anyOf:
            - items:
                $ref: '#/components/schemas/ReferenceItem'
              type: array
            - type: 'null'
          title: Team Ids
          description: Team members with id and name
        associated_deal_ids:
          anyOf:
            - items:
                $ref: '#/components/schemas/ReferenceItem'
              type: array
            - type: 'null'
          title: Associated Deal Ids
          description: Associated deals with id and name
        metadata:
          type: object
          title: Metadata
        enrichment:
          type: object
          title: Enrichment
        enrichment_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Enrichment Provider
        enrichment_last_updated:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Enrichment Last Updated
        enrichment_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Enrichment Status
        account_id:
          type: string
          format: uuid
          title: Account Id
        is_favorite:
          type: boolean
          title: Is Favorite
          description: Whether this record is favorited by the current user
          default: false
        custom_fields:
          type: object
          title: Custom Fields
          description: Backward compatibility - returns metadata as custom_fields.
          readOnly: true
      type: object
      required:
        - id
        - created_at
        - updated_at
        - name
        - account_id
        - custom_fields
      title: Company
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ReferenceItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: ReferenceItem
      description: |-
        Enriched reference item containing both ID and display name.
        Used for reference fields to avoid frontend needing separate API calls.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key (sk_xxx) from Developer Settings. No X-Account-ID needed.

````