---
title: "Opt-in report"
method: GET
path: "/api/reports/optins"
tags: ["Reports"]
---

# Opt-in report

`GET /api/reports/optins`

## Request

- Base URL: `https://go.urbanairship.com`
- URL: `https://go.urbanairship.com/api/reports/optins`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
  - OAuth 2
    - Client credentials
    - Token URL: `http://oauth2.{domain}.com/token` scopes: `rpt`
- TypeScript: <https://skmtc.dev/airship/apis/airship-api/docs/api/reports/optins/get.ts> (a function with typed inputs; its response is checked against the schema)

Get the number of opted-in Push users who access the app within the specified time period.

## Query parameters

- `start` string, date-time, required
- `end` string, date-time, required
- `precision` 'HOURLY' | 'DAILY' | 'MONTHLY', required

## Response `200`

Returned on success, with the JSON representation of the opt-ins in the body of the response.

- object: The response body for opt-in report.
  - `next_page` string, url: There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results.
  - `optins` object[]: An array of OptIn objects.
    - `android` integer: The number of users who opt-in for Android.
    - `date` string, date-time: The [date-time](/developer/rest-api/ua/introduction/#date-time-format) of when the users opt-in.
    - `ios` integer: The number of users who opt-in for iOS.

## Other responses

- `400`: There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.
- `401`: Authentication information (the app key and secret or bearer token) was either incorrect or missing.
- `403`: Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

## Changes

- **2025-08-28** `3304568aaadc`: 3 breaking
  - the `query` request parameter `precision` became required
  - for the `query` request parameter `end`, the format changed from no format to `date-time`
  - for the `query` request parameter `start`, the format changed from no format to `date-time`
  - …this revision’s changelog is incomplete

[Operation history](https://skmtc.dev/airship/apis/airship-api/changes/api/reports/optins/get.md)

---

[API](https://skmtc.dev/airship/apis/airship-api.md) - [All operations](https://skmtc.dev/airship/apis/airship-api/llms.txt) - [OpenAPI document](https://skmtc.dev/airship/apis/airship-api/revisions/bd6ab947117a?raw)
