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

# Retrieve Events

> Returns events regarding the status of your email.

 To learn more about the different event types, see our guide to [checking the email log in SendLayer](https://sendlayer.com/docs/checking-the-email-log/).



## OpenAPI

````yaml api-reference/sendlayer.json get /events
openapi: 3.0.3
info:
  title: SendLayer API
  version: 1.0.1
  description: >-
    Welcome to the SendLayer API! To learn how to access your SendLayer API key,
    check out our tutorial on <a
    href="https://sendlayer.com/docs/managing-api-keys/" title="Managing API
    Keys">managing API keys</a>. <br/><br/> For a quick introduction to sending
    emails, see our guide to <a
    href="https://sendlayer.com/docs/getting-started-with-the-sendlayer-api/"
    title="Getting Started With the SendLayer API">getting started with the
    SendLayer API</a>.<br/><br/><strong>Need help?</strong> <a
    href="https://sendlayer.com/contact/" title="SendLayer Support Page">Contact
    the SendLayer support team</a>
  contact:
    name: SendLayer Support
    url: https://sendlayer.com/contact
    email: support@sendlayer.com
servers:
  - url: https://console.sendlayer.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Email
    description: Operations related to email sending
  - name: Events
    description: Operations related to retrieving email events
  - name: Webhooks
    description: Operations related to creating and managing webhooks
paths:
  /events:
    parameters: []
    get:
      tags:
        - Events
      summary: Returns all logged email events
      description: |-
        Returns events regarding the status of your email.

         To learn more about the different event types, see our guide to [checking the email log in SendLayer](https://sendlayer.com/docs/checking-the-email-log/).
      parameters:
        - schema:
            type: number
            example: 1646901478
          in: query
          name: StartDate
          description: Unix Timestamp
        - schema:
            type: number
            example: 1646901480
          in: query
          name: EndDate
          description: Unix Timestamp
        - schema:
            type: string
            example: delivered
          in: query
          name: Event
          description: >-
            Name of event type (accepted, rejected, failed, delivered, opened,
            clicked, unsubscribed, complained)
        - schema:
            type: number
            minimum: 0
            example: 0
          in: query
          name: StartFrom
        - schema:
            type: number
            minimum: 1
            example: 20
          in: query
          name: RetrieveCount
        - schema:
            type: string
            example: 10210a3d-7d37-4967-9c20-ad4e26016a78
          in: query
          name: MessageID
      responses:
        '200':
          description: |-
            OK 

            A succesful response returns records for the logged email event(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetEventsResponse'
components:
  schemas:
    GetEventsResponse:
      title: GET events response
      type: object
      properties:
        TotalRecords:
          type: integer
          example: 1
        Events:
          type: array
          items:
            type: object
            properties:
              Event:
                type: string
                example: opened
              LoggedAt:
                type: integer
                example: 1658326035
              LogLevel:
                type: string
                example: info
              Message:
                type: object
                properties:
                  Headers:
                    type: object
                    properties:
                      MessageId:
                        type: string
                        example: 70e80563-4e08-4313-9b8b-ad56449bfbb6
                      From:
                        type: array
                        items:
                          type: string
                          example: paulie@example.com
                      ReplyTo:
                        type: array
                        items:
                          type: object
                          properties: {}
                      To:
                        type: array
                        items:
                          type: string
                          example: Pattie Paloma, pattie@exampledomain.com
                      Cc:
                        type: array
                        items:
                          type: object
                          properties: {}
                      Bcc:
                        type: array
                        items:
                          type: object
                          properties: {}
                      Subject:
                        type: string
              Reason:
                type: string
                example: Email opened.
              Ip:
                type: string
                example: 10.30.126.18
              Geolocation:
                type: object
                properties:
                  City:
                    type: string
                  Region:
                    type: string
                  Country:
                    type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````