Lists

Subscribe a contact to a list

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.

post/api/lists/{id}/subscribe

Request

  • Base URL: https://api.sendly.now
  • URL: https://api.sendly.now/api/lists/{id}/subscribe
  • Auth: one of:
    • HTTP bearer
    • API key in cookie better-auth.session_token

Path parameters

idstring required

List id.

Request body

allowResubscribeboolean

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.

dataobject

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

emailstring email required

Response

Contact subscribed, or an existing membership returned unchanged

successtrue required

Changes

No recorded changes to this operation across all 1 revision of this API.