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

# Track contact events

> Track events for a contact (drives outbound messaging and workflows).



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /s2s/contacts/{userId}/events
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /s2s/contacts/{userId}/events:
    post:
      tags:
        - S2S Contacts
      summary: Track contact events
      description: Track events for a contact (drives outbound messaging and workflows).
      operationId: TrackEvents
      parameters:
        - in: path
          name: userId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/S2STrackEventsBody'
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                properties:
                  received:
                    type: number
                    format: double
                required:
                  - received
                type: object
      security:
        - s2s: []
components:
  schemas:
    S2STrackEventsBody:
      properties:
        events:
          items:
            $ref: '#/components/schemas/S2STrackEventItem'
          type: array
      required:
        - events
      type: object
      additionalProperties: false
    S2STrackEventItem:
      properties:
        name:
          type: string
        date:
          type: string
          description: ISO timestamp; defaults to now.
        data:
          $ref: '#/components/schemas/Record_string.unknown_'
      required:
        - name
      type: object
      additionalProperties: false
    Record_string.unknown_:
      properties: {}
      type: object
      description: Construct a type with a set of properties K of type T
  securitySchemes:
    s2s:
      type: http
      scheme: bearer
      bearerFormat: Service account token (JWT)

````