Subscribe to email lists
Subscribe a contact to one or more email lists. This is a public endpoint that doesn't require authentication.
Important: For unauthenticated requests, only public lists can be subscribed to. To subscribe to private lists, you can either:
- Provide a valid email_hmac in the contact object (used by the notification center for re-subscribing after unsubscribing)
- Use the authenticated /api/lists.subscribe endpoint with a bearer token
If the list has double opt-in enabled, a confirmation email will be sent.
post/subscribe
Request body
Example request
{
"workspace_id": "ws_1234567890",
"contact": {
"email": "user@example.com",
"email_hmac": "a1b2c3d4e5f6...",
"external_id": "user_12345",
"timezone": "America/New_York",
"language": "en-US",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"phone": "+15551234567",
"address_line_1": "123 Main St",
"address_line_2": "Apt 4B",
"country": "US",
"postcode": "10001",
"state": "NY",
"job_title": "Software Engineer",
"custom_string_1": "Premium tier",
"custom_number_1": 42,
"custom_datetime_1": "2023-06-01T09:00:00Z",
"custom_json_1": {
"preferences": {
"theme": "dark",
"notifications": true
}
}
},
"list_ids": [
"newsletter",
"product_updates"
]
}Response
Subscription successful
Example response
{
"success": true
}