Returns an array of templates from an app.
Overview
This endpoint retrieves a list of existing templates associated with a specific app. It only provides the template ID, the template's name, when it was created, and the last time it was updated. It doesn't provide all the properties used for each template.
To retrieve the actual template data, this is only provided through the View template API.
How to use this API
This API's response returns up to 50 templates per request. To navigate through additional templates, use the offset parameter for pagination to retrieve subsequent groups of templates, if more are available.
If you have 125 templates for example, you would call this API 3 times. Using the default 50 limit (you can just omit this property), offset
the first request by 0
to get the first 50 templates, the 2nd request by 50
to get the next 50 templates (totaling 100 templates), and the 3rd request by 50
to get the last 25 templates (total 125 templates).
Examples
Get the first page of templates
curl --location 'https://api.onesignal.com/templates?app_id=<APP ID>&limit=50&offset=0&channel=push' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \