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

# Get Project Field Catalog

> Returns subscriber field metadata for the project: which fields exist, how often each is populated (fillRate), example values, and whether the field is auto-filled at send time. Powers variable pickers, persona prefill, and template-coverage UIs. Optionally scope the result to a specific segment or tag.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/projects/{projectId}/field-catalog
openapi: 3.1.0
info:
  title: Migma.ai API (v1)
  description: >-
    API for managing brands, contacts, email generation, sending, and
    integrations.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.migma.ai
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Projects/Brands
    description: Manage projects (brands) and import from websites
  - name: Contacts
    description: Manage your contacts, segments, tags, and topics
  - name: Segments
    description: Create and manage dynamic contact segments
  - name: Tags
    description: Organize contacts with tags
  - name: Topics
    description: Manage subscription topics and preferences
  - name: Emails
    description: Generate, send, and export emails
  - name: Email Validation
    description: Validate email content for compatibility and deliverability
  - name: Email Previews
    description: Preview emails across devices and email clients
  - name: Domains
    description: Manage sending domains and verification
  - name: Webhooks
    description: Manage webhook endpoints for real-time event notifications
  - name: Events
    description: Record customer events and conversions
  - name: Integrations
    description: Third-party platform integrations
  - name: Campaigns
    description: Create, schedule, send, and manage email campaigns
  - name: Project Editing
    description: Edit project assets, logos, images, and knowledge base entries
paths:
  /v1/projects/{projectId}/field-catalog:
    get:
      tags:
        - Projects/Brands
      summary: Get Project Field Catalog
      description: >-
        Returns subscriber field metadata for the project: which fields exist,
        how often each is populated (fillRate), example values, and whether the
        field is auto-filled at send time. Powers variable pickers, persona
        prefill, and template-coverage UIs. Optionally scope the result to a
        specific segment or tag.
      operationId: GetProjectFieldCatalog
      parameters:
        - name: projectId
          in: path
          description: Project ID (MongoDB ObjectId)
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: segmentId
          in: query
          description: Restrict the catalog to subscribers in this segment.
          required: false
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: tag
          in: query
          description: Restrict the catalog to subscribers with this tag id.
          required: false
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        '200':
          description: Field catalog response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseFieldCatalog'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      x-codeSamples:
        - lang: javascript
          label: Node.js SDK
          source: >-
            import Migma from 'migma';


            const migma = new Migma('YOUR_API_KEY');


            const { data, error } = await
            migma.projects.fieldCatalog('PROJECT_ID');


            // Scope to a segment or tag:

            // await migma.projects.fieldCatalog('PROJECT_ID', { segmentId:
            'SEGMENT_ID' });

            // await migma.projects.fieldCatalog('PROJECT_ID', { tag: 'TAG_ID'
            });
components:
  schemas:
    ApiResponseFieldCatalog:
      allOf:
        - $ref: '#/components/schemas/ApiResponse'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/FieldCatalogResponse'
    ApiResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          nullable: true
        error:
          type: string
          nullable: true
      required:
        - success
    FieldCatalogResponse:
      type: object
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/FieldCatalogEntry'
        totalSubscribers:
          type: integer
          description: Total subscribers in the scoped set the catalog was computed over.
        computedAt:
          type: string
          format: date-time
          description: When the catalog was computed. Catalogs are cached for up to 1 hour.
      required:
        - entries
        - totalSubscribers
        - computedAt
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          default: false
        error:
          type: string
        code:
          type: string
          description: >-
            Machine-readable error code (e.g., IDEMPOTENCY_CONFLICT,
            DOMAIN_CLAIMABLE).
        data:
          type: object
          description: >-
            Additional structured context for the error, such as the affected
            domain.
          additionalProperties: true
      required:
        - success
        - error
    FieldCatalogEntry:
      type: object
      description: >-
        A single subscriber field discovered in the project, with its fill rate
        and example values.
      properties:
        key:
          type: string
          description: Stable slug used in templates (e.g. firstName, company).
        label:
          type: string
          description: Human-readable label for UI.
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - date
            - url
            - unknown
          description: >-
            Inferred value type. V1 returns 'string' for everything; future
            passes will infer richer types.
        fillRate:
          type: number
          minimum: 0
          maximum: 1
          description: Share of subscribers in the scope with a non-empty value (0–1).
        sample:
          type: array
          items:
            type: string
          description: >-
            Up to 3 example values, each truncated to 50 characters. Empty for
            auto fields.
        auto:
          type: boolean
          description: >-
            True for native fields auto-filled at send time (email, firstName,
            etc.).
      required:
        - key
        - label
        - type
        - fillRate
        - sample
        - auto
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Forbidden - Missing required permissions or access denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where
        YOUR_API_KEY is obtained from the Migma dashboard under Settings →
        Developers → API Keys.

````