Skip to Content
My App
Api

Flow

Enroll a contact into an automation flow (chatbot) and manage your flows through the API.

GET
/flows

Authorization

http
headerAuthorizationBearer <token>

Response Body

application/json
  1. response
data*array<string>
meta*
Example Request
curl -X GET 'https://aexrux.com/api/v1/flows'
Example Response200
{  "data": [    "string"  ],  "meta": {    "count": 0  }}
GET
/flows/{id}

Authorization

http
headerAuthorizationBearer <token>

Path Parameters

id*integer

Response Body

application/json
  1. response
data*array<unknown>
meta*string
Example Request
curl -X GET 'https://aexrux.com/api/v1/flows/0'
Example Response
{  "data": [    null  ],  "meta": "string"}
POST
/flows/{id}/enroll

Authorization

http
headerAuthorizationBearer <token>

Path Parameters

id*integer

Request Body

application/json
  1. body

Enroll a contact into a flow. Scramble reads these rules to document the request body. Identify the contact by contact_id (a contact already in the workspace) OR by phone (the contact is looked up by its E.164 number). Exactly one is required; the controller resolves it to a Contact and hands it to FlowEnrollmentService::enroll().

contact_id?|

Id of an existing contact in the workspace. Required unless phone is given.

phone?|

Contact phone in international format (digits, E.164). Used to look up the contact when contact_id is omitted. Required unless contact_id is given.

Lengthlength <= 32

Response Body

application/json
  1. response
data*
meta*string
Example Request
curl -X POST 'https://aexrux.com/api/v1/flows/0/enroll' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "data": {    "flow_id": "string",    "contact_id": 0,    "subscriber_id": "string",    "status": "string",    "enrolled_at": "string"  },  "meta": "string"}
GET
/flows/{id}/subscribers

Authorization

http
headerAuthorizationBearer <token>

Path Parameters

id*integer

Response Body

application/json
  1. response
data*array<string>
meta*
Example Request
curl -X GET 'https://aexrux.com/api/v1/flows/0/subscribers'
Example Response
{  "data": [    "string"  ],  "meta": {    "count": 0,    "counts": {      "active": 0,      "paused": 0,      "completed": 0,      "failed": 0    }  }}