> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# `POST /api/v1/loyalty/enroll`

> `POST /api/v1/loyalty/enroll`

### Request body

`EnrollCustomerRequest`

<ParamField body="customer_id" type="string (uuid)" required>
  Customer to enroll.
</ParamField>

<ParamField body="program_id" type="string (uuid)" required>
  Loyalty program to enroll in.
</ParamField>

### Responses

<ResponseField name="201" type="LoyaltyAccountResponse">
  Customer enrolled
</ResponseField>

<ResponseField name="400" type="ErrorBody">
  Invalid request
</ResponseField>

<ResponseField name="404" type="ErrorBody">
  Program or customer not found
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/loyalty/enroll' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "program_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "created_at": "2026-07-24T12:00:00Z",
    "customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "lifetime_points": 1,
    "points_balance": 1,
    "program_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "tier": "string",
    "updated_at": "2026-07-24T12:00:00Z"
  }
  ```
</ResponseExample>
