API Reference
POST /api/public/apps/batch
The batch method lets you send a series of identify, group, track, page and screen requests in a single batch, saving on outbound requests.
POST
/
api
/
public
/
apps
/
batch
Header
Body
curl --request POST \
--url http://localhost/api/public/apps/batch \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '{
"batch": [
{
"event": "Signed Up",
"messageId": "1ff51c9c-4929-45de-8914-3bb878be8c4a",
"properties": {
"plan": "Enterprise"
},
"type": "track",
"userId": "1043"
},
{
"messageId": "6f5f436d-8534-4070-8023-d18f8b78ed39",
"traits": {
"email": "[email protected]"
},
"type": "identify",
"userId": "532"
}
]
}'
"<string>"
The following is an example of a batch body.
example body
{
"batch": [
{
"type": "track",
"event": "Signed Up",
"userId": "1043",
"properties": {
"plan": "Enterprise"
},
"messageId": "1ff51c9c-4929-45de-8914-3bb878be8c4a"
},
{
"type": "identify",
"userId": "532",
"traits": {
"email": "[email protected]"
},
"messageId": "6f5f436d-8534-4070-8023-d18f8b78ed39"
}
]
}
Headers
authorization
string
requiredBody
application/json
batch
object[]
requiredOption 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8
context
object
Response
204 - application/json
An empty String
curl --request POST \
--url http://localhost/api/public/apps/batch \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '{
"batch": [
{
"event": "Signed Up",
"messageId": "1ff51c9c-4929-45de-8914-3bb878be8c4a",
"properties": {
"plan": "Enterprise"
},
"type": "track",
"userId": "1043"
},
{
"messageId": "6f5f436d-8534-4070-8023-d18f8b78ed39",
"traits": {
"email": "[email protected]"
},
"type": "identify",
"userId": "532"
}
]
}'
"<string>"