Batched operations
Some endpoints of the Audience API allow access to multiple users' data with a single HTTP request. These endpoints follow the same convention, described below.
Getting data
If an Audience API endpoint allows batched GET requests, add user_ids
query string parameter containing a comma-separated list of user IDs:
https://<space_domain>/api/audience/profile?user_ids=<user_id_1>,<user_id_2>, ...
A response to a batched GET request will contain a users
array, with each element containing an object with a user_id
and corresponding data
object:
{
"message": "OK",
"users": [
{
"user_id": "<user_id>",
"data": {
// Data related to the user
}
},
...
]
}
Updating data
When making a batched POST or PUT request, the body is expected to contain an array of objects, each related to a single user and containing the user_id
attribute:
PUT https://<space_domain>/api/audience/profile
[
{
"user_id": "<user_id>"
"data": {
// Data related to the user
}
},
...
]
Last updated
Was this helpful?