View templates
Retrieve a paginated list of message templates from your OneSignal app. This endpoint returns summary information for each template, including ID, name, creation, and update timestamps.
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:
-
First request (first 50 templates):
GET /templates?app_id={app_id}&offset=0
-
Second request (next 50 templates):
GET /templates?app_id={app_id}&offset=50
-
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.
Query Parameters
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
The maximum number of templates returned per request. The default (if omitted) and maximum is 50 templates per request.
The pagination or "starting point" of the templates to be returned. Setting it to 0 with a limit of 50 will retrieve the first 50 templates. Increasing the offset by 50 will return the next set of templates, and so on.
Filter the fetched templates by the delivery channel. Available options are: push
, email
, and SMS
.
push
, email
, sms
Response
200
The response is of type object
.