Enroll members

Learn how to subscribe Brevo contacts to a loyalty program.

Overview

A subscription links a Brevo contact to a loyalty program. It is the member record. Before enrolling, the contact must already exist in Brevo — use the Contacts API to create or sync contacts first.

On enrollment, all balances are initialized at 0 and the member is placed on the default entry tier.


Enroll a contact

Endpoint: POST https://api.brevo.com/v3/loyalty/config/programs/{pid}/subscriptions

$curl --request POST \
> --url https://api.brevo.com/v3/loyalty/config/programs/27xxdd7a-.../subscriptions \
> --header 'api-key: YOUR_API_KEY' \
> --header 'content-type: application/json' \
> --data '{
> "contactId": 12345,
> "loyaltySubscriptionId": "cust_abc123",
> "creationDate": "2025-03-01T10:00:00.000Z"
> }'

Request parameters

ParameterTypeRequiredDescription
contactIdintegerYesBrevo internal contact ID (must be > 0)
loyaltySubscriptionIdstringNoYour external customer ID, max 64 chars. Useful for cross-referencing with your commerce system.
creationDatestringNoCustom enrollment date (ISO 8601). Use for historical data imports.

Response (200)

1{
2 "contactId": 12345,
3 "loyaltyProgramId": "27xxdd7a-af67-0020-ba65-19d60000a26e",
4 "loyaltySubscriptionId": "cust_abc123",
5 "organizationId": 1,
6 "createdAt": "2025-03-01T10:00:00.000Z",
7 "updatedAt": "2025-03-01T10:00:00.000Z",
8 "versionId": 1
9}

Set loyaltySubscriptionId to your own customer ID at enrollment time. This lets you reference the member by your internal ID throughout the integration and pass it in eCommerce order identifiers — without maintaining a separate ID mapping table.


Linking subscriptions to eCommerce orders

When pushing an order to the Brevo eCommerce API, include loyalty_subscription_id in the identifiers object. This ensures the order is attributed to the correct loyalty member even if the contact’s email address has changed.

1{
2 "id": "order_789",
3 "identifiers": {
4 "email_id": "customer@example.com",
5 "loyalty_subscription_id": "cust_abc123"
6 },
7 "amount": 89.99,
8 "status": "completed"
9}

See Manage orders for the full eCommerce order schema.


Error handling

HTTP codeMeaningWhat to do
400Bad request — missing or invalid parametersCheck contactId is a positive integer; check loyaltySubscriptionId is ≤ 64 chars
401Unauthorized — invalid or missing API keyVerify your api-key header
403Forbidden — Loyalty module not enabledEnsure Loyalty is activated on your Brevo account
404Program not foundCheck the {pid} in your URL path
422Unprocessable entityContact may not exist in Brevo, or the program may not be published yet