> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.jp/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Events HTTP API

> Trigger a custom behavioral event using an HTTP GET request. Event completions can be tracked in HubSpot and used to segment contacts, score leads, and more. If you have an EU portal you must use the tracking server track-eu1.hubspot.com.

<Note>
  If you have an EU portal you must use the tracking server `track-eu1.hubspot.com`.
</Note>

<Warning>
  All symbols in a contact's email address must be [encoded](https://www.w3schools.com/tags/ref_urlencode.ASP), except for the following:

  * `@` symbol
  * hyphen `-`
  * underscore `_`
  * period `.`
</Warning>

## Response details

If the request is successful, it will have a status code of 200 with no data in the body. The content-type will be `image/gif`, so it's possible to use HTTP API urls with `<img>` tags, though we recommend using the [JavaScript API](/api-reference/latest/account/settings/tracking-code/overview) on webpages when possible.

## Example URL

```
https://track.hubspot.com/v1/event?_n=000000001625&_a=62515&email=testingapis@hubspot.com
```


## OpenAPI

````yaml specs/legacy/v1/marketing-events-tracking-v1.json GET /v1/event
openapi: 3.0.0
info:
  title: Marketing Events Tracking API
  version: 1.0.0
  description: >-
    If you have a Marketing Hub Enterprise account, use this API to trigger a
    custom behavioral event using an HTTP GET request. Event completions can be
    tracked in HubSpot and used to segment contacts, score leads, and more.
servers:
  - url: https://track.hubspot.com
    description: HubSpot Marketing Events Tracking Server
  - url: https://track-eu1.hubspot.com
    description: HubSpot Marketing Events Tracking Server (EU)
security: []
paths:
  /v1/event:
    get:
      summary: Events HTTP API
      description: >-
        Trigger a custom behavioral event using an HTTP GET request. Event
        completions can be tracked in HubSpot and used to segment contacts,
        score leads, and more. If you have an EU portal you must use the
        tracking server track-eu1.hubspot.com.
      operationId: triggerEvent
      parameters:
        - name: _a
          in: query
          required: true
          description: Your HubSpot Hub ID. See this page for help finding your Hub ID.
          schema:
            type: string
        - name: _n
          in: query
          required: true
          description: The ID or name of the event you want to trigger.
          schema:
            type: string
        - name: email
          in: query
          required: false
          description: >-
            Associates the event with a known HubSpot contact. If the contact
            doesn't yet exist in HubSpot, it will be created. All symbols in a
            contact's email address must be encoded, except for the @ symbol,
            hyphen (-), underscore (_), and period (.).
          schema:
            type: string
            format: email
        - name: _m
          in: query
          required: false
          description: >-
            Any numerical amount that you provide here will increment the
            contact's Revenue field within the Web Analytics History section.
          schema:
            type: number
        - name: id
          in: query
          required: false
          description: >-
            Ties the event to a record based on an external ID (not the HubSpot
            contact's ID). Unlike email, including this id will not
            automatically create a contact record.
          schema:
            type: string
      responses:
        '200':
          description: >-
            Event triggered successfully. The content-type will be image/gif, so
            it's possible to use HTTP API urls with img tags.
          content:
            image/gif:
              schema:
                type: string
                format: binary
              example: >-
                https://track.hubspot.com/v1/event?_n=000000001625&_a=62515&email=testingapis@hubspot.com
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        status:
          type: string
          description: HTTP status code
        message:
          type: string
          description: Error message
        correlationId:
          type: string
          description: Request correlation ID for debugging

````