Skip to main content

Audience Service API

Get audience information via API.

The Audience Service API allows you to directly retrieve audience information to use in marketing campaigns or other analysis.

The Audience Service endpoints require an Access Token. To generate the token, you'll need your API credentials. To generate credentials, log into your app as a Partner Administrator and navigate to the Authentication > Audience API Key section. Here, create your client_id and client_secret to be used with the Access Token endpoint.

Only one set of credentials may be active at one time. When you create credentials, be sure to copy the client_id and client_secret. The secret cannot be retrieved once you have navigated away from the page.

Parameters

The Audience Service API endpoints may require the following parameters.

FieldData TypeDescription
client_idStringCredentials created in your app.
client_secretStringCredentials created in your app.
tokenStringBearer token used with all Audience Service endpoints, created with the Create Token endpoint.
id_or_slugStringThe ID or slug of the audience. Used in the path.
institution_public_idStringQuery parameter for the public id of the institution.

Examples

Audience data may be requested in either JSON or CSV format.

Requests

Format your requests to accept your preferred format, JSON or CSV.

JSON-Request
CSV-Request
Language:text

_10
GET /api/v1/audience/audience_1/list?institution_public_id=INST_PUBLIC_ID HTTP/1.1
_10
Host: yourdomain.access.mx.com
_10
Authorization: Bearer mock_token_123
_10
Accept: application/json

Responses

Data will be returned in the requested format.

JSON
CSV
Language:json

_13
{
_13
"audience_id": "audience_1",
_13
"count": 5,
_13
"institution_id": "INST_PUBLIC_ID",
_13
"list": [
_13
"02b70bd917264a3181beac85c1abd71e",
_13
"8e468df6954c4d29b63aa983d8cf6155",
_13
"17093a20cf144035a20b46544075fb08",
_13
"92246bce171a4d6dbd708a25656c2da4",
_13
"c248c09004c4460398535caeeb753b91"
_13
],
_13
"updated_on": "2023-10-01"
_13
}

On this page