Skip to main content
POST
https://api2.ecomailapp.cz
/
lists
/
{list_id}
/
subscribe
curl -X POST https://api2.ecomailapp.cz/lists/1/subscribe \
  -H "key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subscriber_data": {
      "name": "Jan",
      "surname": "Novak",
      "email": "jan@novak.cz",
      "gender": "male",
      "company": "Company name",
      "city": "Praha",
      "country": "CZ",
      "phone": "+420777888999",
      "birthday": "1984-01-01",
      "custom_fields": {
        "SHOP": "myshop.cz",
        "BIRTHDAY": { "value": "2022-01-20", "type": "date" }
      },
      "tags": ["tags"],
      "groups": { "grp_5a145ee75780f": ["Category 1", "Category 2"] }
    },
    "trigger_autoresponders": false,
    "update_existing": false,
    "resubscribe": false
  }'
{
  "id": 259471,
  "name": "Jan",
  "surname": "Novak",
  "email": "jan@novak.cz",
  "gender": null,
  "bounce_soft": 0,
  "bounced_hard": 0,
  "bounce_message": null,
  "inserted_at": "2015-01-21 10:50:04",
  "already_subscribed": true
}
list_id
integer
required
ID of the list.
subscriber_data
object
required
Information about the subscriber.
trigger_autoresponders
boolean
default:"false"
Trigger automations when the subscriber is added.
trigger_notification
boolean
default:"false"
Send a notification about the new subscriber if configured in list settings.
update_existing
boolean
default:"false"
Update the subscriber if they already exist in the list.
skip_confirmation
boolean
default:"false"
Skip double opt-in confirmation. If false, the system sends a double opt-in email and the subscriber is added with status 6 (unconfirmed).
resubscribe
boolean
default:"false"
Force resubscribe if the subscriber was previously unsubscribed (status 2). If status is provided in subscriber_data, it takes precedence. For resubscribe to work, the status must be 1.
If the subscriber already exists in the list, the response includes already_subscribed: true.
The inserted_at field in the response returns the time in UTC format.
curl -X POST https://api2.ecomailapp.cz/lists/1/subscribe \
  -H "key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subscriber_data": {
      "name": "Jan",
      "surname": "Novak",
      "email": "jan@novak.cz",
      "gender": "male",
      "company": "Company name",
      "city": "Praha",
      "country": "CZ",
      "phone": "+420777888999",
      "birthday": "1984-01-01",
      "custom_fields": {
        "SHOP": "myshop.cz",
        "BIRTHDAY": { "value": "2022-01-20", "type": "date" }
      },
      "tags": ["tags"],
      "groups": { "grp_5a145ee75780f": ["Category 1", "Category 2"] }
    },
    "trigger_autoresponders": false,
    "update_existing": false,
    "resubscribe": false
  }'
{
  "id": 259471,
  "name": "Jan",
  "surname": "Novak",
  "email": "jan@novak.cz",
  "gender": null,
  "bounce_soft": 0,
  "bounced_hard": 0,
  "bounce_message": null,
  "inserted_at": "2015-01-21 10:50:04",
  "already_subscribed": true
}