Skip to main content
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:
  1. Sequences are created by users in the web app
  2. The API client lists the sequences via API applying the necessary filters
  3. Collect the sequences from response.sequences
  4. Iterate the endpoint through response._links.next.href while respecting the Retry-After HTTP Header
  5. Add leads to the desired sequences

Sequences Endpoints

List Sequences

Sequence Object

dynamic_fields_used can include more fields than are strictly required to add a lead. It lists every field the sequence’s active stages reference, including ones that have a fallback and therefore don’t need to be present on every lead:
  • Fields referenced only inside a conditional block (e.g. {% if custom_field_1 %}...{% elsif custom_field_2 %}...{% endif %}) — the sequence renders fine even if none of them are present on a given lead, since the block is simply skipped.
  • Fields with a Liquid default filter (e.g. {{ company_name | default: "there" }}) — the sequence falls back to the default value when the field is missing.
Treat this list as “fields the sequence may use,” not “fields every lead must have” — if a field that is actually required is missing for a lead, adding it will fail with the missing_lead_field error described below.

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 traverse them all and can be done using the links such as: response._links.next.href (e.g. GET /sequences?page[after]=e6890fa2c0453fd2691c06170293131678deb47b&page[size]=20).
  • 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.
This endpoint does not enrich the lead information, it only uses the information sent in the payload. Refer to the People Search guide if you need to gather more information, or the Email Validation guide to ensure the email is valid.
This endpoint does not update leads already in sequence, it can only add new ones

Choosing the sequence

A sequence is identified by its id, which is used in the POST request:
To retrieve it, you have two options:
  1. Use the “List Sequences” endpoint
  2. 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 is cb4925debf37ccb6ae1244317697e0f

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 an email or linkedin_url field at the root level of the object. These properties are used to check multiple conditions, including exclusion lists and whether they are already present in other sequences. If you do not have either one, you may omit the field or set it to null. Other supported properties:
    • data: holds other lead data fields, such as first_name and company_domain
    • overrides: used to bypass certain safety checks. It can be omitted completely or partially, and the default value is false 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 administrator
      • ignore_exclusion_list: whether to override the exclusion list
      • ignore_duplicate_leads_in_other_draft_sequences: whether to bypass the check for leads with the same email or linkedin_url present in other draft sequences
      • ignore_duplicate_leads_in_other_active_sequences: whether to bypass the check for leads with the same email or linkedin_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 settings
      • custom_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 is custom_mailboxes, this property will be used to assign the leads to the respective users and mailboxes. Otherwise, this property is ignored.
If you are trying to add leads to a sequence which has email stages, with no conditional logic, the lead must have the email field set

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 1024 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:

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:
    Checks corresponding to in_exclusion_list_and_skipped, recently_contacted_and_skipped, in_other_draft_sequences_and_skipped, and in_other_active_sequences_and_skipped can be bypased by using the overrides 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 property validation_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:

Common errors and pitfalls

  • Invalid email field: do not use placeholder values like "unknown" or "N/A". It is best to ommit the field or set it to null.
  • Linkedin URL field: to be used as an identifier of the lead, it should be put at the top level of the lead, not inside the data part of the lead.