Skip to main content
This guide shows you how to build an unattended integration that uploads an audience to Narrative and delivers it into a Custom Audience in one Meta ad account. You can create a new Custom Audience or add to one that already exists. Before you start, complete the prerequisites and set up API access. You need a profile ID and an eligible ad account ID, with its act_ prefix.

1. Create the dataset

The dataset must carry at least one identifier the connector recognizes. Each identifier is a column named after the identifier, such as sha256_hashed_email, holding an object with a value property. See Supported identifiers for the full list.
Record the id in the response.

2. Activate the dataset

The response is 201 with the dataset, now "status": "active". Activation locks the schema, so activate only once the shape is settled.

3. Upload and ingest your file

Each line of the file is one member. Trim and lowercase each email, then hash it with SHA-256. See Hashing PII for Upload for the formatting rules.
Request an upload URL, send the file to it, then ingest the file into the dataset:
The upload URL carries its own signature, so send no authorization header with the PUT. Pass the path from the first response as source_file. Ingestion runs in the background. Watch the record count on the dataset to know when it has finished:
The count moves from zero to your row count, typically within a minute or two.

4. Confirm Meta accepts the dataset

Look for the Facebook Connector ("app_id": 8) in the accepted list:
audience_first_party_new creates a new Custom Audience, and audience_first_party_existing adds to one you already have.

5. Deliver to a new Custom Audience

Create a connection. The connector creates the Custom Audience in Meta before it answers, so the audience exists in Ads Manager once you get 201.
Both type fields are required. The outer one identifies what you are connecting, and the one inside quick_settings selects the delivery interface. Record the connection id. You need it to stop the delivery.

6. Confirm the connection

The response lists the connection with "status": "active". In Ads Manager, under Audiences, the audience appears as a Customer List Custom Audience with the name you gave it, marked Populating while Meta matches the members. Its Audience ID column holds the ID you use in the next step.

7. Deliver to an existing Custom Audience

To send another dataset into an audience that already exists, whether Narrative created it or not, connect with the audience’s Meta ID from the Audience ID column in Ads Manager:
The audience must belong to an ad account the profile can reach. It keeps the membership duration it already has.

Keeping the audience current

Write new data to the dataset. The connection keeps running, so new rows reach the Custom Audience without further calls.

Stopping delivery

Deleting the connection archives it and stops further deliveries. The Custom Audience stays in Meta with its members. Delete it in Ads Manager if you no longer want it.

Troubleshooting

Getting help

Contact your Narrative relationship manager with your company ID, the dataset ID, and the failing request and response.

Sending conversion events via the API

Send offline conversions to a Meta dataset

Meta Custom Audiences Connector

Supported identifiers and audience membership duration

Connector Interfaces

Why a dataset connects to an interface rather than a connector

API Keys

Create and rotate keys for programmatic access