Unicity Mail Subscription API

You may wish to implement a custom sign-up form on your website, or include a sign-up option as part of another process.

This API is for signing up individual subscribers only, and is rate limited to 10 requests per minute per API ID. If you wish to import bulk data this needs to be done through a CSV file within UnicityMail.

GDPR requirements

You will be required to ensure that GDPR permissions have been received before subscribers are added to your mailing lists. This requires a positive confirmation of a consent statement, such as a tick box, that must not be pre-ticked to be completed by the user.

It is best practice to store the consent statement along with the time and date of the declaration in another. Often Custom fields will be set up as such within a UnicityMail installation.

Alternatively, in Unicity CMS 4.15 specific functionality is available to store this consent information, see below.

Request URL

Endpoint

https://www.yoursite.com/admin/api/unicitymail/subscriber

Methods supported

  • POST - Create a subscriber
  • PUT - Update a subscriber

Data params

Required

  • name = [alphanumeric]
  • email = [alphanumeric]
  • list = [integer]

The list value must match the list ID number within your Unicity Mail installation.

Optional

  • custom1
  • custom2
  • custom3
  • ...
  • custom20

Unicity 4.15 and higher

  • consent_statement = [alphanumeric, full text of consent statement agreed]
  • consent_ip = [alphanumeric, submit users IP address if user ticks checkbox themselves, otherwise blank]

Success response

Status: OK

This means that a subscriber has been added to the mailing list or the details have been updated.

Error responses

Errors will be returned for data not matching the required fields. Additionally you may see this response:

Status: Error
Message: Already subscribed

This means that a subscriber with the given email address already exists on the given list ID. No action will have been taken by the API in this case.