GET
/
templates
/
{template_id}
?app_id=
{app_id}
View template
curl --request GET \
  --url 'https://api.onesignal.com/templates/{template_id}?app_id={app_id}' \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>'
{
  "id": "Template-ID-in-UUID-v4-format",
  "name": "<string>",
  "channel": "push",
  "created_at": "2023-07-20T19:16:55Z",
  "updated_at": "2023-07-20T19:16:55Z",
  "content": {
    "isAndroid": true,
    "isIos": true,
    "isMacOSX": true,
    "isAdm": true,
    "isWP_WNS": true,
    "isChromeWeb": true,
    "isSafari": true,
    "isFirefox": true,
    "isEdge": true,
    "headings": {
      "en": "<string>"
    },
    "contents": {
      "en": "<string>"
    },
    "global_image": "<any>",
    "url": "https://example.com",
    "isEmail": true,
    "email_body": "<string>",
    "email_subject": "<any>",
    "email_preheader": "<any>",
    "email_from_address": "<any>",
    "email_from_name": "<any>",
    "isSMS": true,
    "sms_from": "<any>",
    "sms_media_urls": "<any>",
    "email_reply_to_address": "<any>",
    "disable_email_click_tracking": "<any>"
  }
}

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:
  • template_id (path param): The unique ID of the template.
  • app_id (query param): Your OneSignal App ID.

Template ID

The template_id is a UUID that uniquely identifies the template. You can find it in the following ways:
  • Use the View Templates API.
  • In the OneSignal Dashboard under Messages > Templates:
    • Use Options > Copy Template ID

      Copy Template ID

    • View it directly in the template URL

      Template ID in the URL


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
application/json

200

The response is of type object.