---
title: "Save an email template"
method: POST
path: "/sequences/templates/"
tags: ["sequences"]
---

# Save an email template

`POST /sequences/templates/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/sequences/templates/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Save a drafted subject and body (as segments, so variables and AI/spintax tokens survive reuse) into the workspace library.

## Request body

- MessageTemplateCreateSchema
  - `body_segments` TemplateSegmentSchema[]
    - `builtin` 'sender_first_name' | 'sender_full_name' | 'sender_title' | 'sender_booking_link' | 'sending_domain' | 'sequence_name' | 'greeting' | 'today' | 'yesterday' | 'tomorrow' | 'day_plus_2' | 'day_plus_3' | 'day_plus_4': Non-column variables the composer offers. Weekday variables render the *name* of the day ("Thursday") so a cadence can reference real days without weekly rewrites.
    - `column_id` string, uuid, nullable
    - `kind` 'text' | 'column' | 'builtin' | 'spintax', required: One piece of a subject or body template.
    - `options` string[]: Spintax alternatives; one is chosen per contact.
    - `required` boolean
    - `text` string
  - `name` string, required
  - `scope` 'sequence_step' | 'linkedin' | 'inbox_reply': Which composer a template belongs to. A scope, not a folder: the picker filters to the surface it was opened from (with an everything view), and save-as-template stamps the surface it was saved from, so the library can't drift into a junk drawer.
  - `subject_segments` TemplateSegmentSchema[], nullable
    - `builtin` 'sender_first_name' | 'sender_full_name' | 'sender_title' | 'sender_booking_link' | 'sending_domain' | 'sequence_name' | 'greeting' | 'today' | 'yesterday' | 'tomorrow' | 'day_plus_2' | 'day_plus_3' | 'day_plus_4': Non-column variables the composer offers. Weekday variables render the *name* of the day ("Thursday") so a cadence can reference real days without weekly rewrites.
    - `column_id` string, uuid, nullable
    - `kind` 'text' | 'column' | 'builtin' | 'spintax', required: One piece of a subject or body template.
    - `options` string[]: Spintax alternatives; one is chosen per contact.
    - `required` boolean
    - `text` string

## Response `201`

Successful Response

- MessageTemplateReadSchema: One saved template, as segments so variables survive reuse.
  - `body_segments` TemplateSegmentSchema[], required
    - `builtin` 'sender_first_name' | 'sender_full_name' | 'sender_title' | 'sender_booking_link' | 'sending_domain' | 'sequence_name' | 'greeting' | 'today' | 'yesterday' | 'tomorrow' | 'day_plus_2' | 'day_plus_3' | 'day_plus_4': Non-column variables the composer offers. Weekday variables render the *name* of the day ("Thursday") so a cadence can reference real days without weekly rewrites.
    - `column_id` string, uuid, nullable
    - `kind` 'text' | 'column' | 'builtin' | 'spintax', required: One piece of a subject or body template.
    - `options` string[]: Spintax alternatives; one is chosen per contact.
    - `required` boolean
    - `text` string
  - `created_at` string, date-time, required
  - `created_by_user_id` string, nullable: The person who saved it, whom the library names beside it. Null for a template saved before anyone was recorded.
  - `id` string, uuid, required
  - `name` string, required
  - `scope` 'sequence_step' | 'linkedin' | 'inbox_reply', required: Which composer a template belongs to. A scope, not a folder: the picker filters to the surface it was opened from (with an everything view), and save-as-template stamps the surface it was saved from, so the library can't drift into a junk drawer.
  - `subject_segments` TemplateSegmentSchema[], nullable, required
    - `builtin` 'sender_first_name' | 'sender_full_name' | 'sender_title' | 'sender_booking_link' | 'sending_domain' | 'sequence_name' | 'greeting' | 'today' | 'yesterday' | 'tomorrow' | 'day_plus_2' | 'day_plus_3' | 'day_plus_4': Non-column variables the composer offers. Weekday variables render the *name* of the day ("Thursday") so a cadence can reference real days without weekly rewrites.
    - `column_id` string, uuid, nullable
    - `kind` 'text' | 'column' | 'builtin' | 'spintax', required: One piece of a subject or body template.
    - `options` string[]: Spintax alternatives; one is chosen per contact.
    - `required` boolean
    - `text` string
  - `updated_at` string, date-time, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: Validation failed.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
