---
title: "Render a template"
method: POST
path: "/templates/{id}/render"
tags: ["Templates"]
---

# Render a template

`POST /templates/{id}/render`

Render a template. This endpoint has a variable request body depending on the template type. For the `status_update` template type, the caller will provide the incident id, and a status update message.

Scoped OAuth requires: `templates.read`

## Path parameters

- `id` string, required

## Request body

- StatusUpdateTemplateInput
  - `incident_id` string — The incident id to render the template for
  - `status_update` object
    - `message` string — An optional status update message that will be sent to the template
  - `external` unknown

## Response `200`

Successful operation

- RenderedTemplate
  - `templated_fields` object
    - `email_subject` string — The rendered e-mail subject
    - `email_body` string — The rendered e-mail body
    - `message` string — The rendered short message (SMS, Push, Slack, etc)
  - `warnings` object — List of render warnings messages for each rendered field. (Ex: ["{{incident.invalid_field}} does not exist."])
    - `email_subject` string[] — List of warnings for email_subject
    - `email_body` string[] — List of warnings for email_body
    - `message` string[] — List of warnings for message field
  - `errors` string[] — List of errors

## Other responses

- `400` — Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.
- `402` — Account does not have the abilities to perform the action. Please review the response for the required abilities. You can also use the [Abilities API](#resource_Abilities) to determine what features are available to your account.
- `403` — Caller is not authorized to view the requested resource. While your authentication is valid, the authenticated user or token does not have permission to perform this action.
- `404` — The requested resource was not found.
- `500` — Internal Server Error the PagerDuty server experienced an error.

---

[API](https://skmtc.net/pagerduty/apis/rest-api.md) · [All operations](https://skmtc.net/pagerduty/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pagerduty/rest-api/revisions/b679a8f3f02c/schema)
