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

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. The project is automatically derived from the key.

Body

application/json
email
string<email>
required
subscribed
boolean
default:true
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

Contact updated

id
string

Unique contact identifier

email
string<email>

Contact email address

subscribed
boolean

Subscription status

data
object

Custom contact data fields

createdAt
string<date-time>
updatedAt
string<date-time>
_meta
object