Email List Endpoints

This document showcases all available endpoints that target Rejoiner's Lists.

Quick Outline

Email Lists

This endpoint will return a listing of all available email lists for a given site.

GET /lists/

Example Response:

[
  {'id': 'J000kGx', 'name': 'VIP Members'},
  {'id': 'pAbce0G', 'name': 'Promotional Subscribers'},
  {'id': 'r0ABC0O', 'name': 'Sale Customers'}
]

Retrieve Listing of Contacts

This paginated endpoint will return a listing of the contacts that have been added to a given list. This endpoint returns 100 contacts per page. You can find the List ID from the lists page:

GET /lists/LIST_ID/contacts/?page=PAGE_NUMBER

Example Response:

{
  "count": 1234,
  "next": "https://rj2.rejoiner.com/api/v1/SITE_ID/lists/LIST_ID/contacts/?page=2",
  "previous": null,
  "results": [
    {
      "customer": {
        "id": "CUSTOMER_ID",
        "email": "test@example.com",
        "first_name": "Test"
      },
      "custom_fields": {}
    },
    {
      "customer": {
        "id": "CUSTOMER_ID",
        "email": "another@example.com",
        "first_name": "Another"
      },
      "custom_fields": {}
    },
    ...
  ]
}

Add Customer to List

This endpoint will add a customer to a list, or if the customer already exists, will update the record of that customer with the supplied data. The List ID can be found on the page for the list or via the above Email List endpoint.

POST /lists/LIST_ID/contacts/

Note: The trailing slash at the end of the endpoint is required

Payload Structure:

PARAM NAME REQUIRED TYPE DESCRIPTION
email Yes String The email address of the customer
first_name No String The first name of the customer

Any additional params will be treated as strings and added to the  custom_fields of the list contact.The first_name param will update the customer's first name across Rejoiner, not just for the given list.

Example Payload:

{
  "email": "test@example.com",
  "first_name": "Test",
  "age": "28",
  "another_custom_field": "abc"
}

On a successful request, the response will return a structured response representing the entire list contact.

Example Response:

{
  "customer": {
    "id": "CUSTOMER_ID",
    "email": "test@example.com",
    "first_name": "Test"
  },
  "custom_fields": {
    "existing_custom_field": "xyz",
    "age": "28",
    "another_custom_field": "abc"
  }
}

Remove Customer From List

This endpoint will remove a customer from a list.

POST /lists/LIST_ID/contacts/remove/

Note: The trailing slash at the end of the endpoint is required

Payload Structure:

PARAM NAME REQUIRED TYPE DESCRIPTION
email Yes String The email address of the customer

Example Payload:

{"email": "test@example.com"}

Still need help? Contact Us Contact Us