View in-app messages
curl --request GET \
--url https://api.onesignal.com/apps/{app_id}/in_app_messages \
--header 'Authorization: <authorization>'const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.onesignal.com/apps/{app_id}/in_app_messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.onesignal.com/apps/{app_id}/in_app_messages"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onesignal.com/apps/{app_id}/in_app_messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onesignal.com/apps/{app_id}/in_app_messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.onesignal.com/apps/{app_id}/in_app_messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://api.onesignal.com/apps/{app_id}/in_app_messages")
.header("Authorization", "<authorization>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.onesignal.com/apps/{app_id}/in_app_messages");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<authorization>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"success": true,
"payload": {
"items": [
{
"id": "2c5c6b7e-0f6d-4a5e-9a2b-1a2b3c4d5e6f",
"app_id": "YOUR_APP_ID",
"name": "Welcome offer",
"status": "active",
"enabled": true,
"is_active": true,
"start_time": "2026-11-01T00:00:00.000Z",
"end_time": null,
"created_at": "2026-10-30T18:21:07.512Z",
"created_source": "api",
"label_ids": []
}
],
"limit": 20,
"offset": 0,
"total_count": 1
}
}{
"errors": [
"Access denied. Please include an 'Authorization: ...' header with a valid API key (https://documentation.onesignal.com/docs/en/keys-and-ids#api-keys)."
]
}{
"errors": [
"API rate limit exceeded"
],
"limit": "API Per App"
}View in-app messages
Retrieve a paginated list of the in-app messages in an app, newest first, with each in-app message’s name, status, and schedule.
GET
/
apps
/
{app_id}
/
in_app_messages
View in-app messages
curl --request GET \
--url https://api.onesignal.com/apps/{app_id}/in_app_messages \
--header 'Authorization: <authorization>'const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.onesignal.com/apps/{app_id}/in_app_messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.onesignal.com/apps/{app_id}/in_app_messages"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onesignal.com/apps/{app_id}/in_app_messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onesignal.com/apps/{app_id}/in_app_messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.onesignal.com/apps/{app_id}/in_app_messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://api.onesignal.com/apps/{app_id}/in_app_messages")
.header("Authorization", "<authorization>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.onesignal.com/apps/{app_id}/in_app_messages");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<authorization>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"success": true,
"payload": {
"items": [
{
"id": "2c5c6b7e-0f6d-4a5e-9a2b-1a2b3c4d5e6f",
"app_id": "YOUR_APP_ID",
"name": "Welcome offer",
"status": "active",
"enabled": true,
"is_active": true,
"start_time": "2026-11-01T00:00:00.000Z",
"end_time": null,
"created_at": "2026-10-30T18:21:07.512Z",
"created_source": "api",
"label_ids": []
}
],
"limit": 20,
"offset": 0,
"total_count": 1
}
}{
"errors": [
"Access denied. Please include an 'Authorization: ...' header with a valid API key (https://documentation.onesignal.com/docs/en/keys-and-ids#api-keys)."
]
}{
"errors": [
"API rate limit exceeded"
],
"limit": "API Per App"
}Overview
Retrieve the in-app messages in an app. Each in-app message is returned in a summary representation with its identity, status, and schedule. Use this list to find an in-app messageid, then fetch View in-app message for the HTML, audience, and triggers.
How to use this API
Authenticate with your App API Key.GET /apps/{app_id}/in_app_messages?limit=20&offset=0
Pagination
In-app messages are returned newest first.- Set
limitto control page size. The default is20and the maximum is20. A larger value returns20, and so does a value below1. - Set
offsetto the number of in-app messages to skip. The default is0. - Compare
offsetplus the number of returneditemswithtotal_countto know when you have read every in-app message.
Response
A successful request returns200 OK. The list and its pagination fields are nested under payload.
| Field | Type | Description |
|---|---|---|
items | array | Summary objects, newest first. |
limit | integer | Page size applied to this response. |
offset | integer | Number of in-app messages skipped. |
total_count | integer | Total in-app messages in the app that this API can return. |
items has these fields:
| Field | Type | Description |
|---|---|---|
id | string | UUID of the in-app message. |
app_id | string | UUID of the app that owns the in-app message. |
name | string | Name shown in the dashboard. |
status | string | scheduled (enabled, before start_time), active, complete (past end_time), or disabled (paused or saved as a draft). |
enabled | boolean | false while the in-app message is paused or saved as a draft. |
is_active | boolean | true when the in-app message is enabled and inside its schedule. |
start_time | string | When the in-app message becomes eligible to display, in ISO 8601 format. |
end_time | string or null | When the in-app message stops displaying. null means no end. |
created_at | string | When the in-app message was created. |
created_source | string | api for in-app messages created through this API, otherwise dashboard. |
label_ids | array | Dashboard labels on the in-app message. Read-only. |
html, triggers, the audience, and the display settings. Any other key in a response is undocumented and can change.Headers
Your App API key with prefix Key. See Keys & IDs.
Path Parameters
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
Query Parameters
Was this page helpful?