Sequences

Adds an email to a sequence at position (1-based; omit to append). On an active sequence, people waiting for the step now at that place get the new step first; people already past it skip it, and people who finished never get an appended step.

post/sequences/{sequence_id}/steps

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Path parameters

sequence_id, string required

The sequence's prefixed id (e.g. seq_abc123).

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

EmailSequenceStepRequest required
subject, string

Takes the same variables as body.

preview_text, string nullable

Inbox preview line. Takes the same variables as body.

body, string

Email body (HTML or plain text). Variables, filled per recipient: {{customer.first_name}}, {{customer.last_name}}, {{customer.email}}, {{business.name}}, {{product.name}}, {{order.product_names}}, {{tag.name}}, {{form.name}}, {{customer.fields.<key>}}. product.* is the product whose purchase enrolled them (order.paid sequences only), tag.name the tag that enrolled them (tag_added), form.name the form a new lead came through (lead_created, empty for leads from elsewhere). customer.fields.<key> reads <key> from the contact's metadata when the email is sent; the key takes letters, digits and underscores. A blank value renders as nothing, or as the default in {{ customer.first_name | default: "there" }}. Any other {{ }} is rejected.

delay, object

Wait after the previous step's send (after enrolling, for the first step).

position, integer

1-based place in the sequence. On create, omit to append; the step at that place and those after it move down one.

Response

The created step

EmailSequenceStep required
object, 'sequence_step' required
id, string required
sequence, string required
position, integer required
subject, string required
preview_text, string nullable required
body, string required
delay, object required

Wait after the previous step's send (after enrolling, for the first step).

created_at, string date-time required
updated_at, string date-time required

Changes

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    4 more changes in this revision