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

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.tags.create({
  name: 'VIP Customers',
  color: '#6D28D9',
  projectId: 'PROJECT_ID'
});
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "color": "<string>",
    "description": "<string>",
    "subscriberCount": 123,
    "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.

Body

application/json
name
string
required
Maximum string length: 100
projectId
string
required
color
string

Hex color code (e.g., #FF5733). Auto-generated if omitted.

description
string
Maximum string length: 500

Response

Tag created

success
boolean
required
data
object
error
string | null