# List all data events

`GET /events`

> This is a subset of the full specification, limited to the `GET /events` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.15/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `GET /events` operation.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: Data Events
    description: Everything about your Data Events
paths:
  /events:
    get:
      summary: List all data events
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
        - in: query
          name: filter
          required: true
          style: form
          explode: true
          schema:
            type: object
            oneOf:
              - title: user_id query parameter
                properties:
                  user_id:
                    type: string
                required:
                  - user_id
                additionalProperties: false
              - title: intercom_user_id query parameter
                properties:
                  intercom_user_id:
                    type: string
                required:
                  - intercom_user_id
                additionalProperties: false
              - title: email query parameter
                properties:
                  email:
                    type: string
                required:
                  - email
                additionalProperties: false
        - name: type
          in: query
          required: true
          description: The value must be user
          schema:
            type: string
        - name: summary
          in: query
          required: false
          description: summary flag
          schema:
            type: boolean
      tags:
        - Data Events
      operationId: lisDataEvents
      description: |

        > 🚧
        >
        > Please note that you can only 'list' events that are less than 90 days old. Event counts and summaries will still include your events older than 90 days but you cannot 'list' these events individually if they are older than 90 days

        The events belonging to a customer can be listed by sending a GET request to `https://api.intercom.io/events` with a user or lead identifier along with a `type` parameter. The identifier parameter can be one of `user_id`, `email` or `intercom_user_id`. The `type` parameter value must be `user`.

        - `https://api.intercom.io/events?type=user&user_id={user_id}`
        - `https://api.intercom.io/events?type=user&email={email}`
        - `https://api.intercom.io/events?type=user&intercom_user_id={id}` (this call can be used to list leads)

        The `email` parameter value should be [url encoded](http://en.wikipedia.org/wiki/Percent-encoding) when sending.

        You can optionally define the result page size as well with the `per_page` parameter.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              examples:
                Successful response:
                  value:
                    type: event.summary
                    events: []
                    pages:
                      next: http://api.intercom.test/events?next page
                    email: user26@email.com
                    intercom_user_id: 6762f22b1bb69f9f2193bc12
                    user_id: 3ecf64d0-9ed1-4e9f-88e1-da7d6e6782f3
              schema:
                $ref: '#/components/schemas/data_event_summary'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: e6f50446-be4a-40ac-8c8d-6fb91e1040fd
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    data_event_summary:
      title: Data Event Summary
      type: object
      description: This will return a summary of data events for the App.
      properties:
        type:
          type: string
          description: The type of the object
          enum:
            - event.summary
          example: event.summary
        email:
          type: string
          description: The email address of the user
          example: Sam.Sung@example.com
        intercom_user_id:
          type: string
          description: The Intercom user ID of the user
          example: 63a0979a5eeebeaf28dd56ba
        user_id:
          type: string
          description: The user ID of the user
          example: 62b997f288e14803c5006932
        events:
          type: array
          description: A summary of data events
          items:
            $ref: '#/components/schemas/data_event_summary_item'
    data_event_summary_item:
      title: Data Event Summary Item
      type: object
      description: This will return a summary of a data event for the App.
      nullable: true
      properties:
        name:
          type: string
          description: The name of the event
          example: placed-order
        first:
          type: string
          description: The first time the event was sent
          example: '2014-01-16T23:12:21.000+00:00'
        last:
          type: string
          description: The last time the event was sent
          example: '2014-01-16T23:12:21.000+00:00 '
        count:
          type: integer
          description: The number of times the event was sent
          example: 1
        description:
          type: string
          description: The description of the event
          example: A user placed an order
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              field:
                type: string
                nullable: true
                description: Optional. Used to identify a particular field or query parameter that was in error.
                example: email
            required:
              - code
      required:
        - type
        - errors
    intercom_version:
      description: Intercom API version.</br>By default, it's equal to the version set in the app package.
      type: string
      example: '2.15'
      default: '2.15'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - '2.12'
        - '2.13'
        - '2.14'
        - '2.15'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
