JavaScript
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>" }
Create a new tag. Requires API key with AUDIENCE_WRITE.
API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → API Integration.
100
Hex color code (e.g., #FF5733). Auto-generated if omitted.
500
Tag created
Show child attributes
Was this page helpful?