# Reducing response sizes with field selection

Source: https://developer.nylas.com/docs/dev-guide/platform/field-selection/

Nylas supports field selection, which allows you to choose which fields are returned in API responses and [notifications](/docs/v3/notifications/). Instead of sending all available fields, Nylas sends only the data you specify. This helps protect sensitive information, improves performance, and prevents timeouts and [rate limiting](/docs/dev-guide/platform/rate-limits/).

You can implement field selection at any of the following levels:

- **Application level for API responses**: Applies to all responses to [Messages](/docs/reference/api/messages/) or [Events](/docs/reference/api/events/) requests.
- **Application level for webhook notifications**: Applies to all [Message](/docs/reference/notifications/#message-notifications) or [Event](/docs/reference/notifications/#event-notifications) webhook notifications.
- **Request level**: Applies to the request in which you define the [`select` query parameter](#reduce-response-size-with-field-selection).

If you use both application-level and request-level field selection for a request, Nylas returns the _intersection_ of your selections. This means you receive only the fields specified at both the application and request level.

## Enable application-level field selection for responses

> **Hint:** 
> **[**Contact the Nylas Sales team**](https://www.nylas.com/contact-sales/?utm_source=docs&utm_content=field-selection) to enable field selection for your application**. After we configure your settings, Nylas starts returning only the specified fields for the affected endpoints.

## Enable application-level field selection for webhooks

1. Log in to the [Nylas Dashboard](https://dashboard-v3.nylas.com/?utm_source=docs&utm_content=field-selection).
2. Select **Customizations** in the left navigation.
3. Toggle either **Email message field selection for notifications** or **Calendar event field selection for notifications** on.
4. Select the fields you want to include in Nylas' responses.
5. **Save** your changes.

After you save your field selection settings, Nylas starts sending `*.transformed` notifications for the affected trigger types. For more information, see [Using webhooks with Nylas](/docs/v3/notifications/?redirect=reorg#specify-fields-for-webhook-notifications).

## Enable request-level field selection

You can specify the fields you want Nylas to return for individual API requests by including the [`select` query parameter](#reduce-response-size-with-field-selection).

```bash {2} [filter-Get all Messages request]
curl --request GET \
  --url "https://api.us.nylas.com/v3/grants/<NYLAS_GRANT_ID>/messages?limit=5&select=id,subject,from,to" \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>' \
  --header 'Content-Type: application/json'
```

```bash {2} [filter-Get all Events request]
curl --request GET \
  --url 'https://api.us.nylas.com/v3/grants/<NYLAS_GRANT_ID>/events?calendar_id=<CALENDAR_ID>&select=id,title,when,location' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>' \
  --header 'Content-Type: application/json'
```