Update an audience
A audience_id
should be uniquely identifiable using a string ID that will not change.
Examples
JSON
{
"name": "Developers from San Francisco",
"filter": {
"operator": "AND",
"filters": [
{
"path": "location",
"operator": "EQ",
"value": "San Francisco"
},
{
"path": "job_title",
"operator": "EQ",
"value": "Developer"
}
]
}
}
The above will result with:
200
{
"audience": {
"id": "<audience-id>",
"name": "My favorite people",
"description": "People I like",
"created_at": "<iso-8601-formatted-string>",
"updated_at": "<iso-8601-formatted-string>",
"filter": {
"operator": "AND",
"filters": [
{
"path": "location",
"operator": "EQ",
"value": "San Francisco"
},
{
"path": "job_title",
"operator": "EQ",
"value": "Developer"
}
]
}
}
}
Example
Method: PUT
URL: https://api.courier.com/audiences/abcdefgh12345678
Body:
{
"id": "abcdefgh12345678",
"name": "Developer Audience",
"description": "Audience for developers",
"filter": {
"Multiple Filters": {
"operator": "OR",
"filters": [
{
"operator": "EQ",
"value": "engineer",
"path": "title"
},
{
"operator": "EQ",
"value": "product manager",
"path": "title"
}
]
}
}
}