Sequences

Adds one person to an active sequence by contact_id, or by email (an unknown address is added as a lead). Returns 201 with the new enrollment, or 200 with the existing one if they were ever enrolled: nobody enters a sequence twice. A contact waiting to confirm a double opt-in signup is held as pending_confirmation until they confirm. Suppressed addresses are rejected with recipient_suppressed, and a sequence that isn't active with 409 sequence_not_active.

post/sequences/{sequence_id}/enrollments

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

EmailSequenceEnrollmentRequest required
contact_id, string

The contact (con_...) to enroll.

email, string

Or an email address; an unknown one is added as a lead.

Response

The person's existing enrollment

EmailSequenceEnrollment required
object, 'sequence_enrollment' required
id, string required
sequence, string required
contact, string required
email, string required
status, 'pending_confirmation' | 'active' | 'completed' | 'unsubscribed' | 'suppressed' | 'purchased' | 'excluded' | 'replied' | 'canceled' | 'contact_deleted' | 'sequence_deleted' | 'failed' required
source, string required

What enrolled them: api, or the event name (lead.created, contact.tag_added, contact.field_changed, order.paid, custom.<name>).

next_step, string nullable required
next_send_at, string date-time nullable required

When the next step goes out, after send days are applied. Null once the enrollment stops or while it waits for double opt-in.

started_at, string date-time nullable required
last_sent_at, string date-time nullable required
ended_at, string date-time nullable required
deliveries, EmailSequenceDelivery[] required

Steps sent to this person, oldest first.

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

    5 more changes in this revision