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

# List activity events

> Retrieves activity events for messages, including delivery status, opens, clicks, bounces, unsubscribes and complaints.



## OpenAPI

````yaml /openapi.json get /activity/events
openapi: 3.1.0
info:
  description: Helo API
  version: 1.0.0-beta.1
  title: Helo API
servers:
  - url: https://api.helohq.com
security: []
tags:
  - name: Activity
    description: >-
      Track and retrieve message activity, including messages, delivery and
      engagement events.
  - name: Broadcasts
    description: Manage and track broadcast email campaigns.
  - name: Channels
    description: Create and manage communication channels for organizing messages.
  - name: Domains
    description: Register, verify, and manage domains for email sending.
  - name: Sending
    description: Send transactional and broadcast emails.
  - name: Statistics
    description: Access activity statistics.
  - name: Webhooks
    description: Create and manage webhooks for event notifications.
paths:
  /activity/events:
    get:
      tags:
        - Activity
      summary: List activity events
      description: >-
        Retrieves activity events for messages, including delivery status,
        opens, clicks, bounces, unsubscribes and complaints.
      operationId: Activity_listEvents
      parameters:
        - name: channelId
          in: query
          required: false
          schema:
            type: string
            format: uuid
        - name: messageId
          in: query
          required: false
          schema:
            type: string
            format: uuid
        - name: after
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: startDate
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: endDate
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
        - name: recipient
          in: query
          required: false
          schema:
            type: string
        - name: subject
          in: query
          required: false
          schema:
            type: string
        - name: tags
          in: query
          required: false
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: mailType
          in: query
          required: false
          schema:
            type: string
            enum:
              - transactional
              - broadcast
        - name: eventTypes
          in: query
          required: false
          explode: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/EventType'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedEventsResponse'
        '401':
          description: Unauthorized
          content:
            application/json: {}
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: ruby
          source: |-
            Helo.configure do |config|
              config.api_key = ENV.fetch("HELO_API_KEY")
            end

            opts = {
              channel_id: "550e8400-e29b-41d4-a716-446655440000",
              message_id: "550e8400-e29b-41d4-a716-446655440000",
              after: 10,
              start_date: "2024-01-01T00:00:00Z",
              end_date: "2024-01-01T00:00:00Z",
              limit: 10,
              recipient: "example",
              subject: "example",
              tags: ["example1", "example2"],
              mail_type: "transactional",
              event_types: ["accepted", "processed"]
            }
            Helo::Activity.list_events(opts)
        - lang: javascript
          source: |-
            import Helo from "@helo-email/sdk";

            const apiKey = process.env.HELO_API_KEY;
            const helo = new Helo(apiKey);

            const result = await helo.activity.listEvents({
              channelId: "550e8400-e29b-41d4-a716-446655440000",
              messageId: "550e8400-e29b-41d4-a716-446655440000",
              after: 10,
              startDate: "2024-01-01T00:00:00Z",
              endDate: "2024-01-01T00:00:00Z",
              limit: 10,
              recipient: "example",
              subject: "example",
              tags: ["example1", "example2"],
              mailType: "transactional",
              eventTypes: [Helo.EventType.ACCEPTED, Helo.EventType.PROCESSED],
            });
        - lang: go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/helo-email/helo-sdk-go\"\n)\n\nfunc main() {\n\tclient := helo.NewHelo(os.Getenv(\"HELO_API_KEY\"))\n\tctx := context.Background()\n\n\tparams := &helo.ActivityListEventsParams{\n\t\tChannelID: \"550e8400-e29b-41d4-a716-446655440000\",\n\t\tMessageID: \"550e8400-e29b-41d4-a716-446655440000\",\n\t\tAfter: 10,\n\t\tStartDate: time.Now(),\n\t\tEndDate: time.Now(),\n\t\tLimit: 10,\n\t\tRecipient: \"example\",\n\t\tSubject: \"example\",\n\t\tTags: []string{\"example1\", \"example2\"},\n\t\tMailType: \"transactional\",\n\t\tEventTypes: []helo.EventType{helo.EventTypeAccepted, helo.EventTypeProcessed},\n\t}\n\tresult, err := client.Activity.ListEvents(ctx, params)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t_ = result\n}"
        - lang: csharp
          source: |-
            using System;

            var events = await helo.Activity.ListEvents(
                startDate: DateTimeOffset.UtcNow.AddDays(-7),
                limit: 50);
        - lang: python
          source: >-
            import sdk_helo_email as helo


            client = helo.Helo()  # reads HELO_API_KEY from the environment


            events = client.activity.list_events(start_date="2024-01-01",
            limit=50)
components:
  schemas:
    EventType:
      type: string
      enum:
        - accepted
        - processed
        - delivered
        - bounced
        - opened
        - clicked
        - complained
        - unsubscribed
        - resubscribed
    PaginatedEventsResponse:
      type: object
      properties:
        after:
          type: integer
          format: int64
        totalCount:
          type: number
        results:
          type: array
          items:
            $ref: '#/components/schemas/ActivityEvent'
      required:
        - results
        - totalCount
    ErrorResponse:
      description: Standard error response body.
      type: object
      properties:
        type:
          description: A URI reference identifying the problem type.
          type: string
        title:
          description: Short, human-readable summary of the problem.
          type: string
        instance:
          description: URI reference identifying the specific occurrence of the problem.
          type: string
        status:
          description: HTTP status code.
          type: integer
          format: int32
        code:
          description: Application-specific error code.
          type: string
        detail:
          description: Human-readable explanation of this specific occurrence.
          type: string
        requestId:
          description: Unique request ID, useful for support correlation.
          type: string
        errors:
          description: Field-level validation errors, keyed by field name.
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/ValidationError'
    ActivityEvent:
      type: object
      properties:
        messageId:
          type: string
          format: uuid
        channelId:
          type: string
          format: uuid
        mailType:
          type: string
          enum:
            - transactional
            - broadcast
        mailSource:
          type: string
          enum:
            - api
            - smtp
        eventType:
          $ref: '#/components/schemas/EventType'
        timestamp:
          type: string
          format: date-time
        subject:
          type: string
        recipients:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
        metadata:
          type: object
        details:
          type: object
      required:
        - messageId
        - channelId
        - mailType
        - eventType
        - timestamp
        - subject
        - recipients
    ValidationError:
      description: A single field validation error.
      required:
        - message
      type: object
      properties:
        message:
          description: Description of the validation failure.
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````