Skip to main content
GET
cURL

Overview

This endpoint returns metadata and content for a single template, including:
  • Template body/content
  • Target delivery channel (e.g., push, email, SMS)
  • Creation and last updated timestamps
This is useful for inspecting existing templates before using or updating them.
See Templates for more information.

How to use this API

Required parameters:
  • app_id (query param): Your OneSignal App ID.
  • template_id (path param): The unique ID of the template.

Template ID

Each template has a unique OneSignal-generated template_id (UUID v4). You can find it:
  • Using the View Templates API
  • In the OneSignal Dashboard under Messages > Templates > Options > Copy Template ID
Copy Template ID in OneSignal Dashboard

Copy Template ID


Headers

Authorization
string
default:Key YOUR_APP_API_KEY
required

Your App API key with prefix Key. See Keys & IDs.

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

Path Parameters

template_id
string
default:YOUR_TEMPLATE_ID
required

The template ID in UUID v4 format. See Templates.

Query Parameters

app_id
string
default:YOUR_APP_ID
required

Your OneSignal App ID in UUID v4 format. See Keys & IDs.

Response

200

id
string

The template ID in UUID v4 format.

Example:

"Template-ID-in-UUID-v4-format"

name
string

An internal name you set to help organize and track Templates. Maximum 128 characters.

channel
string

Options are: push, email, and SMS.

Example:

"push"

created_at
string

The date and time the template was created in ISO 8601 format.

Example:

"2023-07-20T19:16:55Z"

updated_at
string

The date and time the template was last updated in ISO 8601 format.

Example:

"2023-07-20T19:16:55Z"

content
object

The template content.