Skip to main content
PATCH
Node.js SDK

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 → Developers → API Keys.

Path Parameters

id
string
required

Contact ID (MongoDB ObjectId)

Pattern: ^[0-9a-fA-F]{24}$

Body

application/json
projectId
string
required
firstName
string
lastName
string
phone
string | null

Phone number (free-form, max 30 chars). Null clears the field.

Maximum string length: 30
country
string | null

ISO 3166-1 alpha-2 country code

language
string | null

Language code (ISO 639-1 or BCP 47)

tags
string[]

Tag names (tags will be auto-created if they don't exist)

customFields
object

Merged into the contact's existing custom fields — fields you don't include are left untouched. Pass an empty object to clear all custom fields.

status
enum<string>
Available options:
subscribed,
unsubscribed,
bounced,
non-subscribed

Response

Contact updated

success
boolean
required
data
object
error
string | null