Skip to main content
GET
/
templates?app_id=
{app_id}
&limit=
{limit}
&offset=
{offset}
View templates
curl --request GET \
  --url 'https://api.onesignal.com/templates?app_id={app_id}&limit={limit}&offset={offset}' \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>'
"{\n    \"limit\": 50,\n    \"offset\": 0,\n    \"templates\": [\n        {\n            \"id\": \"9e778dd4-6453-40d7-888d-9d9f327b9b66\",\n            \"name\": \"OneSignal Push: New Feature Announcement (Template)\",\n            \"created_at\": \"2021-07-23T18:02:23.956Z\",\n            \"updated_at\": \"2021-07-23T18:02:23.956Z\"\n        },\n        {\n            \"id\": \"806b4356-67af-4d33-8133-75e502f6d3b7\",\n            \"name\": \"OneSignal Push: User Action Notification (Template)\",\n            \"created_at\": \"2021-07-23T18:02:23.963Z\",\n            \"updated_at\": \"2021-07-23T18:02:23.963Z\"\n        },\n        {\n            \"id\": \"172f55b5-df07-49ae-8a8d-67037679487f\",\n            \"name\": \"OneSignal Push: Rating (Template)\",\n            \"created_at\": \"2021-07-23T18:02:23.984Z\",\n            \"updated_at\": \"2021-07-23T18:02:23.984Z\"\n        }\n    ],\n    \"total_count\": 3\n}"

Overview

Use this endpoint to retrieve a list of message templates associated with a specific OneSignal app. The response provides summary information only:
  • template_id
  • name
  • created_at
  • updated_at
This endpoint does not return full template content such as message bodies, channel properties, or delivery configuration. For detailed template data, use the View Template endpoint.

How to Use This API

Required Parameters

  • app_id (query param): The OneSignal App ID whose templates you want to retrieve.

Optional Parameters

  • limit (query param): Number of templates to return (default: 50, maximum: 50).
  • offset (query param): Number of templates to skip. Use for pagination.

Pagination Example

If your app has 125 templates and you’re using the default limit of 50:
  1. First request (first 50 templates):
    GET /templates?app_id={app_id}&offset=0
  2. Second request (next 50 templates):
    GET /templates?app_id={app_id}&offset=50
  3. Third request (final 25 templates):
    GET /templates?app_id={app_id}&offset=100
Repeat the request while adjusting the offset until you’ve retrieved all templates.

Headers

Authorization
string
default:Key YOUR_APP_API_KEY
required
Content-Type
string
default:application/json; charset=utf-8
required

Query Parameters

app_id
string
default:YOUR_APP_ID
required
limit
integer
default:50
offset
integer
default:0
channel
enum<string>
Available options:
push,
email,
sms

Response

limit
integer
default:0
Example:
offset
integer
default:0
Example:
templates
object[]
total_count
integer
default:0
Example: