View in-app message
curl --request GET \
--url https://api.onesignal.com/apps/{app_id}/in_app_messages/{id} \
--header 'Authorization: <authorization>'const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.onesignal.com/apps/{app_id}/in_app_messages/{id}', 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/{id}"
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/{id}",
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/{id}"
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/{id}")
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/{id}")
.header("Authorization", "<authorization>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.onesignal.com/apps/{app_id}/in_app_messages/{id}");
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": {
"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": [],
"display_duration": 0,
"redisplay_delay": null,
"redisplay_limit": null,
"included_segment_ids": [
"3c2b1a0f-9e8d-4c7b-a6f5-4e3d2c1b0a99"
],
"excluded_segment_ids": [],
"triggers": [
{
"id": "6a7b8c9d-0e1f-4a2b-9c3d-4e5f6a7b8c9d",
"conditions": [
{
"id": "0f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
"kind": "session_time",
"property": "",
"operator": "greater",
"value": 30
}
]
}
],
"html": "<!doctype html><html><body><h1>Welcome!</h1><p>20% off your first order.</p></body></html>"
}
}{
"success": false,
"errors": [
"In-App Message ID is invalid"
]
}{
"errors": [
"Access denied. Please include an 'Authorization: ...' header with a valid API key (https://documentation.onesignal.com/docs/en/keys-and-ids#api-keys)."
]
}{
"success": false,
"errors": [
"In-App Message not found"
]
}{
"errors": [
"API rate limit exceeded"
],
"limit": "API Per App"
}View in-app message
Retrieve a single in-app message by its UUID, including its HTML, schedule, audience, triggers, and redisplay settings.
GET
/
apps
/
{app_id}
/
in_app_messages
/
{id}
View in-app message
curl --request GET \
--url https://api.onesignal.com/apps/{app_id}/in_app_messages/{id} \
--header 'Authorization: <authorization>'const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.onesignal.com/apps/{app_id}/in_app_messages/{id}', 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/{id}"
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/{id}",
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/{id}"
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/{id}")
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/{id}")
.header("Authorization", "<authorization>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.onesignal.com/apps/{app_id}/in_app_messages/{id}");
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": {
"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": [],
"display_duration": 0,
"redisplay_delay": null,
"redisplay_limit": null,
"included_segment_ids": [
"3c2b1a0f-9e8d-4c7b-a6f5-4e3d2c1b0a99"
],
"excluded_segment_ids": [],
"triggers": [
{
"id": "6a7b8c9d-0e1f-4a2b-9c3d-4e5f6a7b8c9d",
"conditions": [
{
"id": "0f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
"kind": "session_time",
"property": "",
"operator": "greater",
"value": 30
}
]
}
],
"html": "<!doctype html><html><body><h1>Welcome!</h1><p>20% off your first order.</p></body></html>"
}
}{
"success": false,
"errors": [
"In-App Message ID is invalid"
]
}{
"errors": [
"Access denied. Please include an 'Authorization: ...' header with a valid API key (https://documentation.onesignal.com/docs/en/keys-and-ids#api-keys)."
]
}{
"success": false,
"errors": [
"In-App Message not found"
]
}{
"errors": [
"API rate limit exceeded"
],
"limit": "API Per App"
}Overview
Retrieve one in-app message by its UUID. The response is the full in-app message: its HTML, schedule, audience, triggers, and redisplay settings. Read an in-app message with this endpoint before you update it. Update in-app message replaces the whole in-app message, so you send back the stored values for anything you are not changing.How to use this API
Authenticate with your App API Key. Find an in-app message’sid from the View in-app messages API.
GET /apps/{app_id}/in_app_messages/{id}
Response
A successful request returns200 OK with the in-app message under payload.
| 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. |
display_duration | integer | Seconds the in-app message stays on screen. 0 keeps it until dismissed. |
redisplay_delay | integer or null | Seconds between showings to the same user. null with a null redisplay_limit means the in-app message shows once. |
redisplay_limit | integer or null | Maximum re-showings per user. 2147483647 means unlimited. |
included_segment_ids | array | UUIDs of the Segments the in-app message is shown to. |
excluded_segment_ids | array | UUIDs of the Segments the in-app message is never shown to. |
triggers | array | Trigger sets that decide when the in-app message shows. See Triggers. |
html | string or null | The in-app message’s HTML. For an in-app message with language variants, the HTML of its default language. For an in-app message built with the Block Editor, the rendered HTML of its default language. |
triggers carries an id. A custom condition returns its value as a string. A session_time or min_time_since condition returns its value as an integer.
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.
Was this page helpful?