templates

Edit a template.

Name and alias change at once; subject, body, sender and variables edit the draft, and a published template gets a new draft from its live version (the live version keeps sending until you publish).

patch/templates/{id}

Request

  • Base URL: https://api.agentisend.com
  • URL: https://api.agentisend.com/templates/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

The template id or its alias.

Headers

Idempotency-Keystring

Makes this call safe to retry. Send the same key with the same body and the original response is replayed instead of the work happening twice. Keys are 1-256 characters and are remembered for 7 days. While the first attempt is still running, a second call with that key returns 409 idempotency_in_flight (Resend calls this concurrent_idempotent_requests); the same key with a different body returns 409 idempotency_payload_mismatch (Resend: invalid_idempotent_request). Resend-Idempotency-Key is accepted as the same header.

Resend-Idempotency-Keystring

Alias of Idempotency-Key. Idempotency-Key wins if both are sent.

Request body

namestring

Rename the template. Takes effect at once.

aliasstring nullable

A second handle for the template, unique on the account. Use it wherever an id is taken.

subjectstring

Replace the draft subject.

fromstring nullable

Default sender, such as "Acme hello@acme.com". A send that names its own from overrides it.

reply_tostring[] nullable

Default Reply-To addresses. A send that names its own reply_to overrides them.

textstring nullable

The plain-text part. Leave it out and one is made from the HTML. An empty string sends no text part.

Response

Success

object'template' required
idstring uuid required
namestring required
aliasstring nullable required
status'draft' | 'published' required
current_version_numberinteger nullable required
current_version_idstring uuid nullable required
has_unpublished_versionsboolean required
published_atstring date-time nullable required
fromstring nullable required
subjectstring required
reply_tostring[] nullable required
htmlstring required
textstring required
draft_subjectstring nullable required
created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.