POST
/
api
/
public
/
apps
/
batch
curl --request POST \
  --url http://localhost/api/public/apps/batch \
  --header 'Content-Type: application/json' \
  --header 'PublicWriteKey: <api-key>' \
  --header 'authorization: <authorization>' \
  --data '{
  "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"
    }
  ]
}'
"<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"
    }
  ]
}

Authorizations

PublicWriteKey
string
headerrequired

Authorization header for the request, in the format Bearer <token>. Find your token at https://dittofeed.com/dashboard/settings#write-key.

Headers

authorization
string
required

Authorization header for the request, in the format Bearer <token>. Find your token at https://dittofeed.com/dashboard/settings#write-key.

Body

application/json
batch
object[]
required
context
object

Provides metadata about the user submitting the event and the context in which the event occurred.

Response

204 - application/json

An empty String