# Events

Behavioral events are automatically recorded by our application, so because of this the only endpoints that are available are a list of endpoints, and the ability to retrieve a single event by UUID.

This is intended to be used with our [Webhooks system](https://docs.mavenseed.com/developers/webhooks) in case you need to look up an event that was sent to gather additional information.

## All Events

<mark style="color:blue;">`GET`</mark> `https://yoursite.mavenseed.com/api/v1/events`

Retrieve all customers

#### Path Parameters

| Name | Type    | Description            |
| ---- | ------- | ---------------------- |
| page | integer | Results are paginated. |

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | Auth token  |

{% tabs %}
{% tab title="200 Returns an array of events. Only the first 20 are returned. Passing the page param will paginate the results." %}

```javascript
[
    {
        "uuid": "b9df9764-c921-43a8-ada4-a9fa25058895",
        "name": "viewed_download",
        "customer_id": null,
        "eventable_type": "Download",
        "eventable_id": 97,
        "event_data": {},
        "referrer": "http://playbook-thirty-nine.lvh.me:3000/",
        "utm_campaign": null,
        "utm_content": null,
        "utm_source": null,
        "utm_term": null,
        "utm_medium": null,
        "device": null,
        "country": null,
        "region": null,
        "city": null,
        "browser": "127.0.0.1",
        "created_at": "2020-03-24T13:13:14.734-04:00",
        "updated_at": "2020-03-24T13:13:14.734-04:00",
        "webhook_delivered": false,
        "attempts": 0
    },
    {
        "uuid": "4cd8c2b3-9ed8-4805-b561-1bf898bf3faf",
        "name": "viewed_download",
        "customer_id": null,
        "eventable_type": "Download",
        "eventable_id": 97,
        "event_data": {},
        "referrer": "http://playbook-thirty-nine.lvh.me:3000/downloads/book",
        "utm_campaign": null,
        "utm_content": null,
        "utm_source": null,
        "utm_term": null,
        "utm_medium": null,
        "device": null,
        "country": null,
        "region": null,
        "city": null,
        "browser": "127.0.0.1",
        "created_at": "2020-03-24T13:13:15.079-04:00",
        "updated_at": "2020-03-24T13:13:15.079-04:00",
        "webhook_delivered": false,
        "attempts": 0
    }
]
```

{% endtab %}
{% endtabs %}

## Show Event

<mark style="color:blue;">`GET`</mark> `https://yoursite.mavenseed.com/api/v1/events/:id`

Retrieve a single event by UUID.

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | Auth token  |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "uuid": "b9df9764-c921-43a8-ada4-a9fa25058895",
  "name": "viewed_download",
  "customer_id": null,
  "eventable_type": "Download",
  "eventable_id": 97,
  "event_data": {},
  "referrer": "http://playbook-thirty-nine.lvh.me:3000/",
  "utm_campaign": null,
  "utm_content": null,
  "utm_source": null,
  "utm_term": null,
  "utm_medium": null,
  "device": null,
  "country": null,
  "region": null,
  "city": null,
  "browser": "127.0.0.1",
  "created_at": "2020-03-24T13:13:14.734-04:00",
  "updated_at": "2020-03-24T13:13:14.734-04:00",
  "webhook_delivered": false,
  "attempts": 0
}
```

{% endtab %}

{% tab title="404 " %}

```ruby
null
```

{% endtab %}
{% endtabs %}
