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

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.contacts.changeStatus({
  email: '[email protected]',
  status: 'unsubscribed',
  projectId: 'PROJECT_ID'
});
{
  "success": true,
  "data": {
    "success": true
  },
  "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
email
string<email>
required

Email address of the contact

status
enum<string>
required

New status for the contact

Available options:
subscribed,
unsubscribed,
bounced,
non-subscribed
projectId
string
required

Project ID

allLists
boolean
default:true

Apply to all lists

tags
string[]

Specific tag IDs to scope the status change

Response

Status updated

success
boolean
required
data
object
error
string | null