# List send events

> **GET** `https://api.us.nylas.com/v3/activity/send`

Source: https://developer.nylas.com/docs/reference/api/send-events/list-send-events/

Returns what happened to your messages, one event per recipient: accepted, delivered, bounced,
marked as spam, or rejected. Filter by recipient, message, sender, or event type to find out why
a message didn't reach someone, or to list every hard bounce from a sending domain.

Covers transactional and Agent Account sends. Events are kept for 90 days, and the default window
is the last 7 days. Results are sorted by event time, newest first.

This endpoint is for looking back at events, not for real-time updates. Avoid polling it for new events. To act on each
delivery outcome as it happens, use [webhook notifications](/docs/v3/agent-accounts/monitor-delivery-engagement/#use-webhooks-for-real-time-events).

**Authentication:** NYLAS_API_KEY

## Parameters

### Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `event_type` | array | No | Return only these event types. Repeat the parameter to include more than one. |
| `bounce_class` | string, one of: `hard`, `soft`, `undetermined` | No | Return only bounces of this class. |
| `recipient` | string, maxLength: 320 | No | Return only events for this recipient email address. |
| `recipient_domain` | string, maxLength: 255 | No | Return only events for recipients at this domain. |
| `sending_domain` | string, maxLength: 255 | No | Return only data for messages sent from this domain. |
| `from` | string, maxLength: 320 | No | Return only events for messages sent from this email address. |
| `grant_id` | string, maxLength: 36 | No | Return only events for messages sent by this Agent Account grant. |
| `message_id` | string, maxLength: 512 | No | Return only events for this message. |
| `thread_id` | string, maxLength: 64 | No | Return only events for messages in this Agent Account thread. |
| `start` | integer, format: int64 | No | Return events at or after this time, as a Unix timestamp in seconds. Defaults to midnight UTC six days ago, so the default window covers the last 7 days. Activity is kept for 90 days, so an earlier value returns events from the last 90 days only. |
| `end` | integer, format: int64 | No | Return events at or before this time, as a Unix timestamp in seconds. Defaults to the time of the request. Must not be earlier than `start`. |
| `order` | string, one of: `desc`, `asc`, default: `"desc"` | No | The sort order of the results by event time. `desc` returns the newest events first. |
| `limit` | integer, max: 200, default: `50` | No | The maximum number of objects to return. See [Pagination](/docs/reference/api/#pagination) for more information. |
| `page_token` | string | No | An identifier that specifies which page of data to return. You can get this value from the `next_cursor` response field. See [Pagination](/docs/reference/api/#pagination) for more information. |

## Responses

### 200 - Success. Returns a page of send events.

- `request_id` (string) - The request ID.
- `data` (array)
  - `id` (string) - The ID of the event.
  - `event_type` (string, one of: `accepted`, `delivered`, `bounced`, `complaint`, `rejected`) - What happened. `accepted` means Nylas accepted the message for delivery. `delivered` means the
recipient's mail server accepted it. `bounced` means it wasn't delivered. `complaint` means the
recipient marked it as spam. `rejected` means Nylas didn't send it because of bad content.
  - `bounce_class` (string, one of: `hard`, `soft`, `undetermined`) - For a bounce, whether it's permanent (`hard`), temporary (`soft`), or unclassified
(`undetermined`). Stop sending to addresses that hard-bounce.
  - `timestamp` (integer, format: int64) - When the event happened, as a Unix timestamp in seconds.
  - `application_id` (string) - The ID of your Nylas application.
  - `grant_id` (string) - The Agent Account grant that sent the message. Empty for a transactional send.
  - `message_id` (string) - The ID of the message. For a transactional send, this is the message's `Message-ID` header.
  - `thread_id` (string) - The Agent Account thread the message belongs to. Empty for a transactional send.
  - `from` (string) - The email address the message was sent from.
  - `sending_domain` (string) - The domain the message was sent from.
  - `recipient` (string) - The recipient's email address.
  - `recipient_domain` (string) - The recipient's domain.
  - `subject` (string) - The message subject.
  - `reason` (string) - A short summary of why the event happened, such as the bounce subtype and status code, the
SMTP response for a delivery, or the feedback type for a complaint. Empty for `accepted`.
  - `detail` (object) - Delivery details reported by the recipient's mail server. Only the fields that apply to the event
are included.
    - `smtp_response` (string) - The SMTP response from the recipient's mail server.
    - `processing_time_ms` (integer) - How long delivery took, in milliseconds.
    - `reporting_mta` (string) - The mail server that reported the event.
    - `remote_mta_ip` (string) - The IP address of the recipient's mail server.
    - `bounce_type` (string) - The bounce type, such as `Permanent` or `Transient`.
    - `bounce_subtype` (string) - The bounce subtype, such as `General`, `NoEmail`, `MailboxFull`, or `Suppressed`. `Suppressed`
means the address is on a suppression list because of an earlier bounce or complaint.
    - `status` (string) - The enhanced SMTP status code.
    - `action` (string) - The delivery action the mail server reported.
    - `diagnostic_code` (string) - The diagnostic message from the recipient's mail server.
    - `feedback_type` (string) - For a complaint, the type of feedback the mailbox provider reported, such as `abuse`.
    - `complaint_subtype` (string) - For a complaint, the complaint subtype, if the provider reported one.
- `next_cursor` (string, nullable) - A cursor pointing to the next page of results for the request.

### 400 - Bad request. A query parameter or the request body isn't valid.

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.

### 401 - Unauthorized

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The error from the provider.

### 403 - Forbidden. These endpoints need your application's API key, not a grant access token.

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.

## Code samples

### cURL

```bash
curl --request GET \
  --url "https://api.us.nylas.com/v3/activity/send?recipient=leyah@example.org&event_type=bounced&limit=50" \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>'
```
