POST https://api.usecommune.comsubscriber.created Production. There is no separate sandbox host.

Subscriber created

Someone became a subscriber of the newsletter. Six paths land here: subscribing from inside the Commune app, finishing signup, accepting an invitation, being subscribed to Commune's own newsletter, confirming a signup made through one of the newsletter's forms, and Add a subscriber (POST /newsletters/{newsletter}/subscribers).

data.form_id is set when the subscriber came through a form, and null otherwise, so a welcome meant for everybody else can leave form signups out. The same signup also publishes subscriber.joined_form.

An import does not land here, and that is deliberate. Neither a CSV upload nor an ESP import nor the daily provider sync fires this topic: an import writes many rows at once and must not fan out one message per row, so it publishes a single import.completed instead. Nothing that keys off this topic therefore reaches an imported list, which is what keeps a welcome sequence off a list the creator migrated in.

Nor does an imported reader finishing signup. Somebody whose address an import already put on the list keeps that subscription when they make a Commune account, and no message is published: they did not subscribe, they made an account for a list they were already on. The silence is the same one as above, for the same reason. Without it an imported list would start a welcome sequence a few readers at a time over the months after the migration instead of all at once, which is the outcome that paragraph exists to prevent.

data.actor is what tells the API path apart from the four the product reaches. It names the credential on a POST, and is null when a person did something in Commune itself.

data.acquisition_source records which import first brought an address and is fixed when the row is created, so it is null for anybody first recorded through Commune. A row that was first imported reaches this topic only by coming back (see below), and carries that provider's slug or csv when it does.

Reactivation counts. Unsubscribing does not delete a subscriber, so a returning reader comes back to subscribed rather than being recorded again. That still fires this topic, with data.resubscribed: true. Setting status back to subscribed through Update a subscriber (PATCH /subscribers/{subscriber}) fires it the same way, and so does a POST naming an address that is already on the list but inactive. Branch on resubscribed before you welcome anybody.

Delivered as a single HTTPS POST to the consumer's registered endpoint, with the message as the JSON request body. Respond 2xx to acknowledge. Anything else, or a timeout, is retried with backoff, so acknowledge fast and do the work afterwards.

Request Headers

  • string Required
  • string(uuid) Required
  • string Required
  • string Required
  • string(date-time) Required
  • integer

Body

Someone became a subscriber, or an unsubscribed one came back.

  • string(uuid) Required
  • string Required
  • string Required
  • string(date-time) Required
  • string(uuid) | null Required
  • string | null Required
POST subscriber.created
Loading...

Share your request

Use this link to easily share a pre-filled request of this operation. Everything you filled will be shared apart from the authentication fields.

Request URL

https://api-reference.usecommune.dev/explorer/operation/operation-onsubscribercreated

Send a delete request

It looks like you’re about to send a DELETE request to this API. This type of request carries a risk of permanent and irreversible data loss.

Are you sure you want to continue?
Response
Waiting for a request to be sent.