---
updatedAt: 2026-08-05T06:24:37.000Z
agentTools:
  projectIndex: https://docs.zetaglobal.com/llms.txt
---

# Track an Event (batch)

Track an event by a user

| Required Headers | Value            |
| :--------------- | :--------------- |
| Content-Type     | application/json |
| Accept           | application/json |
| Authorization    | Basic <Auth Key> |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "zme",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.zetaglobal.net/ver2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/{site_id}/activities/batch": {
      "post": {
        "summary": "Track an Event (batch)",
        "description": "Track an event by a user",
        "operationId": "track-an-event-batch",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "description": "ZMP Site ID",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "activities": {
                    "type": "array",
                    "items": {
                      "properties": {
                        "subscriber": {
                          "type": "object",
                          "description": "The unique ID of the person",
                          "required": [
                            "uid"
                          ],
                          "properties": {
                            "uid": {
                              "type": "string",
                              "description": "the `user_id` or `email` which identifies your profile"
                            },
                            "contacts": {
                              "type": "object",
                              "required": [
                                "contact_value"
                              ],
                              "properties": {
                                "contact_value": {
                                  "type": "string",
                                  "description": "the contact to be added, e.g. email address or phone number"
                                },
                                "contact_type": {
                                  "type": "string",
                                  "description": "the type of contact, e.g. `email` or `phone`",
                                  "default": "email"
                                },
                                "preferences": {
                                  "type": "array",
                                  "description": "the preference of the contact, e.g. `standard` or `billing`. the default is `standard` but other preferences can be added/customized within the settings menu in ZMP",
                                  "default": [
                                    "standard"
                                  ],
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "subscription_status": {
                                  "type": "string",
                                  "description": "acceptable values include: `new`, `active`, `inactive` or null/blank. Note that passing a blank or null value will retain the current value, or for new contacts, set the value of `new` which will be retained until the contact is messaged",
                                  "default": "active"
                                },
                                "contact_properties": {
                                  "type": "object",
                                  "description": "Name-value pairs of additional attributes/properties you'd like to associate with the specific contact value. You can send a nested hash of basic key-value pairs. General convention is to send the keys in lower case separated with \"underscore\". If not sent, the system automatically converts them.",
                                  "properties": {
                                    "sample_prop": {
                                      "type": "string",
                                      "description": "a name/value pair",
                                      "default": "value"
                                    }
                                  }
                                },
                                "inactivity_reason": {
                                  "type": "string",
                                  "description": "for inactive contacts, set the reason for inactivity, e.g. `unsubscribed`"
                                },
                                "signed_up_at": {
                                  "type": "string",
                                  "description": "the date the contact signed up, if not included, this field will be the same as `created_at`"
                                },
                                "double_opt_in_status": {
                                  "type": "string",
                                  "description": "optional field to track double opt ins - default value is null, but will accept `single` or `double` values"
                                },
                                "phone_type": {
                                  "type": "string",
                                  "description": "optional field for `phone` contact types. default value is null, accepts `mobile` or `landline` values"
                                },
                                "last_sent": {
                                  "type": "string",
                                  "description": "last message sent timestamp, defaults to the last time a message was sent by ZMP but can be overwritten if needed"
                                },
                                "last_opened": {
                                  "type": "string",
                                  "description": "last message opened timestamp, defaults to the last time a message was opened by the contact but can be overwritten if needed"
                                },
                                "last_clicked": {
                                  "type": "string",
                                  "description": "last message clicked timestamp, defaults to the last time a message was clicked by the user but can be overwritten if needed"
                                },
                                "force_active": {
                                  "type": "string",
                                  "description": "an optional parameter that can be used when creating new contacts to bypass `subscription_status: new` for a contact (a `new` status is assigned to all contacts by default unless they are inactive, this status indicates that ZMP has not attempted to send a message to this contact yet)",
                                  "default": "\"true\""
                                },
                                "unique_client_ids": {
                                  "type": "array",
                                  "description": "Additional identifiers to associate with the person profile (UCLID list). Pass as an **array of objects**; each object must include `name` (configured identifier type) and `value` (identifier value). Both fields are required and cannot be empty. Only used when `identify_person` is `true`. Identifier names must be configured in ZMP before use. Up to 25 name/value pairs per call."
                                }
                              }
                            }
                          }
                        },
                        "event": {
                          "type": "string",
                          "description": "The name of the event"
                        },
                        "properties": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "event"
                      ],
                      "type": "object"
                    }
                  },
                  "return_processed_records": {
                    "type": "boolean",
                    "description": "by default, only the count of processed and failed records will be returned in the response, if this field is set to `true` the response will return the individual record data. if this field is omitted we assume `false`",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```