Skip to main content
PATCH
cURL

Overview

Replace the subject, fallback subject, or body of one person’s email before it sends. The change applies only to this enrollment and leaves the sequence’s template unchanged. Use it to revise copy that Unify drafted for an agentic sequence before you approve the enrollment, or to adjust a scheduled email for one recipient. Include only the fields you want to change. The request must include at least one of subject, fallback_subject, or body. Only email steps have copy; other step types return 400 Bad Request. Get step IDs from List enrollment steps.

Examples

Set UNIFY_API_KEY to your API key and replace the example step ID and version_id with values from Get enrollment step.
This request replaces the email body and keeps the first-name variable from the original copy:
The response returns the step with its new copy and a new email.version_id.
Send a subject only to the first email of a thread:
Unify uses fallback_subject if the variable in subject cannot be resolved when the email sends.

Write the copy

body is HTML and replaces the step’s entire body. Template variables and snippets appear in the copy as {{ ... }} tokens, such as {{variable::person.firstName}}. Keep the tokens you want to preserve. To add a variable or snippet, copy its token from the sequence’s template, which Get sequence step returns in config.body. After an update, Unify resolves the tokens in the new copy for this person. email.is_ready is false until they are resolved, and the email does not send before then. Only the first email of a thread accepts subject and fallback_subject. Its email.is_root_message is true. Later emails reply in the same thread and reuse its subject, so a subject change on a reply returns 400 Bad Request.

Avoid overwriting other edits

Send the email.version_id you last read as version_id. If the copy changed after that version, for example because a teammate edited it in Unify, the API returns 409 Conflict with reason set to VERSION_OUTDATED. Get the step again, apply your change to the latest copy, and retry. Without version_id, the update replaces the current copy regardless of earlier changes. The API also returns 409 Conflict once the step has sent or the enrollment has ended, for example because the person replied or opted out. reason identifies the cause. Only VERSION_OUTDATED can be resolved by retrying.

Authorizations

x-api-key
string
header
required

Path Parameters

id
string<uuid>
required

String UUID value.

Body

application/json

Request body for updating the email copy of an enrollment step. At least one of subject, fallback_subject or body must be provided.

  • subject and fallback_subject are only accepted on root messages.
  • body is HTML. Template variables and snippets are written as {{ ... }} tokens. Must not be blank.
  • version_id is the copy version the edit is based on. The update is rejected with a conflict when the copy has changed since that version.
subject
string
required
fallback_subject
string
body
string
Required string length: 1 - 200000
version_id
string<uuid>

String UUID value.

Response

Response returned when an enrollment step's email copy is updated.

Response returned when an enrollment step's email copy is updated.

id
string<uuid>
required

String UUID value.

created_at
string<date-time>
required

String value representing an RFC 3339 datetime.

updated_at
string<date-time>
required

String value representing an RFC 3339 datetime.

enrollment_id
string<uuid>
required

String UUID value.

sequence_id
string<uuid>
required

String UUID value.

step_id
string<uuid>
required

ID of the sequence step this enrollment step was created from.

type
enum<string>
required

Type of a sequence enrollment step.

Available options:
AUTOMATIC_EMAIL,
MANUAL_EMAIL,
ACTION_ITEM,
ZAPIER,
PHONE_CALL,
MANUAL_LINKEDIN_PROFILE_VIEW,
MANUAL_LINKEDIN_CONNECTION,
MANUAL_LINKEDIN_MESSAGE
status
enum<string>
required

Status of an individual sequence enrollment step.

Available options:
NOT_STARTED,
SCHEDULED,
PENDING,
FINISHED,
CANCELED,
ERRORED,
UNREACHABLE
step_number
integer
required

Position of the step in the enrollment, starting at 1. Null until the step is expected to run or has finished.

Required range: x >= 1
is_blocked
boolean
required
is_bounced
boolean
required
is_canceled
boolean
required
is_opted_out
boolean
required
is_paused
boolean
required
is_replied
boolean
required
started_at
string<date-time> | null
required

String value representing an RFC 3339 datetime.

ended_at
string<date-time> | null
required

String value representing an RFC 3339 datetime.

email
object | null
required

Email copy for email steps. Null for other step types.