---
agentTools:
  projectIndex: https://sendinblue.readme.io/llms.txt
---

# Track event

### CURL Example

```curl
curl --request POST \
     --url https://in-automate.brevo.com/api/v2/trackEvent \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'ma-key: ' \
     --data '
{
    "email": "example@brevo.com",
    "event": "cart_updated",
    "eventdata": {
        "data": {
            "added_product": [
                {
                    "currency": "EUR",
                    "name": "Wrist watch",
                    "type": "accessories",
                    "price": "50.00"
                }
            ]
        }
    },
    "properties": {
        "additionalProp": "string"
    }
}
```

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-samples-languages": [
    "curl"
  ],
  "info": {
    "version": "2.0",
    "title": "RESTful Tracker",
    "description": "The RESTful Tracker is for logging users related events which you can then use to trigger actions in your Marketing Automation workflows.\n\n\n**Possible responses**\n\n  | Code | Message |\n  | :-------------: | ------------- |\n  | 204  | OK. Successful request  |\n  | 400  | Error. Bad request |\n  | 401  | Error. Authentication Needed  |\n  | 403  | Error. Permission denied  |\n  | 405  | Error. Method not allowed  |\n",
    "contact": {
      "name": "Brevo Support",
      "email": "contact@brevo.com",
      "url": "https://my.brevo.com"
    },
    "license": {
      "name": "MIT",
      "url": "http://opensource.org/licenses/MIT"
    }
  },
  "security": [
    {
      "ma-key": []
    }
  ],
  "paths": {
    "/trackEvent": {
      "post": {
        "tags": [
          "Restful endpoints"
        ],
        "summary": "Track event",
        "operationId": "trackEvent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/trackEvent"
              }
            }
          },
          "description": "Values to track an event",
          "required": true
        },
        "responses": {
          "204": {
            "description": "Event has been tracked successfully",
            "content": {}
          },
          "400": {
            "description": "bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/400Model"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://in-automate.brevo.com/api/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "ma-key": {
        "type": "apiKey",
        "name": "ma-key",
        "in": "header"
      }
    },
    "schemas": {
      "trackEvent": {
        "type": "object",
        "required": [
          "event",
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "Example for email is ** \"email\": \"example@brevo.com\" **\n",
            "example": "example@brevo.com"
          },
          "event": {
            "type": "string",
            "description": "An example for event is ** \"event\": \"cart_updated\" ** \n",
            "example": "cart_updated"
          },
          "properties": {
            "type": "object",
            "description": "This object will content all your custom fields. Add as many as needed. Keep in mind that those user properties will populate your database on the Marketing Automation platform to create rich scenarios. An example would be ** \"additionalProp\" : \"string\"**\n",
            "additionalProperties": {
              "type": "string"
            }
          },
          "eventdata": {
            "type": "object",
            "description": "This object will contain all additional data you want to pass. It has three file ids' of type string with a unique number and data which can be later parametrised in a smtp template. An example would be **\"eventdata\": { \"data\" : { \"added_product\":[{ \"currency\": \"EUR\", \"name\": \"Wrist watch\", \"type\":\"accessories\", \"price\" : \"50.00\" }] } } **\n"
          }
        }
      },
      "400Model": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "invalid_parameter",
              "missing_parameter",
              "out_of_rangeModel"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "invalidParameter",
              "missingParameter",
              "outOfRangeModel"
            ]
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 145,
      "2": 150,
      "3": 105,
      "4": 102,
      "5": 190,
      "6": 203,
      "7": 0,
      "8": 11,
      "9": 120,
      "10": 66,
      "11": 63
    }
  }
}
```