## Create a sequence

`client.Sequence.New(ctx, body) (*SequenceCreateResponse, error)`

**post** `/v1/sequences`

Creates a new sequence and its first draft, and returns the draft. The sequence sends nothing until the draft is published and the sequence is activated.

Supports idempotency via the `Idempotency-Key` header.

Returns 400 `invalid_configuration` listing the draft’s problems under `issues`, and 400 `referenced_resource_missing` for a reviewer or sender that does not exist. See <u>[Sequence errors](/using-the-api/errors/#sequence-errors)</u>.

**[Required scope](/using-the-api/scopes/):** `sequences:create`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Parameters

- `body SequenceNewParams`

  - `Definition param.Field[SequenceNewParamsDefinition]`

    Configuration of the first draft. `description` and `steps` are required.

    - `Description string`

      What this version of the sequence is for.

    - `Steps []SequenceNewParamsDefinitionStepUnion`

      The ordered step list.

      - `type SequenceNewParamsDefinitionStepObject struct{…}`

        - `DeliveryMode string`

          `AUTO` sends without manual approval, subject to the send window and limits; `FOR_REVIEW` requires a person to approve the draft before sending.

          - `const SequenceNewParamsDefinitionStepObjectDeliveryModeAuto SequenceNewParamsDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceNewParamsDefinitionStepObjectDeliveryModeForReview SequenceNewParamsDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceNewParamsDefinitionStepObjectTypeEmail SequenceNewParamsDefinitionStepObjectType = "EMAIL"`

          - `const SequenceNewParamsDefinitionStepObjectTypeLinkedinMessage SequenceNewParamsDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceNewParamsDefinitionStepObjectModeAgent SequenceNewParamsDefinitionStepObjectMode = "AGENT"`

      - `type SequenceNewParamsDefinitionStepObject2 struct{…}`

        - `DeliveryMode string`

          `AUTO` sends without manual approval, subject to the send window and limits; `FOR_REVIEW` requires a person to approve the draft before sending.

          - `const SequenceNewParamsDefinitionStepObject2DeliveryModeAuto SequenceNewParamsDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceNewParamsDefinitionStepObject2DeliveryModeForReview SequenceNewParamsDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceNewParamsDefinitionStepObject2TypeLinkedinInvite SequenceNewParamsDefinitionStepObject2Type = "LINKEDIN_INVITE"`

        - `IncludeNote bool`

          Whether the connection request carries a note. Defaults to false.

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceNewParamsDefinitionStepObject2ModeAgent SequenceNewParamsDefinitionStepObject2Mode = "AGENT"`

      - `type SequenceNewParamsDefinitionStepObject3 struct{…}`

        - `DeliveryMode string`

          `AUTO` sends without manual approval, subject to the send window and limits; `FOR_REVIEW` requires a person to approve the draft before sending.

          - `const SequenceNewParamsDefinitionStepObject3DeliveryModeAuto SequenceNewParamsDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceNewParamsDefinitionStepObject3DeliveryModeForReview SequenceNewParamsDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Template SequenceNewParamsDefinitionStepObject3Template`

          The email every contact receives. Requires template steps for the workspace.

          - `Body string`

            Email body as Markdown; paragraphs, bold, italics, links and lists keep their formatting. Leave out the sign-off and signature, which are added when the message is written. A variable cannot be part of a link address. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

          - `Subject string`

            Plain-text subject line. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceNewParamsDefinitionStepObject3TypeEmail SequenceNewParamsDefinitionStepObject3Type = "EMAIL"`

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceNewParamsDefinitionStepObject3ModeTemplate SequenceNewParamsDefinitionStepObject3Mode = "TEMPLATE"`

      - `type SequenceNewParamsDefinitionStepObject4 struct{…}`

        - `DeliveryMode string`

          `AUTO` sends without manual approval, subject to the send window and limits; `FOR_REVIEW` requires a person to approve the draft before sending.

          - `const SequenceNewParamsDefinitionStepObject4DeliveryModeAuto SequenceNewParamsDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceNewParamsDefinitionStepObject4DeliveryModeForReview SequenceNewParamsDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Template SequenceNewParamsDefinitionStepObject4Template`

          The message every contact receives; for an invite, its connection note, sent only with `includeNote` and otherwise left empty. Requires template steps for the workspace.

          - `Body string`

            Plain-text message. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceNewParamsDefinitionStepObject4TypeLinkedinMessage SequenceNewParamsDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceNewParamsDefinitionStepObject4ModeTemplate SequenceNewParamsDefinitionStepObject4Mode = "TEMPLATE"`

      - `type SequenceNewParamsDefinitionStepObject5 struct{…}`

        - `DeliveryMode string`

          `AUTO` sends without manual approval, subject to the send window and limits; `FOR_REVIEW` requires a person to approve the draft before sending.

          - `const SequenceNewParamsDefinitionStepObject5DeliveryModeAuto SequenceNewParamsDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceNewParamsDefinitionStepObject5DeliveryModeForReview SequenceNewParamsDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Template SequenceNewParamsDefinitionStepObject5Template`

          The message every contact receives; for an invite, its connection note, sent only with `includeNote` and otherwise left empty. Requires template steps for the workspace.

          - `Body string`

            Plain-text message. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceNewParamsDefinitionStepObject5TypeLinkedinInvite SequenceNewParamsDefinitionStepObject5Type = "LINKEDIN_INVITE"`

        - `IncludeNote bool`

          Whether the connection request carries a note. Defaults to false.

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceNewParamsDefinitionStepObject5ModeTemplate SequenceNewParamsDefinitionStepObject5Mode = "TEMPLATE"`

      - `type SequenceNewParamsDefinitionStepObject6 struct{…}`

        - `Duration int64`

          Length of the wait.

        - `Type string`

          `WAIT` pauses for a fixed time; `WAIT_FOR_CONNECTION` waits up to that long for a LinkedIn invite to be accepted.

          - `const SequenceNewParamsDefinitionStepObject6TypeWait SequenceNewParamsDefinitionStepObject6Type = "WAIT"`

          - `const SequenceNewParamsDefinitionStepObject6TypeWaitForConnection SequenceNewParamsDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceNewParamsDefinitionStepObject6UnitDay SequenceNewParamsDefinitionStepObject6Unit = "DAY"`

          - `const SequenceNewParamsDefinitionStepObject6UnitMinute SequenceNewParamsDefinitionStepObject6Unit = "MINUTE"`

    - `Messaging SequenceNewParamsDefinitionMessaging`

      Messaging inputs that frame every step. Omitted or null fields are left unset.

      - `CallToAction string`

        What the recipient is asked to do.

      - `Persona string`

        Who the sequence targets.

      - `Trigger string`

        Why the outreach is timely.

      - `ValueProp string`

        The value proposition.

    - `Pacing SequenceNewParamsDefinitionPacing`

      How the whole sequence paces each step type it sends, keyed by sequence step type. Omitted step types have no daily cap.

      - `Email SequenceNewParamsDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          Most sends of this step type across the whole sequence in any rolling 24 hours, or null when the sequence sets no daily cap. Workspace and sender limits still apply.

      - `LinkedinInvite SequenceNewParamsDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          Most sends of this step type across the whole sequence in any rolling 24 hours, or null when the sequence sets no daily cap. Workspace and sender limits still apply.

      - `LinkedinMessage SequenceNewParamsDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

          Most sends of this step type across the whole sequence in any rolling 24 hours, or null when the sequence sets no daily cap. Workspace and sender limits still apply.

    - `Priority string`

      Send priority relative to other sequences. Defaults to `NORMAL`.

      - `const SequenceNewParamsDefinitionPriorityHigh SequenceNewParamsDefinitionPriority = "HIGH"`

      - `const SequenceNewParamsDefinitionPriorityNormal SequenceNewParamsDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceNewParamsDefinitionSendWindow`

      When the sequence may send. Omitted fields take the default: 9:00–17:00, Monday to Friday, UTC.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

        Local hour sends stop, exclusive (1–24).

      - `StartHour int64`

        First local hour sends may go out (0–23).

      - `Timezone string`

        IANA timezone of the window.

  - `Name param.Field[string]`

    Name of the sequence.

  - `Reviewers param.Field[[]string]`

    Extra members who may approve this sequence’s `FOR_REVIEW` messages before they send. The sending member and the sequence’s creator always review, whether or not they are listed. Member IDs of active members. Omit for none.

  - `Senders param.Field[[]string]`

    The senders this sequence sends from; new contacts rotate across them. Sender IDs of unarchived senders. Omit for none; activating needs a sender for each channel the steps use.

### Returns

- `type SequenceCreateResponse struct{…}`

  - `Channels []string`

    Channels the draft's steps send on.

    - `const SequenceCreateResponseChannelEmail SequenceCreateResponseChannel = "EMAIL"`

    - `const SequenceCreateResponseChannelLinkedin SequenceCreateResponseChannel = "LINKEDIN"`

  - `Definition SequenceCreateResponseDefinition`

    The draft configuration, in the same shape as a published definition.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceCreateResponseDefinitionMessaging`

      Messaging inputs that frame every step.

      - `CallToAction string`

        What the recipient is asked to do.

      - `Persona string`

        Who the sequence targets.

      - `Trigger string`

        Why the outreach is timely.

      - `ValueProp string`

        The value proposition.

    - `Pacing SequenceCreateResponseDefinitionPacing`

      How the whole sequence paces each step type it sends, keyed by sequence step type.

      - `Email SequenceCreateResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          Most sends of this step type across the whole sequence in any rolling 24 hours, or null when the sequence sets no daily cap. Workspace and sender limits still apply.

      - `LinkedinInvite SequenceCreateResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          Most sends of this step type across the whole sequence in any rolling 24 hours, or null when the sequence sets no daily cap. Workspace and sender limits still apply.

      - `LinkedinMessage SequenceCreateResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

          Most sends of this step type across the whole sequence in any rolling 24 hours, or null when the sequence sets no daily cap. Workspace and sender limits still apply.

    - `Priority string`

      Send priority relative to other sequences.

      - `const SequenceCreateResponseDefinitionPriorityHigh SequenceCreateResponseDefinitionPriority = "HIGH"`

      - `const SequenceCreateResponseDefinitionPriorityNormal SequenceCreateResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceCreateResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

        Local hour sends stop, exclusive (1–24).

      - `StartHour int64`

        First local hour sends may go out (0–23).

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceCreateResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceCreateResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

          `AUTO` sends without manual approval, subject to the send window and limits; `FOR_REVIEW` requires a person to approve the draft before sending.

          - `const SequenceCreateResponseDefinitionStepObjectDeliveryModeAuto SequenceCreateResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObjectDeliveryModeForReview SequenceCreateResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in.

          - `const SequenceCreateResponseDefinitionStepObjectModeAgent SequenceCreateResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceCreateResponseDefinitionStepObjectTypeEmail SequenceCreateResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceCreateResponseDefinitionStepObjectTypeLinkedinMessage SequenceCreateResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceCreateResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

          `AUTO` sends without manual approval, subject to the send window and limits; `FOR_REVIEW` requires a person to approve the draft before sending.

          - `const SequenceCreateResponseDefinitionStepObject2DeliveryModeAuto SequenceCreateResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject2DeliveryModeForReview SequenceCreateResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

          Whether the connection request carries a note. A step authored before this setting existed reads as true.

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in.

          - `const SequenceCreateResponseDefinitionStepObject2ModeAgent SequenceCreateResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject2TypeLinkedinInvite SequenceCreateResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceCreateResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

          `AUTO` sends without manual approval, subject to the send window and limits; `FOR_REVIEW` requires a person to approve the draft before sending.

          - `const SequenceCreateResponseDefinitionStepObject3DeliveryModeAuto SequenceCreateResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject3DeliveryModeForReview SequenceCreateResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in.

          - `const SequenceCreateResponseDefinitionStepObject3ModeTemplate SequenceCreateResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceCreateResponseDefinitionStepObject3Template`

          The email every contact receives.

          - `Body string`

            Email body as Markdown, without the sign-off or signature, which are added when the message is written. Each `{{ }}` is a variable filled in per contact, with a fallback for a contact missing the value; a field variable names the field by the `ad_` ID the field-definitions endpoints list.

          - `Subject string`

            Plain-text subject line. Each `{{ }}` is a variable filled in per contact, with a fallback for a contact missing the value; a field variable names the field by the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject3TypeEmail SequenceCreateResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceCreateResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

          `AUTO` sends without manual approval, subject to the send window and limits; `FOR_REVIEW` requires a person to approve the draft before sending.

          - `const SequenceCreateResponseDefinitionStepObject4DeliveryModeAuto SequenceCreateResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject4DeliveryModeForReview SequenceCreateResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in.

          - `const SequenceCreateResponseDefinitionStepObject4ModeTemplate SequenceCreateResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceCreateResponseDefinitionStepObject4Template`

          The message every contact receives; for an invite, its connection note, sent only with `includeNote`.

          - `Body string`

            Plain-text message. Each `{{ }}` is a variable filled in per contact, with a fallback for a contact missing the value; a field variable names the field by the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject4TypeLinkedinMessage SequenceCreateResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceCreateResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

          `AUTO` sends without manual approval, subject to the send window and limits; `FOR_REVIEW` requires a person to approve the draft before sending.

          - `const SequenceCreateResponseDefinitionStepObject5DeliveryModeAuto SequenceCreateResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject5DeliveryModeForReview SequenceCreateResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

          Whether the connection request carries a note. A step authored before this setting existed reads as true.

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in.

          - `const SequenceCreateResponseDefinitionStepObject5ModeTemplate SequenceCreateResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceCreateResponseDefinitionStepObject5Template`

          The message every contact receives; for an invite, its connection note, sent only with `includeNote`.

          - `Body string`

            Plain-text message. Each `{{ }}` is a variable filled in per contact, with a fallback for a contact missing the value; a field variable names the field by the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject5TypeLinkedinInvite SequenceCreateResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceCreateResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

          `WAIT` pauses for a fixed time; `WAIT_FOR_CONNECTION` waits up to that long for a LinkedIn invite to be accepted.

          - `const SequenceCreateResponseDefinitionStepObject6TypeWait SequenceCreateResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceCreateResponseDefinitionStepObject6TypeWaitForConnection SequenceCreateResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceCreateResponseDefinitionStepObject6UnitDay SequenceCreateResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceCreateResponseDefinitionStepObject6UnitMinute SequenceCreateResponseDefinitionStepObject6Unit = "MINUTE"`

  - `Name string`

    Name the sequence takes when the draft is published.

  - `PublishWarnings []SequenceCreateResponsePublishWarning`

    What publishing this draft would change for contacts already in the sequence; empty when nothing is affected. Before the first publish, the only possible warning is a proposed sender that was archived and would be left off.

    - `Code string`

      What publishing would change.

      - `const SequenceCreateResponsePublishWarningCodeDelayShortened SequenceCreateResponsePublishWarningCode = "delay_shortened"`

      - `const SequenceCreateResponsePublishWarningCodeDelayLengthened SequenceCreateResponsePublishWarningCode = "delay_lengthened"`

      - `const SequenceCreateResponsePublishWarningCodeConnectionWaitShortened SequenceCreateResponsePublishWarningCode = "connection_wait_shortened"`

      - `const SequenceCreateResponsePublishWarningCodeConnectionWaitLengthened SequenceCreateResponsePublishWarningCode = "connection_wait_lengthened"`

      - `const SequenceCreateResponsePublishWarningCodeSendScheduleChanged SequenceCreateResponsePublishWarningCode = "send_schedule_changed"`

      - `const SequenceCreateResponsePublishWarningCodeSendConfigurationChanged SequenceCreateResponsePublishWarningCode = "send_configuration_changed"`

      - `const SequenceCreateResponsePublishWarningCodeSendPriorityChanged SequenceCreateResponsePublishWarningCode = "send_priority_changed"`

      - `const SequenceCreateResponsePublishWarningCodeSendersChanged SequenceCreateResponsePublishWarningCode = "senders_changed"`

      - `const SequenceCreateResponsePublishWarningCodeEmailSenderPoolEmptied SequenceCreateResponsePublishWarningCode = "email_sender_pool_emptied"`

      - `const SequenceCreateResponsePublishWarningCodeLinkedinAccountPoolEmptied SequenceCreateResponsePublishWarningCode = "linkedin_account_pool_emptied"`

      - `const SequenceCreateResponsePublishWarningCodeAssignedSenderRemoved SequenceCreateResponsePublishWarningCode = "assigned_sender_removed"`

      - `const SequenceCreateResponsePublishWarningCodeDeliveryBecameAutomatic SequenceCreateResponsePublishWarningCode = "delivery_became_automatic"`

      - `const SequenceCreateResponsePublishWarningCodeInviteNoteEnabled SequenceCreateResponsePublishWarningCode = "invite_note_enabled"`

      - `const SequenceCreateResponsePublishWarningCodeInviteNoteDisabled SequenceCreateResponsePublishWarningCode = "invite_note_disabled"`

      - `const SequenceCreateResponsePublishWarningCodeStepInserted SequenceCreateResponsePublishWarningCode = "step_inserted"`

      - `const SequenceCreateResponsePublishWarningCodeAutomaticSendStepInserted SequenceCreateResponsePublishWarningCode = "automatic_send_step_inserted"`

      - `const SequenceCreateResponsePublishWarningCodeStepRemoved SequenceCreateResponsePublishWarningCode = "step_removed"`

      - `const SequenceCreateResponsePublishWarningCodeStepTypeChanged SequenceCreateResponsePublishWarningCode = "step_type_changed"`

      - `const SequenceCreateResponsePublishWarningCodeStepOrderChanged SequenceCreateResponsePublishWarningCode = "step_order_changed"`

      - `const SequenceCreateResponsePublishWarningCodeFullIdentityRewrite SequenceCreateResponsePublishWarningCode = "full_identity_rewrite"`

      - `const SequenceCreateResponsePublishWarningCodeLowIdentityOverlap SequenceCreateResponsePublishWarningCode = "low_identity_overlap"`

    - `Message string`

      What would change, in plain language.

    - `Severity string`

      `destructive` when contacts already in the sequence may skip, repeat or receive a step they would not have; `warning` otherwise.

      - `const SequenceCreateResponsePublishWarningSeverityWarning SequenceCreateResponsePublishWarningSeverity = "warning"`

      - `const SequenceCreateResponsePublishWarningSeverityDestructive SequenceCreateResponsePublishWarningSeverity = "destructive"`

    - `StepIDs []string`

      The steps involved; empty for a sequence-wide change.

  - `Reviewers []SequenceCreateResponseReviewer`

    Extra members who may approve this sequence’s `FOR_REVIEW` messages before they send. The sending member and the sequence’s creator always review, whether or not they are listed.

    - `ID string`

      ID of the member.

    - `ObjectType string`

      Always `member`.

      - `const SequenceCreateResponseReviewerObjectTypeMember SequenceCreateResponseReviewerObjectType = "member"`

  - `Senders []SequenceCreateResponseSender`

    The senders this draft will publish; new contacts rotate across them. Until a save changes it, this is the sequence’s live list. An archived sender stays listed but never sends; any change to the list drops it.

    - `ID string`

      ID of the sender.

    - `ObjectType string`

      Always `sender`.

      - `const SequenceCreateResponseSenderObjectTypeSender SequenceCreateResponseSenderObjectType = "sender"`

  - `SequenceID string`

    The sequence this draft belongs to.

  - `UpdatedAt string`

    When the draft last changed.

  - `Version string`

    Opaque token for the current state of the draft. Send it as `expectedVersion` on the next save, publish or discard; it changes whenever anyone edits the draft.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceCreateResponse, err := client.Sequence.New(context.TODO(), githubcomlightfldlightfieldgo.SequenceNewParams{
    Definition: githubcomlightfldlightfieldgo.SequenceNewParamsDefinition{
      Description: "x",
      Steps: []githubcomlightfldlightfieldgo.SequenceNewParamsDefinitionStepUnion{githubcomlightfldlightfieldgo.SequenceNewParamsDefinitionStepUnion{
        OfSequenceNewsDefinitionStepObject: &githubcomlightfldlightfieldgo.SequenceNewParamsDefinitionStepObject{
          DeliveryMode: "AUTO",
          Name: "x",
          Prompt: "x",
          Type: "EMAIL",
        },
      }},
    },
    Name: "x",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceCreateResponse.Channels)
}
```

#### Response

```json
{
  "channels": [
    "EMAIL"
  ],
  "definition": {
    "description": "description",
    "messaging": {
      "callToAction": "callToAction",
      "persona": "persona",
      "trigger": "trigger",
      "valueProp": "valueProp"
    },
    "pacing": {
      "EMAIL": {
        "dailyLimit": -9007199254740991
      },
      "LINKEDIN_INVITE": {
        "dailyLimit": -9007199254740991
      },
      "LINKEDIN_MESSAGE": {
        "dailyLimit": -9007199254740991
      }
    },
    "priority": "HIGH",
    "sendWindow": {
      "daysOfWeek": [
        -9007199254740991
      ],
      "endHour": -9007199254740991,
      "startHour": -9007199254740991,
      "timezone": "timezone"
    },
    "steps": [
      {
        "id": "id",
        "deliveryMode": "AUTO",
        "mode": "AGENT",
        "name": "name",
        "prompt": "prompt",
        "type": "EMAIL"
      }
    ]
  },
  "name": "name",
  "publishWarnings": [
    {
      "code": "delay_shortened",
      "message": "message",
      "severity": "warning",
      "stepIds": [
        "string"
      ]
    }
  ],
  "reviewers": [
    {
      "id": "x",
      "objectType": "member"
    }
  ],
  "senders": [
    {
      "id": "x",
      "objectType": "sender"
    }
  ],
  "sequenceId": "sequenceId",
  "updatedAt": "updatedAt",
  "version": "version"
}
```
