> ## Documentation Index
> Fetch the complete documentation index at: https://help.getvero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Track

> This endpoint tracks an event for a specific user. If the user profile doesn't exist Vero will create it.

<Note>
  **Deduplication**: We will automatically deduplicate events that are sent to our API with the same `event_name`, the same properties and that are tracked against the same user `id` within a five (5) minute window. This is designed to solve issues related to Javascript event handling and retries. You can force Vero to ignore deduplication and track every event by including a property within `data` with a unique timestamp. This will ensure the event is not seen by the Vero system as a duplicate due to the unique data.

  Variables on which duplication is based:

  1. If you provide `data`, then the combination of `auth_token`, `event_name`, `identifier` and `data` is used.
  2. If there is no `data` and you have provided a `check_id`, then the combination of `auth_token`, `event_name`, `identifier` and `check_id` is used.
  3. If you have provided neither `data` or `check_id` then the combination of `auth_token`, `event_name` and `identifier` is used.
</Note>


## OpenAPI

````yaml /api-reference/track/track.yml post /events/track
openapi: 3.0.3
info:
  title: Vero Track REST API
  description: >
    ## Introduction


    This documentation is for v2.0 of Vero's Track REST API. The URLs listed in
    this documentation are relative to `https://api.getvero.com/api/v2`.


    This API is very stable. v2.0 was released prior to 2016 and there have been
    no breaking changes since that time.


    ---


    ### Sending data with requests


    Unless otherwise specified, request data should be passed to the API as JSON
    objects via `POST`. The documentation for each API endpoint contains details
    of the parameters accepted by that endpoint.


    ---


    ### Supported ingest integrations


    The majority of our customers use tools like
    [Segment](https://www.getvero.com/integrations/segment-source/) or
    [Rudderstack](https://www.getvero.com/integrations/rudderstack/) to track
    and send data to Vero Cloud.


    See the full list of [Integrations](https://www.getvero.com/integrations/)
    for integrations that support this API. Use the "Data In: API" filter.


    ---


    ### Our SDKs


    Refer to our [Developer Guide](https://developers.getvero.com/) for more
    information on available SDKs.


    ---


    ### Questions or problems


    Have questions or can't get something to work? Get in touch via
    [support@getvero.com](mailto:support@getvero.com).


    ---


    ## Authentication


    Authentication against the Vero API is done using a valid Authentication
    Token. Authentication Tokens should be kept secret. They have the power to
    write data to your account and, in the future, will have the ability to read
    data too.


    To generate and access API credentials visit
    [Settings](https://app.getvero.com/settings/project) in your Vero account.


    Requests are authenticated by providing a parameter called `auth_token` with
    each request. This parameter must contain a valid and active Authentication
    Token.


    All API requests must be made over HTTPS. Calls made over plain HTTP will
    fail.


    ---


    ## Errors


    Vero uses conventional HTTP response codes to indicate the success or
    failure of an API request.


    Codes in the  `2xx`  range mean success, codes in the  `4xx`  mean there was
    an error in the data passed to Vero's API (such as missing parameters) and
    codes in the  `5xx`  range indicate an error with Vero's endpoint.


    |  Code|Description  |

    |--|--|

    |  **200 - OK**|  The request was successful|

    |  **400 - Bad request**|  Bad request|

    |  **401 - Unauthorized**|  Your credentials are invalid|

    |  **404 - Not Found**|  The resource doesn't exist|

    |  **50X - Internal Server Error**|  An error occurred with our API|
  version: 2.0.0
servers:
  - url: https://api.getvero.com/api/v2
security: []
tags:
  - name: Users
    description: >
      The `users` endpoint lets you create, update and manage the subscription
      status of your User records.
  - name: Tags
    description: >
      The `tags`` endpoint lets you add or remove tags to or from any of your
      Users.
  - name: Events
    description: |
      The `events` endpoint lets you track events based on actions a User takes.
paths:
  /events/track:
    post:
      tags:
        - Events
      summary: Track
      description: >-
        This endpoint tracks an event for a specific user. If the user profile
        doesn't exist Vero will create it.
      operationId: track
      requestBody:
        $ref: '#/components/requestBodies/Event'
      responses:
        '200':
          $ref: '#/components/responses/Success'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - api_key: []
components:
  requestBodies:
    Event:
      content:
        application/json:
          schema:
            properties:
              identity:
                type: object
                description: >-
                  A valid JSON hash containing the keys id and email used to
                  identify the user for which the event is being tracked. Both
                  email and id must be less than 255 characters and email must
                  be a valid email address.
                properties:
                  id:
                    type: string
                    description: The unique identifier of the customer.
                    example: 1000
                  email:
                    type: string
                    description: The email of the customer.
                    example: test@example.com
              event_name:
                type: string
                description: >
                  The name of the event tracked. Must be less than 255
                  characters. Capitalized and lowercase letters and spaces and
                  underscores will be treated the same by Vero's API. For
                  example, `Purchased Item`, `purchased item`, and
                  `purchased_item` will all be matched as one event in Vero's
                  backend.
                example: Viewed product
              data:
                type: object
                description: >-
                  A valid JSON hash containing key value pairs that represent
                  the custom user properties you want to track with the event.
                  All keys are freeform and can be defined by you.
                example:
                  product_name: Red T-shirt
                  product_url: http://www.yourdomain.com/products/red-t-shirt
                additionalProperties:
                  type: string
              extras:
                type: object
                description: >-
                  A valid JSON hash containing key/value pairs that represent
                  the reserved, Vero-specific `created_at` and `source`
                  properties. Refer to the note on "deduplication" above.
                properties:
                  source:
                    type: string
                    example: Segment.com
                  created_at:
                    type: string
                    example: 2023-05-30T04:46:31+0000
  responses:
    Success:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                format: int32
                example: 200
              message:
                type: string
                example: Success.
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                format: int32
                example: 400
              message:
                type: string
                example: Bad Request
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                format: int32
                example: 401
              message:
                type: string
                example: >-
                  Invalid authentication: You must provide a valid auth_token to
                  access this resource.
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                format: int32
                example: 404
              message:
                type: string
                example: The resource doesn't exist
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                format: int32
                example: 500
              message:
                type: string
                example: An error occurred with our API
  securitySchemes:
    api_key:
      type: apiKey
      name: auth_token
      in: query

````