> ## 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.

# Create a favorite

> Bookmark a CRM record as a favorite.



## OpenAPI

````yaml post /api/favorites/
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/favorites/:
    post:
      tags:
        - Favorites
      summary: Create a favorite
      description: Bookmark a CRM record as a favorite.
      operationId: create-favorite
      parameters:
        - 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/FavoriteCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FavoriteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKey: []
components:
  schemas:
    FavoriteCreate:
      properties:
        entity_type:
          type: string
          title: Entity Type
          description: 'Entity type: ''company'', ''contact'', or ''deal'''
        entity_id:
          type: string
          format: uuid
          title: Entity Id
          description: ID of the favorited entity
        folder_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Folder Id
          description: Folder ID to organize favorites
        display_order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Display Order
          description: Display order
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: Optional notes about why it's favorited
      type: object
      required:
        - entity_type
        - entity_id
      title: FavoriteCreate
      description: Schema for creating a new favorite.
    FavoriteResponse:
      properties:
        entity_type:
          type: string
          title: Entity Type
          description: 'Entity type: ''company'', ''contact'', or ''deal'''
        entity_id:
          type: string
          format: uuid
          title: Entity Id
          description: ID of the favorited entity
        folder_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Folder Id
          description: Folder ID to organize favorites
        display_order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Display Order
          description: Display order
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: Optional notes about why it's favorited
        id:
          type: string
          format: uuid
          title: Id
        account_id:
          type: string
          format: uuid
          title: Account Id
        user_id:
          type: string
          format: uuid
          title: User Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        entity_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Name
          description: Name of the favorited entity
      type: object
      required:
        - entity_type
        - entity_id
        - id
        - account_id
        - user_id
        - created_at
        - updated_at
      title: FavoriteResponse
      description: Response schema for favorite API endpoints.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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.

````