Update Static Audience

Prev Next
Put
/Audiences/{AUDIENCE_ID}

This API replaces all customers in an existing Static Audience with the records provided in the uploaded file. After processing, the audience will contain only the customers from the newly uploaded file, and all previously stored customer records will be removed.

Body Parameters (multipart/form-data)

  • audience_file (required): A CSV or Excel file with the updated customers data. Use @ followed by the local file path (Example: audience_file=@/Users/john/downloads/audience.csv)

Note:

  • HTTP method must be PUT
  • Only Static audiences can be updated. Attempting to update a Dynamic audience will return '400 - Bad Request'.
  • Only the audience_file field is accepted; no other audience properties can be modified through this endpoint.
Security
HTTP
Type bearer

API key is needed to authorize requests. You can get your API key via the management console.
A Bearer Token is needed to be set in the Authorization header of every API call.
For additional support you can contact us.

Path parameters
AUDIENCE_ID
stringRequired

A CommBox generated number for the Audience

Body parameters
object
audience_file
string (binary) Required

URL of the CSV or Excel file with the updated customers' data

ExampleYXVkaWVuY2VfZmlsZT1AL015IERyaXZlL05ZQ19BdWRpZW5jZS5jc3Y=
Responses
200

OK

Expand All
object
status
integer
Example200
description
string
ExampleOperation successful
response_time
string (date-time)
Example2025-02-06T07:51:52.258Z
data
object
id
string

The updated Audience ID

Example312345
400

Bad Request - Missing required fields, invalid file format, or missing phone1 column

object
status
integer
Example400
description
string
ExampleBad Request
response_time
string (date-time)
Example2025-02-06T07:51:52.258Z
401

Unauthorized - Invalid or missing Bearer token

object
status
integer
Example401
description
string
ExampleUnauthorized
response_time
string (date-time)
Example2025-02-06T07:51:52.258Z
404

Not found - No audience exists with the given ID

object
status
integer
Example404
description
string
ExampleNot Found
response_time
string (date-time)
Example2025-02-06T07:51:52.258Z
429

Too Many Requests - Too many requests have been made in a short period of time (Throttling)

object
status
integer
Example429
description
string
ExampleToo Many Requests – Rate limit exceeded
response_time
string (date-time)
Example2025-02-06T07:51:52.258Z
500

Internal server error

object
status
integer
Example500
description
string
ExampleServer Error
response_time
string (date-time)
Example2025-02-06T07:51:52.258Z