Target your advertising activity at specific audiences to increase its effectiveness. You can choose from audiences curated by Roku, and you can create your own custom audiences. There are two ways you can create a custom audience: from a customer list and from events data. Currently with the Ads API, you can only create a custom audience from a customer list.
Create a custom audience from a customer list
Your customer list needs to be in the form of a CSV (.csv) or TXT (.txt) file and is referred to in Ads API as a customer relationship management (CRM) file. If you aren’t sure how to properly format your CRM file, see CRM file rules and formatting below.
-
Make a
POSTCreate CRM file upload URLs call and include the following in your request body parameters:filename- name of your CRM fileaccount_uid- the unique identifier of your account
A successful call returns three things:
- An
upload_url- the unique, write-only URL you upload your CRM file to in Step 2. You need oneupload_urlper CRM file, or custom audience that you want to create. - A
metadata_urlyou can use to validate the upload of Step 2 is successful, if you want. - The
raw_pathyou use in Step 3.
-
Make a
PUTcall to theupload_urlyou received in Step 1 with your CRM file. -
Make a
POSTCreate CRM file objects call to inform Ads API that you've uploaded your CRM file. Include the following in your request body parameters:filename- name of your CRM file (has to match the filename in Step 1.)account_uid- unique identifier of your accountraw_path- the path to the raw CRM file
A successful call returns the
crm_file_uidyou need in Step 4 along with data likeinput_size_counts,matched_size_counts, andhousehold_matched_countswith a value of zero. This is because the data ingestion hasn't been triggered yet. -
Optionally, to check the processing status of your CRM file, make a
GETGet a CRM file call. Check the successful response forstatus: match_valid. If you don't see this, the two most common errors to check are:- The headers in your file could be formatted incorrectly.
- The data in your file didn't match to 1,000 Roku households.
-
Make a
POSTCreate custom audiences call and include the following in your request body parameters:name- the name of the custom audienceaccount_uid- the unique identifier of your accountaudiences_config- the configuration for how users are added to this audience.
Theaudiences_configattribute needs to include the following key value pairs:crm_file_uid- the unique identifier of your CRM fileexpiration_value- the expiration value of your CRM file key. Default is90.expiration_unit- the expiration unit of your CRM file key. Default isday.
You can make a GET Get an audience call to view your newly created custom audience. If you have user access to the ad account to which it belongs, you can also view this custom audience in the Custom audience library in the Ads Manager UI.
CRM file rules and formatting
Your CRM file should include as much of the following information as possible to improve your data matching: customer email, SHA-256-hashed email address, phone number, mobile advertiser ID (MAID) or IP address.
It needs to follow these rules:
- Must be in the form of a CSV (.csv) or TXT (.txt) file
- Must include enough data to match at least 1,000 Roku households
- Hashed email address can't be Base64-encoded
Example of a customer list in the form of a CSV file
| sha256email | phone | maid | ip | |
|---|---|---|---|---|
| [email protected] | a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2 | 1-(310)-555-0101 | a1b2c3d4-01ee-455a-b3c4-e57283966239 | 192.0.2.1 |
| [email protected] | b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3 | 1-(909) 555-0102 | B2C3D4E5-02EE-455A-B3C4-E57283966239 | 192.0.2.2 |
| [email protected] | c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4 | 1-(323) 555-0103 | c3d4e5f6-03ee-455a-b3c4-e57283966239 | 192.0.2.3 |
| [email protected] | d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5 | 1-(925) 555-0104 | d4e5f6a1-04ee-455a-b3c4-e57283966239 | 192.0.2.4 |
| [email protected] | e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6 | 1-(415) 555-0105 | E5F6A1B2-05EE-455A-B3C4-E57283966239 | 192.0.2.5 |
| [email protected] | f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1 | 1-(212) 555-0106 | f6a1b2c3-06ee-455a-b3c4-e57283966239 | 192.0.2.6 |