Skip to main content
GET
/
v1
/
projects
/
{projectId}
/
field-catalog
Node.js SDK
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' });
{
  "success": true,
  "data": {
    "entries": [
      {
        "key": "<string>",
        "label": "<string>",
        "type": "string",
        "fillRate": 0.5,
        "sample": [
          "<string>"
        ],
        "auto": true
      }
    ],
    "totalSubscribers": 123,
    "computedAt": "2023-11-07T05:31:56Z"
  },
  "error": "<string>"
}

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.

Authorizations

Authorization
string
header
required

API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → API Integration.

Path Parameters

projectId
string
required

Project ID (MongoDB ObjectId)

Pattern: ^[0-9a-fA-F]{24}$

Query Parameters

segmentId
string

Restrict the catalog to subscribers in this segment.

Pattern: ^[0-9a-fA-F]{24}$
tag
string

Restrict the catalog to subscribers with this tag id.

Pattern: ^[0-9a-fA-F]{24}$

Response

Field catalog response

success
boolean
required
data
object
error
string | null