Customer Match
Create a Google Customer Match audience from a CRM email list with POST /v1/ads/audiences and a hashed member upload.
By the end of this page, a CRM list is a Google Customer Match audience you can target.
Create an audience
Create the empty customer_list audience with POST /v1/ads/audiences. Then upload members with POST /v1/ads/audiences/{audienceId}/users.
adAccountId is the Google Ads customer id (no dashes).
Google matches on email only, and any phone is ignored. Values are SHA-256 hashed server-side before upload.
import Zernio from '@zernio/node';
const zernio = new Zernio();
const { data: created } = await zernio.adaudiences.createAdAudience({
body: {
accountId: '66b2e19d8c3f5a7e9d0b1c2d',
adAccountId: '1234567890',
type: 'customer_list',
name: 'Newsletter subscribers'
}
});
const { data: upload } = await zernio.adaudiences.addUsersToAdAudience({
path: { audienceId: created.audience.id },
body: { users: [{ email: 'jane@example.com' }, { email: 'sam@example.com' }] }
});
console.log(upload.numReceived);Response (201):
{
"audience": {
"id": "66e5b2c3d4f5a6b7c8d9e0f1",
"name": "Newsletter subscribers",
"type": "customer_list",
"platform": "google"
},
"message": "Audience created"
}The create is not idempotent, so never auto-retry it.
Response (200):
{ "message": "Users added", "numReceived": 2, "numInvalid": 0 }Each upload takes up to 10,000 users.
A 200 means Google accepted the rows, not that the audience can be targeted.
Google matches the hashed emails against active Google accounts. This takes from about 10 minutes to 24 hours.
Google serves a Customer Match list only once the matched list holds enough active users at the moment the ad is served.
Upload at least 5,000 members to clear that threshold, per Google's own guidance (Customer Match).
A small test list that reports numInvalid: 0 and then never serves is that threshold, not a failed upload.
To target the audience, pass its platformAudienceId (from GET /v1/ads/audiences?accountId=&adAccountId=) in audienceInclude on POST /v1/ads/create.
If it fails
| Error | Cause | Fix |
|---|---|---|
422 invalid_field_value | The upload targets an audience that is not a customer_list, or has no platform id yet | Upload to a customer_list audience that has a platform id |
Upload returns 200 but the list never serves | The matched list is under Google's serving threshold | Upload more members (Google's guidance is at least 5,000) |
The 422 body:
{
"error": "Audience has no platform ID. It may not have been created on the platform yet.",
"type": "invalid_request_error",
"code": "invalid_field_value"
}Related
- Create ads: target the audience from a campaign.
- Create custom audience and Add users to audience: every field.
- LinkedIn Matched Audiences: the same endpoint on LinkedIn.