Skip to main content
GET
/
v1
/
topics
Node.js SDK
import Migma from 'migma';

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.topics.list({
  projectId: 'PROJECT_ID'
});
{
  "success": true,
  "data": [
    {
      "id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "defaultSubscription": "opt_in",
      "visibility": "public",
      "displayOrder": 123,
      "isActive": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "error": "<string>",
  "count": 123
}

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.

Query Parameters

projectId
string
required

Project ID

includeInactive
boolean
default:false

Include inactive topics

Response

Topics list

success
boolean
required
data
object[]
error
string | null
count
integer