Update a sequence draft
Saves changes to the sequence’s open draft, or opens one from the published version when none is open. Only the fields sent are changed; definition.steps replaces the whole step list. Changes take effect when the draft is published. See Using sequences with the API for the draft and version model.
Returns 409 when expectedVersion is not the open draft’s version, or for a steps save while the draft has unfinished edits in Lightfield; retrieve the draft and retry. A refused save changes nothing: 400 invalid_configuration lists every problem under issues, 400 referenced_resource_missing names a reviewer or sender that does not exist, and a value outside its field’s documented bounds returns 400 naming the field in param. See Sequence errors.
Required scope: sequences:update
Rate limit category: Write
ParametersExpand Collapse
body SequenceUpdateDraftParams
Fields to change. Omitted fields are unchanged.
Fields to change. Omitted fields are unchanged.
Messaging SequenceUpdateDraftParamsDefinitionMessagingOptionalMessaging inputs that frame every step. Omitted fields are unchanged; null clears a field.
Messaging inputs that frame every step. Omitted fields are unchanged; null clears a field.
Pacing SequenceUpdateDraftParamsDefinitionPacingOptionalHow the whole sequence paces each step type it sends, keyed by sequence step type. Omitted step types are unchanged.
How the whole sequence paces each step type it sends, keyed by sequence step type. Omitted step types are unchanged.
SendWindow SequenceUpdateDraftParamsDefinitionSendWindowOptionalWhen the sequence may send. Omitted fields are unchanged.
When the sequence may send. Omitted fields are unchanged.
Steps []SequenceUpdateDraftParamsDefinitionStepUnionOptionalThe complete ordered step list, replacing the current one. Keep a step by sending its id; omit id for a new step.
The complete ordered step list, replacing the current one. Keep a step by sending its id; omit id for a new step.
type SequenceUpdateDraftParamsDefinitionStepObject struct{…}
DeliveryMode stringAUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
ID of a step in the current draft to keep. Omit for a new step. Kept steps must stay in their relative order and keep their type.
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.
type SequenceUpdateDraftParamsDefinitionStepObject2 struct{…}
DeliveryMode stringAUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
ID of a step in the current draft to keep. Omit for a new step. Kept steps must stay in their relative order and keep their type.
Whether the connection request carries a note. Omit to keep the current setting; a new step defaults to false.
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.
type SequenceUpdateDraftParamsDefinitionStepObject3 struct{…}
DeliveryMode stringAUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
Template SequenceUpdateDraftParamsDefinitionStepObject3TemplateThe email every contact receives. Requires template steps for the workspace.
The email every contact receives. Requires template steps for the workspace.
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(ad_ ID the field-definitions endpoints list.
Plain-text subject line. Write each variable as {{ coalesce(ad_ ID the field-definitions endpoints list.
ID of a step in the current draft to keep. Omit for a new step. Kept steps must stay in their relative order and keep their type.
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.
type SequenceUpdateDraftParamsDefinitionStepObject4 struct{…}
DeliveryMode stringAUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
Template SequenceUpdateDraftParamsDefinitionStepObject4TemplateThe message every contact receives; for an invite, its connection note, sent only with includeNote and otherwise left empty. Requires template steps for the workspace.
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.
Plain-text message. Write each variable as {{ coalesce(ad_ ID the field-definitions endpoints list.
ID of a step in the current draft to keep. Omit for a new step. Kept steps must stay in their relative order and keep their type.
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.
type SequenceUpdateDraftParamsDefinitionStepObject5 struct{…}
DeliveryMode stringAUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
Template SequenceUpdateDraftParamsDefinitionStepObject5TemplateThe message every contact receives; for an invite, its connection note, sent only with includeNote and otherwise left empty. Requires template steps for the workspace.
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.
Plain-text message. Write each variable as {{ coalesce(ad_ ID the field-definitions endpoints list.
ID of a step in the current draft to keep. Omit for a new step. Kept steps must stay in their relative order and keep their type.
Whether the connection request carries a note. Omit to keep the current setting; a new step defaults to false.
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.
The open draft’s version as last read. Required when a draft is open; omit it only when none is, to start one from the published version.
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. Changes the list by adding and removing members; omit to keep it.
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. Changes the list by adding and removing members; omit to keep it.
ReturnsExpand Collapse
type SequenceUpdateDraftResponse struct{…}
Definition SequenceUpdateDraftResponseDefinitionThe draft configuration, in the same shape as a published definition.
The draft configuration, in the same shape as a published definition.
Pacing SequenceUpdateDraftResponseDefinitionPacingHow the whole sequence paces each step type it sends, keyed by sequence step type.
How the whole sequence paces each step type it sends, keyed by sequence step type.
Steps []SequenceUpdateDraftResponseDefinitionStepUnionEmail, LinkedIn and wait steps in execution order.
Email, LinkedIn and wait steps in execution order.
type SequenceUpdateDraftResponseDefinitionStepObject struct{…}
DeliveryMode stringAUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
How each message is written: AGENT composes it from prompt; TEMPLATE sends template to every contact, with its variables filled in.
type SequenceUpdateDraftResponseDefinitionStepObject2 struct{…}
DeliveryMode stringAUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
Whether the connection request carries a note. A step authored before this setting existed reads as true.
type SequenceUpdateDraftResponseDefinitionStepObject3 struct{…}
DeliveryMode stringAUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
How each message is written: AGENT composes it from prompt; TEMPLATE sends template to every contact, with its variables filled in.
Template SequenceUpdateDraftResponseDefinitionStepObject3TemplateThe email every contact receives.
The email every contact receives.
type SequenceUpdateDraftResponseDefinitionStepObject4 struct{…}
DeliveryMode stringAUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
How each message is written: AGENT composes it from prompt; TEMPLATE sends template to every contact, with its variables filled in.
type SequenceUpdateDraftResponseDefinitionStepObject5 struct{…}
DeliveryMode stringAUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.
Whether the connection request carries a note. A step authored before this setting existed reads as true.
How each message is written: AGENT composes it from prompt; TEMPLATE sends template to every contact, with its variables filled in.
PublishWarnings []SequenceUpdateDraftResponsePublishWarningWhat 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.
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 stringWhat publishing would change.
What publishing would change.
Reviewers []SequenceUpdateDraftResponseReviewerExtra 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.
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.
Update a sequence draft
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"),
)
sequenceUpdateDraftResponse, err := client.Sequence.UpdateDraft(
context.TODO(),
"id",
githubcomlightfldlightfieldgo.SequenceUpdateDraftParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", sequenceUpdateDraftResponse.Channels)
}
{
"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"
}Returns Examples
{
"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"
}