Enrollments

Enrollments connect a contact to a campaign, triggering the campaign's message sequence.

The enrollment model

Properties

  • Name
    id
    Type
    integer
    Description

    Unique identifier for the enrollment.

  • Name
    campaign_id
    Type
    string
    Description

    ID of the campaign the contact is enrolled in.

  • Name
    contact_id
    Type
    string
    Description

    ID of the enrolled contact.

  • Name
    enrolled_at
    Type
    timestamp
    Description

    When the contact was enrolled.

  • Name
    completed
    Type
    boolean
    Description

    Whether the enrollment has completed all campaign steps.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the enrollment was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the enrollment was last updated.


GET/v1/enrollments

List all enrollments

Returns a paginated list of enrollments, ordered by most recently created.

Optional attributes

  • Name
    campaign_id
    Type
    string
    Description

    Filter enrollments by campaign ID.

  • Name
    contact_id
    Type
    string
    Description

    Filter enrollments by contact ID.

  • Name
    completed
    Type
    boolean
    Description

    Filter by completion status (true or false).

  • Name
    limit
    Type
    integer
    Description

    Number of results per page (1–100). Defaults to 25.

  • Name
    page
    Type
    integer
    Description

    Page number. Defaults to 1.

Request

GET
/v1/enrollments
curl -G https://dashboard.reviewrover.co/api/v1/enrollments \
  -H "Authorization: Bearer {token}" \
  -d campaign_id="camp_Kd93lftgZXGRbxqoj"

Response

{
  "enrollments": [
    {
      "id": 1,
      "campaign_id": "camp_Kd93lftgZXGRbxqoj",
      "contact_id": "cont_KYdl3lftgZXGRbxqoj",
      "enrolled_at": "2025-02-17T02:00:34Z",
      "completed": false,
      "created_at": "2025-02-17T02:00:34Z",
      "updated_at": "2025-02-17T02:00:34Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 1,
    "total_pages": 1
  }
}

POST/v1/enrollments

Create an enrollment

Enrolls a contact in a campaign. Returns an error if the contact was already enrolled recently.

Required attributes

  • Name
    campaign_id
    Type
    string
    Description

    ID of the campaign to enroll the contact in.

  • Name
    contact_id
    Type
    string
    Description

    ID of the contact to enroll.

Request

POST
/v1/enrollments
curl https://dashboard.reviewrover.co/api/v1/enrollments \
  -H "Authorization: Bearer {token}" \
  -d campaign_id="camp_Kd93lftgZXGRbxqoj" \
  -d contact_id="cont_KYdl3lftgZXGRbxqoj"

Response

{
  "id": 1,
  "campaign_id": "camp_Kd93lftgZXGRbxqoj",
  "contact_id": "cont_KYdl3lftgZXGRbxqoj",
  "enrolled_at": "2025-02-17T02:00:34Z",
  "completed": false,
  "created_at": "2025-02-17T02:00:34Z",
  "updated_at": "2025-02-17T02:00:34Z"
}

GET/v1/enrollments/:id

Retrieve an enrollment

Retrieves an enrollment by its ID.

Request

GET
/v1/enrollments/1
curl https://dashboard.reviewrover.co/api/v1/enrollments/1 \
  -H "Authorization: Bearer {token}"

DELETE/v1/enrollments/:id

Delete an enrollment

Removes an enrollment, stopping any pending messages for that contact in the campaign.

Request

DELETE
/v1/enrollments/1
curl -X DELETE https://dashboard.reviewrover.co/api/v1/enrollments/1 \
  -H "Authorization: Bearer {token}"