Sequences
Learn how to use sequences.
Sequences can be used to engage with leads. They must be created by users via web app, while leads can also be programmatically added into existing sequences.
Example flow:
-
Sequences are created by users in the web app
-
The API client lists the sequences via API applying the necessary filters
-
Collect the sequences from
response.sequences
-
Iterate the endpoint through
response._links.next.href
while respecting theRetry-After
HTTP Header -
Add leads to the desired sequences
Sequences Endpoints
List Sequences
Sequence Object
Field | Type | Description |
---|---|---|
id | string | The ID of the Sequence |
name | string | The name of the Sequence |
status | string | The status of the Sequence: |
active : The sequence is live and can accept new leads | ||
draft : The sequence is not launched yet and cannot accept leads programmatically | ||
archived : The sequence is archived and cannot accept leads programmatically | ||
archiving : The sequence is being archived and cannot accept leads programmatically | ||
paused : The sequence is paused and can accept new leads | ||
pausing : The sequence is being paused and cannot accept leads programmatically | ||
resuming : The sequence is being resumed and cannot accept leads programmatically | ||
created_at | string | The creation date in ISO 8601 |
updated_at | string | The last update date in ISO 8601 |
created_by_user_id | string | The user id of the creator of the Sequence (refer to the Users API) |
created_by_user_email | string | The email of the creator of the Sequence |
_links | array of links | Contains useful links related to this resource |
Request format
Retrieve a list of Sequences:
Sequences can be filtered using
name
(case insensitive search)status
created_by_user_id
created_by_user_email
Response
This will return a 200 OK
with a list of Sequences:
If the result set contains more entries than the page size, then pagination is required transverse them all and can be done using the links such as: response._links.next.href
(e.g. GET /sequences/81f63c2e-edbd-4c1a-9168-542ede3ce98f?page[size]=100&page[after]=81f63c2e-edbd-4c1a-9168-542ede3ce98a
).
Links
-
self
-GET
points back to the same object -
next
-GET
points to the next page of entries, when available -
prev
-GET
points to the previous page of entries, when available
Add leads to a Sequence
This endpoint allows users to add one or more leads to an existing active sequence in Amplemarket. It supports flexible lead management with customizable distribution settings, real-time validations, and asynchronous processing for improved scalability.
For specific API details, please refer to the API specification.
Choosing the sequence
A sequence is identified by its id
, which is used in the POST
request:
To retrieve it, you have two options:
- Use the “List Sequences” endpoint
- Go to the Amplemarket Dashboard, navigate to Sequences, and choose your Sequence.
- In the URL bar of your browser, you will find a URL that looks like this:
https://app.amplemarket.com/dashboard/sequences/cb4925debf37ccb6ae1244317697e0f
- In this case, the sequence
id
iscb4925debf37ccb6ae1244317697e0f
Request format
The request has two main properties:
leads
: An array of objects, each of them representing a lead to be added to the sequence. Each lead object must include at least anemail
orlinkedin_url
field. These properties are used to check multiple conditions, including exclusion lists and whether they are already present in other sequences. Other supported properties:data
: holds other lead data fields, such asfirst_name
andcompany_domain
overrides
: used to bypass certain safety checks. It can be omitted completely or partially, and the default value isfalse
for each of the following overrides:ignore_recently_contacted
: whether to override the recently contacted check. Note that the time range used for considering a given lead as “recently contacted” is an account-wide setting managed by your Amplemarket account administratorignore_exclusion_list
: whether to override the exclusion listignore_duplicate_leads_in_other_draft_sequences
: whether to bypass the check for leads with the sameemail
orlinkedin_url
present in other draft sequencesignore_duplicate_leads_in_other_active_sequences
: whether to bypass the check for leads with the sameemail
orlinkedin_url
present in other active or paused sequences
settings
: an optional object storing lead distribution configurations affecting all leads:leads_distribution
: a string that can have 2 values:sequence_senders
: (default) the leads will be distributed across the mailboxes configured in the sequence settingscustom_mailboxes
: the leads will be distributed across the mailboxes referred to by the/settings/mailboxes
property, regardless of the sequence setting.
mailboxes
: an array of email addresses, that must correspond to mailboxes connected to the Amplemarket account. If/settings/leads_distribution
iscustom_mailboxes
, this property will be used to assign the leads to the respective users and mailboxes. Otherwise, this property is ignored.
Request limits
Each request can have up to 250 leads, if you try to send more, the request will fail with an HTTP 400.
Besides the email
and linkedin_url
, each lead can have up to 50 data fields on the data
object.
Both the data field names and values must be of the type String
, field names can be up to 255 characters while values can be up to 512 characters.
The names of the data fields can only have lowercase letters, numbers or underscores (_
),
and must start with a letter. Some examples of rejected data field names:
Rejected | Accepted | Explanation |
---|---|---|
FirstName | first_name | Only lowercase letters are accepted |
first name | first_name | Spaces are not accepted |
3_letter_name | three_letter_name | Must start with a letter |
_special_field | special_field | Must start with a letter |
Request example
Response format
There are 3 potential outcomes:
-
The request is successful, and it returns the number of leads that were added and skipped due to safety checks. Example:
Property name Explanation total
Total number of lead objects in the request total_added_to_sequence
Total number of leads added to the sequence duplicate_emails
List of email addresses that appeared duplicated in the request. Leads with duplicate emails will be skipped and not added to the sequence duplicate_linkedin_urls
List of LinkedIn URLs that appeared duplicated in the request. Leads with duplicate LinkedIn URLs will be skipped and not added to the sequence in_exclusion_list_and_skipped
List of lead objects (with just the email
andlinkedin_url
fields) that were in the account exclusion list, and therefore not added to the sequencerecently_contacted_and_skipped
List of lead objects (with just the email
andlinkedin_url
fields) that were recently contacted by the account, and therefore not added to the sequencealready_in_sequence_and_skipped
List of lead objects (with just the email
andlinkedin_url
fields) that are already present in the sequence with the same contact fields, and therefore not added to the sequencein_other_draft_sequences_and_skipped
List of lead objects (with just the email
andlinkedin_url
fields) that are present in other draft sequences of the account, and therefore skippedin_other_active_sequences_and_skipped
List of lead objects (with just the email
andlinkedin_url
fields) that are present in other active sequences of the account, and therefore skippedChecks corresponding toin_exclusion_list_and_skipped
,recently_contacted_and_skipped
,in_other_draft_sequences_and_skipped
, andin_other_active_sequences_and_skipped
can be bypased by using theoverrides
property on the lead object -
The request was malformed in itself. In that case, the response will have the HTTP Status code
400
, and the body will contain an indication of the error, following the standard format. -
The request was correctly formatted, but due to other reasons the request cannot be completed. The response will have the HTTP Status code
422
, and a single propertyvalidation_errors
, which can indicate one or more problems. Example
Error codes and their explanations
All error_code
values have an associated message giving more details about the specific cause of failure.
Some of the errors include:
error_code | Description |
---|---|
"invalid_sequence_status" | The sequence is in a status that does not allow adding new leads with this method. That typically is because the sequence is in the “Draft” or “Archived” states |
"missing_ai_credits" | Some of the sequence users do not have enough credits to support additional leads |
"missing_feature_copywriter" | Some of the sequence users do not have access to Duo features, and the sequence is using Duo Copywriter email stages or Duo Voice stages |
"missing_feature_dialer" | The sequence has a phone call stage, and some of the users do not have a Dialer configured |
"missing_linkedin_account" | The sequence has a stage that requires a LinkedIn account (such as Duo Copywriter or automatic LinkedIn stages), and not all sequence users have connected their LinkedIn account to Amplemarket |
"missing_voice_clone" | The sequence has a Duo Voice stage, but a sequence user does not have an usable voice clone configured |
"missing_lead_field" | The sequence requires a lead data field that was not provided in the request (such as an email address when there are email stages, or a data field used in the text) |
"missing_sender_field" | The sequence requires a sender data field that a sequence user has not filled in yet |
"mailbox_unusable" | A mailbox was selected to be used, but it cannot be used (e.g. due to disconnection or other errors) |
"max_leads_threshold_reached" | Adding all the leads would make the sequence go over the account-wide per-sequence lead limit |
"other_validation_error" | An unexpected validaton error has occurred |
Was this page helpful?