JavaScript
import Migma from 'migma'; const migma = new Migma('YOUR_API_KEY'); const { data, error } = await migma.segments.list('PROJECT_ID');
{ "success": true, "data": [ { "id": "<string>", "name": "<string>", "description": "<string>", "filters": { "tags": [ "<string>" ], "status": "subscribed", "customFields": {} }, "count": 123, "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z" } ], "error": "<string>", "count": 123 }
List segments for a project. Requires API key with AUDIENCE_READ.
API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → API Integration.
Project ID
Segments list
Show child attributes
Was this page helpful?