Sign in
API Reference

Email Templates

Email templates control the look and feel of gift card delivery emails — banner image, layout, button colors, and border style. Reference a template by its ID in order and campaign requests.

GET /api/v1/templates

List templates

Returns all email templates for your organization. The default template is always listed first.

Required scope

templates.read

Query parameters

Parameter
Type
Required
Description
page
integer
No
Page number, default 1
pageSize
integer
No
Results per page, default 20, max 100
GET /api/v1/templates/{templateId}

Get template

Retrieves a single template by ID.

Required scope

templates.read

Path parameters

templateId
string
Yes
The template ID
POST /api/v1/templates

Create template

Creates a new email template. Color fields must be valid 6-digit hex codes (#RRGGBB).

Required scope

templates.write
Logo image — For security reasons, the logo image is fixed to the default Giftronaut logo. If you need a custom logo, please update it through the Giftronaut Portal ↗. Refer to the following guide for instructions on how to add a logo image in the portal.

Request body

JSON
{
  "name": "Corporate Blue",
  "senderName": "Acme Corp",
  "message": "Enjoy your gift!",
  "imageAlignment": "center",
  "imageSize": 40,
  "borderColor": "#1F35FF",
  "buttonColor": "#1F35FF",
  "buttonFontColor": "#ffffff"
}

Request fields

Field
Type
Required
Description
name
string
Yes
Internal name for this template (max 100 chars)
senderName
string
Yes
Default sender name for emails using this template
message
string
No
Default gift message text
imageAlignment
string
No
left | center | right. Default center
imageSize
integer
No
Banner height as a percentage (1–100). Default 40
borderColor
string
No
Hex color for email border, e.g. #303033
buttonColor
string
No
Hex color for CTA button background
buttonFontColor
string
No
Hex color for CTA button text
PUT /api/v1/templates/{templateId}

Update template

Replaces all fields of an existing template. The request body format is identical to Create template.

Required scope

templates.write

Path parameters

templateId
string
Yes
The template ID to update

Request body

JSON
{
  "name": "Corporate Blue",
  "senderName": "Acme Corp",
  "message": "Enjoy your gift!",
  "imageAlignment": "center",
  "imageSize": 40,
  "borderColor": "#1F35FF",
  "buttonColor": "#1F35FF",
  "buttonFontColor": "#ffffff"
}

All fields follow the same rules as Create template. All required fields must be provided.

DELETE /api/v1/templates/{templateId}

Delete template

Deletes an email template. Returns 204 No Content on success.

Required scope

templates.write

Path parameters

templateId
string
Yes
The template ID to delete

Business rules

  • The default template cannot be deleted.
  • A template referenced by one or more active campaigns cannot be deleted. Update or delete those campaigns first.

Error responses

409
DEFAULT_TEMPLATE — cannot delete the default template.
409
TEMPLATE_IN_USE — template is referenced by one or more campaigns.