Skip to main content
PATCH
/
contacts
/
{id}
curl --request PATCH \
  --url https://api.mailglyph.com/contacts/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "subscribed": true,
  "data": {
    "firstName": "John",
    "lastName": "Doe",
    "plan": "premium"
  }
}
'
{
  "id": "<string>",
  "email": "[email protected]",
  "subscribed": true,
  "data": {},
  "expiresAt": "2023-11-07T05:31:56Z",
  "projectId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.mailglyph.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. Workspaces can have multiple active keys, and sender-domain operations enforce per-key domain scope when configured.

Path Parameters

id
string
required

Body

application/json
subscribed
boolean
data
Example object · object

Optional custom contact data fields. Choose Empty object if you do not want to send any example preset keys.

Example:
{
"firstName": "John",
"lastName": "Doe",
"plan": "premium"
}

Response

200 - application/json

Contact updated

id
string

Unique contact identifier

email
string<email>

Contact email address

subscribed
boolean

Subscription status

data
object

Custom contact data fields

status
enum<string>
Available options:
ACTIVE,
PENDING
expiresAt
string<date-time> | null
projectId
string
createdAt
string<date-time>
updatedAt
string<date-time>