advertising
Update saved targeting audience
Update a saved_targeting audience's name, description, or spec. Only saved_targeting audiences are
updatable (they exist only on Zernio); uploaded/derived audiences return 422, delete and recreate those
instead. spec replaces the stored spec wholesale (no merge). Ads already created from this audience are
unaffected, they snapshot the targeting at creation.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
audienceIdstring
name?string
Length
length <= 255description?string
spec?
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adaudiences.updateAdAudience({ path: { audienceId: 'audience_abc123', }, body: { name: 'Example', description: 'Hello, world!', spec: { countries: [ 'string', ], regions: [ { key: 'tok_abc123', }, ], cities: [ { key: 'tok_abc123', }, ], }, },});console.log(data);{
"audience": {},
"message": "string"
}Empty
{
"error": "Unauthorized"
}Empty
{
"error": "Not found"
}Empty