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 Sequence errors.
Required scope: sequences:create
Rate limit category: Write
ParametersExpand Collapse
body SequenceNewParams
Definition param.Field[SequenceNewParamsDefinition]Configuration of the first draft. description and steps are required.
Configuration of the first draft. description and steps are required.
Steps []SequenceNewParamsDefinitionStepUnionThe ordered step list.
The ordered step list.
type SequenceNewParamsDefinitionStepObject 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. 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 SequenceNewParamsDefinitionStepObject2 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. 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 SequenceNewParamsDefinitionStepObject3 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 SequenceNewParamsDefinitionStepObject3TemplateThe 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.
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 SequenceNewParamsDefinitionStepObject4 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 SequenceNewParamsDefinitionStepObject4TemplateThe 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.
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 SequenceNewParamsDefinitionStepObject5 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 SequenceNewParamsDefinitionStepObject5TemplateThe 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.
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.
Messaging SequenceNewParamsDefinitionMessagingOptionalMessaging inputs that frame every step. Omitted or null fields are left unset.
Messaging inputs that frame every step. Omitted or null fields are left unset.
Pacing SequenceNewParamsDefinitionPacingOptionalHow the whole sequence paces each step type it sends, keyed by sequence step type. Omitted step types have no daily cap.
How the whole sequence paces each step type it sends, keyed by sequence step type. Omitted step types have no daily cap.
ReturnsExpand Collapse
type SequenceCreateResponse struct{…}
Definition SequenceCreateResponseDefinitionThe draft configuration, in the same shape as a published definition.
The draft configuration, in the same shape as a published definition.
Pacing SequenceCreateResponseDefinitionPacingHow 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 []SequenceCreateResponseDefinitionStepUnionEmail, LinkedIn and wait steps in execution order.
Email, LinkedIn and wait steps in execution order.
type SequenceCreateResponseDefinitionStepObject 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.
type SequenceCreateResponseDefinitionStepObject2 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 SequenceCreateResponseDefinitionStepObject3 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 SequenceCreateResponseDefinitionStepObject3TemplateThe email every contact receives.
The email every contact receives.
type SequenceCreateResponseDefinitionStepObject4 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 SequenceCreateResponseDefinitionStepObject5 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 []SequenceCreateResponsePublishWarningWhat 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 []SequenceCreateResponseReviewerExtra 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.
Create a sequence
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)
}
{
"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"
}