Shared Audiences in Audiohook

How to create shared audiences in Audiohook

Sending Sharable Audience Data to Audiohook

This document outlines the process for sending sharable audience data to Audiohook using both GET and POST requests. The endpoint for these requests is https://audience.audiohook.com. All requests require specific fields and must include the agency or partner UUID in the request header.

Requirements

Headers

All requests must include the agency or partner UUID in the header with the key X-API-KEY.

Fields

The following fields are required:

  • audience_name: The name of the audience.
  • audience_id: A unique identifier for the audience.
  • ip_addresses: A single IP address or a list of IP addresses associated with the audience users.
  • shared: A Boolean value, which must always be set to true.

GET Request

The GET request requires all fields to be sent as URL parameters.

Endpoint

GET <https://audience.audiohook.com>

Headers

X-API-KEY: <your-agency-or-partner-uuid>

URL Parameters

  • audience_name: The name of the audience (string).
  • audience_id: The unique ID of the audience (string).
  • ip_addresses: A comma-separated list of IP addresses or a single IP address (string).
  • shared: This must be set to true.

Example Request

GET <https://audience.audiohook.com?audience_name=ExampleAudience&audience_id=12345&ip_addresses=192.168.1.1,192.168.1.2&shared=true>
X-API-KEY: abcdef123456

POST Request

The POST request requires the fields to be sent in the request body as a JSON object.

Endpoint

POST <https://audience.audiohook.com>

Headers

Content-Type: application/json
X-API-KEY: <your-agency-or-partner-uuid>

Body

{
  "audience_name": "ExampleAudience",
  "audience_id": "12345",
  "ip_addresses": ["192.168.1.1", "192.168.1.2"],
  "shared": true
}

Example Request

POST <https://audience.audiohook.com>
Content-Type: application/json
X-API-KEY: abcdef123456

{
  "audience_name": "ExampleAudience",
  "audience_id": "12345",
  "ip_addresses": ["192.168.1.1", "192.168.1.2"],
  "shared": true
}

Notes

  • Ensure that the X-API-KEY header is included in all requests. Without it, the requests will be rejected.
  • The shared field must always be true for sharable audience data.
  • For GET requests, IP addresses must be comma-separated. For POST requests, IP addresses should be sent as an array.

This guide ensures proper integration with Audiohook's sharable audience data functionality. If you encounter any issues, contact Audiohook support for assistance.

Did this answer your question?
😞
😐
🤩