POST
/
sequences
curl --request POST \
  --url http://localhost:8080/sequences \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "steps": [
    {
      "action": {
        "type": "send_emails",
        "data": {
          "from_email": "no-reply@hello.opencopilot.so",
          "email_body": "Hello!",
          "email_sender_name": "OpenCX Team",
          "email_subject": "Welcome to OpenCX!",
          "email_is_transactional": false
        }
      },
      "delay_in_minutes": 2
    }
  ],
  "filter": {
    "or": [
      {
        "and": [
          {
            "type": "contacts_created_at_between",
            "before": "2025-03-08T22:05:24.512Z",
            "after": "2025-03-08T22:05:24.512Z"
          }
        ]
      }
    ]
  }
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
filter
object | null
required

A combination of contact filters. All filters within and arrays must apply to a contact in order for the contact to be included. On the other hand, only one of the filters within the or array must apply for the contact to be included. If no filter is provided, all contacts will be included.

steps
object[]
required
name
string
default:New Sequence
custom_id
string
is_continuous
boolean
default:true

Response

201
application/json
id
string
required