Update Audience
URL
Required rights:
admin,messageSend, oreventCreate
To update an existing audience segment, use /audience/:id.
PATCH - https://{{nmpUrl}}/audience/:idBody
Field | Type | Required | Description |
|---|---|---|---|
| String | ✅ | Name of the audience for your campaign. |
| Object | ✅ | Tag rules that define if your audience must own all mentioned tags or at least one. |
| Array | ✅ | Tag(s) associated with the digital passports you wish to target. |
| Boolean | ✅ |
|
| String | ❌ | Custodial or non-custodial wallet. |
| Number | ❌ | A period in days during which activity was observed on the user's wallet. |
| Array | ❌ | Define the target country. |
{
"name": "Brand A Campaign",
"tagRule": "all",
"uniqueOwner": true
}Return Payload
| Status Code | Success | Description |
|---|---|---|
200 | true | The audience has been updated. |
{
"_id": "660ffa248b242638ac6ccac5",
"name": "Audience test",
"tagRule": "all",
"uniqueOwner": true,
"createdAt": "2024-04-05T13:18:28.777Z",
"updatedAt": "2024-04-05T13:27:52.838Z",
"__v": 0
}Errors
| Status Code | Success | Description |
|---|---|---|
404 | false | The ID may be wrong or the audience does not exist. |
400 | false | The audience format is incorrect. |
{
"error": "audience not found"
}{
"errors": [
{
"value": "660ffa248b242638ac6ccac3za",
"msg": "audienceId must be a mongoId",
"param": "audienceId",
"location": "params"
}
]
}Updated 13 days ago
