Skip to main content
PATCH
/
v1
/
topics
/
{id}
Node.js SDK
import Migma from 'migma';

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.topics.update('TOPIC_ID', {
  name: 'Monthly Digest',
  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>"
}

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

id
string
required

Topic ID

Body

application/json
projectId
string
required
name
string
Maximum string length: 100
description
string
Maximum string length: 500
visibility
enum<string>
Available options:
public,
private
displayOrder
integer
Required range: x >= 0
isActive
boolean

Response

Topic updated

success
boolean
required
data
object
error
string | null