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

# Exporting data

> Export message, subscription, and audience activity data from OneSignal using dashboard CSVs, REST API endpoints, and Event Streams.

## Overview

You can export data from OneSignal using any of the following methods:

* **Dashboard CSV exports** — Download Subscriptions and Sent Messages as CSVs from the **Audience** and **Delivery** pages.
* **REST API endpoints** — Export Subscription data, message reports, and per-user audience activity programmatically.
* **[Event Streams](./event-streams)** — Stream message events to your own destination in real time.
* **[Integrations](./integrations)** — Forward data to third-party tools like Segment, Mixpanel, and Amplitude.

### Data retention

* **User and Subscription data:**
  * **Paid plans:** Available for the lifetime of the app.
  * **Free plans:** Automatically deleted after 18 months of inactivity.
* **Dashboard-sent messages:** Available for the lifetime of the app.
* **API-sent messages:** Available for approximately 30 days from when they were sent.
* **Audience activity:** Available for approximately 30 days from when the related message was sent.
* **Journey-sent messages:** Downloadable from the dashboard. See [Journey analytics](./journeys-analytics).

***

## Export message data

To stream real-time message events to your own destination, use [Event Streams](./event-streams).

<Tabs>
  <Tab title="Dashboard">
    **Bulk export** push, email, SMS, and Live Activity messages from the **Delivery > Sent Messages** page.

    Available filters:

    * **Source:** Dashboard, API, Automated, or Test Messages.
    * **Device type:** Push, In-App, Email, SMS, or Live Activity.
    * **Text search:** Search by message content, heading, and name. Only available when **Source** is set to **Dashboard Messages**.
    * **Start date and end date:** Filters messages by their **Sent At** date in your current timezone.

    **Per-message reports** are available when viewing an individual message in the dashboard. See the channel-specific guide for export details:

    * [Push message reports](./push-notification-message-reports)
    * [In-app message reports](./in-app-message-reports)
    * [Email message reports](./email-message-reports)
    * [SMS message reports](./sms-message-reports)
    * [Live Activity message reports](./live-activities#message-reports)
  </Tab>

  <Tab title="API">
    You can export message data via our REST API using the following endpoints:

    * [View message](/reference/view-message): Fetch data for a single message using its `id`.
    * [View messages](/reference/view-messages): Retrieve a paginated list (up to 50 per page).
    * [Export audience activity CSV](/reference/export-csv-of-events): Per-user event CSV including sent, open, and click data.
  </Tab>
</Tabs>

***

## Export subscription data

OneSignal exports **Subscription records** (push tokens, email addresses, and phone numbers), not Users. A user without any attached Subscription will not appear in these exports. To retrieve individual users, use the [View user API](/reference/view-user). See [Users](./users) and [Subscriptions](./subscriptions) for the distinction.

<Tabs>
  <Tab title="Dashboard">
    1. Go to **Audience > Subscriptions**.
    2. Optionally filter by segment.
    3. Use the column picker to select the fields you want in the export.
    4. Click **Export**.
  </Tab>

  <Tab title="API">
    You can export user and subscription data via our REST API using the following endpoints:

    * [CSV export](/reference/csv-export): Returns a download link to a CSV of Subscription records with their current `notification_types` status and channel-specific fields. Supports segment, last-active, and unsubscribed-state filters.
    * [View user](/reference/view-user): Retrieve the current state of a single user, identified by `alias_label` and `alias_id`. Use this when you have a known user identifier rather than a bulk-export need.
  </Tab>
</Tabs>
