Skip to Content
SendlySendly
API ReferenceLists

Subscribe a contact to a list

POST
/api/lists/{id}/subscribe

Add a contact to a list, creating the contact if it does not exist. When the list has doubleOptIn enabled the membership is created as PENDING and the response carries a confirmToken — Sendly does NOT send the confirmation email, so the caller must deliver /api/lists/confirm-subscription?token=<confirmToken> to the contact itself.

Accepts SENDING_ONLY (pk_*) keys so it can back a public subscribe form.

Re-subscribing after an opt-out. If the email already holds an UNSUBSCRIBED membership on this list, the call fails with 409 RESUBSCRIBE_CONFIRMATION_REQUIRED unless the body sets allowResubscribe: true. Reversing an opt-out is a consent decision, so it is never the default — set the flag only when the contact themselves asked to be re-subscribed.

previousStatus reports the membership's status before the call (null when it did not exist); prefer it over created when describing what changed, since created: false is equally true for an unchanged membership and for a reactivated one.

Requires the lists:write scope — Create, rename, and delete your subscriber lists.

headerAuthorizationBearer <API Key>

API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.

id*string

List id.

Length1 <= length
application/json
  1. body

Body for POST /api/lists/{id}/subscribe.

email*string
Formatemail
data?

Custom fields to upsert onto the contact as part of subscribing.

allowResubscribe?boolean

Permission to reverse an earlier opt-out. When the email already has an UNSUBSCRIBED membership on this list, the call fails with 409 RESUBSCRIBE_CONFIRMATION_REQUIRED unless this is true. Send true only when the contact is acting for themselves — a public subscribe form they submitted is affirmative consent — never for an operator-initiated add.

Defaultfalse

Response Body

Contact subscribed, or an existing membership returned unchanged

application/json
  1. response

Result of a list-subscribe call.

success*true
Value intrue
data*
Example Request
curl -X POST 'https://api.sendly.now/api/lists/string/subscribe' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com"}'
Example Response
{  "success": true,  "data": {    "membershipId": "8072cc74-4782-4f2c-827c-699c48ce2092",    "status": "PENDING",    "created": true,    "previousStatus": "PENDING",    "confirmToken": "string"  }}