Render Agent Macro
POST/api/support/agent/macros/:macro/render
Renders a macro for one ticket as the calling agent: every {{placeholder}} in the macro body is replaced with the ticket's, requester's, agent's and tenant's current values. Values substituted into body_html are HTML-escaped; body_text is substituted raw. The macro's actions are handed back untouched — rendering changes nothing on the ticket; apply the actions (and send the reply) through the normal ticket endpoints.
support:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Path parameters
macro(integer) — the macro id. A macro that is neither shared nor the caller's own is reported as not found.
Request body
ticket_id(integer, required, min 1) — the ticket to render against. It may also be sent as a query parameter.
Placeholders ({{name}}, case-insensitive, optional spaces inside the braces; an unknown placeholder renders as an empty string):
{{ticket.id}}— the ticket id, e.g. 2451{{ticket.number}}— the ticket reference, e.g. #2451{{ticket.subject}}— the ticket subject{{ticket.status}}— the current status label (e.g. In progress){{ticket.priority}}— the current priority label (e.g. High){{requester.name}}— the requester's full name{{requester.first_name}}— the requester's first name{{requester.email}}— the requester's email address{{agent.name}}— the rendering agent's display name{{agent.first_name}}— the rendering agent's first name{{agent.signature}}— the rendering agent's signature (empty when none is set){{tenant.id}}— the tenant id{{tenant.name}}— the tenant name (falls back to the tenant id)
Response
data.body_html(string) — the rendered HTML bodydata.body_text(string) — the rendered plain-text bodydata.actions(object, nullable) — the macro's suggested ticket actions, exactly as stored (see List Agent Macros)
Authentication: Bearer token with the support:write scope, or an authenticated session, from a caller with an active support role (any role, including viewer). No tenant context — this endpoint is central.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthorized
Response Headers
Forbidden
Response Headers
Not Found
Response Headers
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.