Push cohort joins and leaves to another tool

Use an audience sync with the messaging_generic connector to send who joined and left a cohort, signed and retried, to your own endpoint.

Embed
Preview of the card
<a href="https://lucidace.com/help/cohort-changes-push"><img src="https://lucidace.com/help/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/2f4b888b-c4e6-488b-81bd-6e838fb12d2e/pages/a9c35bbe-796e-4553-af64-79165d9d9047/social-card.svg?v=3e7ae33eec8b" alt="Push cohort joins and leaves to another tool" width="600" height="315"></a>

An audience sync keeps a cohort in step with a list on another tool. Every run compares the cohort's members with the last synced snapshot and delivers only the changes: one list.add item per person who joined and one list.remove per person who left. The cohort.recalculated webhook says the cohort changed; an audience sync says who.

  1. Create a connector of type messaging_generic with url set to your endpoint and the credential signing_secret.

  2. POST /v1/projects/{pid}/audience-syncs with connector_id, cohort_id, list_name and the person properties you want with each join.

  3. Optionally POST /v1/projects/{pid}/audience-syncs/{id}/run to sync now. Otherwise it runs on its schedule.

Your endpoint receives {"version":1,"items":[{"id":"…","type":"list.add","distinct_id":"u1","list":"Power Users","attributes":{…}}]}. Store the membership as a targeting attribute, such as lc_cohort_power_users true or false.

  • Signed: Lucida-Signature: t=<unix>,v1=<hex HMAC-SHA256(signing_secret, "<t>.<raw body>")>. Verify it in constant time and reject old timestamps.

  • Retried: 5xx, 408 and 429 are retried with backoff, honouring Retry-After. Any other 4xx parks the batch in the connector's dead-letter queue, where it can be replayed.

  • At-least-once: dedupe on each item's id. One run delivers up to 1,000 joins and 1,000 leaves, and the rest follow on the next run.

  • Consent filters (consent_property, consent_categories) apply to joins only. Leaves always travel.

Updated