Create a new contact in your account. You can include tags, custom properties, and all contact fields.
Backward compatibility: Contacts are still created as subscribed immediately unless you explicitly pass double_opt_in: true. Existing integrations using status: "subscribed" continue to behave as single opt-in.
Double opt-in: Pass double_opt_in: true to create the contact as pending_confirmation, send a confirmation email, and move the contact to subscribed only after the subscriber confirms. Pending contacts are excluded from marketing segment sends until confirmed.
Fields:
- Email (required) - unique per customer
- Name fields - first_name/last_name or combined name
- Contact info - phone, city, country
- Custom properties - unlimited flexible fields
- Tags - categorize your contacts
Note: Email must be unique. Returns 409 if email already exists.
Contact subscription status. Prefer double_opt_in: true instead of setting pending_confirmation directly.
When true, creates the contact as pending_confirmation, sends a confirmation email, and changes status to subscribed only after the subscriber confirms.
Legacy custom fields (prefer custom_properties)
{ "legacy_field": "value" }
User-defined custom properties (flexible JSONB storage)
{ "company": "Acme Inc", "role": "Manager", "plan": "premium" }
- US Data Centerhttps://api.mailerlogic.net/api/v1/contacts
- EU Data Center (coming soon)https://eu-api.mailerlogic.net/api/v1/contacts
- Basic contact
- Contact with all fields
- Contact with double opt-in confirmation
curl -i -X POST \
https://api.mailerlogic.net/api/v1/contacts \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe"
}'{ "success": true, "data": { "id": "123e4567-e89b-12d3-a456-426614174000", "email": "jane@example.com", "created_at": "2019-08-24T14:15:22Z", "double_opt_in": { … } } }