GET
/
templates
/
{template_id}
?app_id=
{app_id}
curl --request GET \
  --url 'https://api.onesignal.com/templates/{template_id}?app_id={app_id}' \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>'
"{\n  \"id\": \"40a70334-b3c1-425c-1242-f122aa9a9fc0\",\n  \"name\": \"api created template - ALL THE PUSH THINGS\",\n  \"channel\": \"push\",\n  \"created_at\": \"2023-07-20T19:16:55Z\",\n  \"updated_at\": \"2023-07-20T19:16:55Z\",\n  \"content\": {\n    \"isAndroid\": true,\n    \"isIos\": true,\n    \"isMacOSX\": true,\n    \"isAdm\": true,\n    \"isAlexa\": null,\n    \"isWP\": true,\n    \"isWP_WNS\": true,\n    \"isChrome\": true,\n    \"isChromeWeb\": true,\n    \"isSafari\": true,\n    \"isFirefox\": true,\n    \"isEdge\": true,\n    \"headings\": {\n      \"en\": \"hello from the api!\"\n    },\n    \"subtitle\": null,\n    \"contents\": {\n      \"en\": \"why hello there!\"\n    },\n    \"global_image\": null,\n    \"url\": \"https://example.com\",\n    \"isEmail\": null,\n    \"email_body\": null,\n    \"email_subject\": null,\n    \"email_preheader\": null,\n    \"isSMS\": null,\n    \"sms_from\": null,\n    \"sms_media_urls\": null,\n    \"email_reply_to_address\": null,\n    \"disable_email_click_tracking\": null\n  }\n}"

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.

GET
/
templates
/
{template_id}
?app_id=
{app_id}
curl --request GET \
  --url 'https://api.onesignal.com/templates/{template_id}?app_id={app_id}' \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>'
"{\n  \"id\": \"40a70334-b3c1-425c-1242-f122aa9a9fc0\",\n  \"name\": \"api created template - ALL THE PUSH THINGS\",\n  \"channel\": \"push\",\n  \"created_at\": \"2023-07-20T19:16:55Z\",\n  \"updated_at\": \"2023-07-20T19:16:55Z\",\n  \"content\": {\n    \"isAndroid\": true,\n    \"isIos\": true,\n    \"isMacOSX\": true,\n    \"isAdm\": true,\n    \"isAlexa\": null,\n    \"isWP\": true,\n    \"isWP_WNS\": true,\n    \"isChrome\": true,\n    \"isChromeWeb\": true,\n    \"isSafari\": true,\n    \"isFirefox\": true,\n    \"isEdge\": true,\n    \"headings\": {\n      \"en\": \"hello from the api!\"\n    },\n    \"subtitle\": null,\n    \"contents\": {\n      \"en\": \"why hello there!\"\n    },\n    \"global_image\": null,\n    \"url\": \"https://example.com\",\n    \"isEmail\": null,\n    \"email_body\": null,\n    \"email_subject\": null,\n    \"email_preheader\": null,\n    \"isSMS\": null,\n    \"sms_from\": null,\n    \"sms_media_urls\": null,\n    \"email_reply_to_address\": null,\n    \"disable_email_click_tracking\": null\n  }\n}"

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.