Introduction

The unsubscribe API provides back a list of unsubscribe events within a specific time period. Should you want to change a subscribers subscription status, use the Contact API.

Unsubscribe Method

Receive unsubscribed contacts within a time range.

Unsubscribe Objects

Unsubscribes object



Receive unsubscribed contacts within a time range.

Path

GET /unsubscribes

Description

Returns unsubscribe events where the event was triggered from preferences centre, app, list unsubscribe (generated when the contact clicks the "unsubscribe" button in their email client), or link unsubscribe (generated when the contact clicks a link that is formatted for Ometria to recognise it).

Request Parameters

since

The earliest date from which to fetch unsubscribe data. Following time format YYYY-MM-DDTH:I:S in UTC.

typestring
inpath
before

The latest date from which to fetch unsubscribe data. Following time format YYYY-MM-DDTH:I:S in UTC.

typestring
inpath
type

The type of unsubscribe event to return.

typestring
inpath

Response

200 OK
Array<Unsubscribes

An array of unsubscribe objects.


403 Forbidden

API key is not authorised to access this resource.

Response Example (200 OK)

[
  {
    "email_address": "email@example.com",
    "profile_id": "19e53-b37265-160",
    "reason": null,
    "timestamp": "2017-05-17 22:08:07+00",
    "type": "preferences_centre"
  }
]

Unsubscribes: object

Describes an Unsubscribe record.

ValueTypeDescription
profile_id
string

The profile id of the contact whom has unsubscribed.


email_address
string

The email address of the contact whom has unsubscribed.


type
string , x ∈ { preferences_centre , app , list_unsubscribe , link_unsubscribe}

The type of unsubscribe event. This indicates where the contact unsubscribed (e.g., "preferences_centre").


timestamp
string (date-time)

The timestamp of the unsubscribe event.


reason
string

The reason given for unsubscribing.


Example

{
  "email_address": "email@example.com",
  "profile_id": "19e53-b37265-160",
  "reason": null,
  "timestamp": "2017-05-17 22:08:07+00",
  "type": "preferences_centre"
}