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.
Documentation Index
Fetch the complete documentation index at: https://documentation.onesignal.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Use this endpoint to retrieve a list of message templates associated with a specific OneSignal app. The response provides summary information only:template_idnamecreated_atupdated_at
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
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