myCRMSIM

myCRMSIM API 1.0

Get Started
​
No token

Validate a plan

POST

/api/v1/ext/workflows/validate

Dry-run a plan: the problems it has. Nothing is saved.

Auth: Bearer access_token
Scope: automations.read

A plan is a list of named steps. Each step has a unique name, a type from the Node catalog, optional data (only the fields you want to set — the rest take the type's defaults), and points at the next step by name: next for a single path, branches for a step that splits (ifElse: true / false; findContact: found / notFound). A plan may start with one trigger of each type (several triggers must all point at the same first step), or with none — then contacts enter only through Add contacts to a workflow. envelope is optional: name, stopOnReply, allowReEntry, executionWindow. Its status is ignored; a new workflow is always a draft. Each issue names the step it is about. A plan with no issues is what Create workflow accepts.

Parameters

NameInTypeRequiredDescription
plan
body
object
yes
{ steps: [...], envelope?: {...} } — at most 200 steps.

Responses

StatusWhen
200
Valid
200
Has problems
400
Not a plan
401
Missing or invalid token
403
Missing scope
Request
curl -X POST "https://backend.mysmsgateway.app/api/v1/ext/workflows/validate" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "plan": {
    "steps": [
      {
        "name": "contactCreated",
        "type": "contactCreated",
        "next": "welcome"
      },
      {
        "name": "welcome",
        "type": "sendSMS",
        "data": {
          "message": "Hi {{contact.first_name}}, thanks for signing up!"
        },
        "next": "wait1"
      },
      {
        "name": "wait1",
        "type": "wait",
        "data": {
          "waitType": "duration",
          "delay": 86400000,
          "delayValue": 1,
          "delayUnit": "days"
        },
        "next": "tag"
      },
      {
        "name": "tag",
        "type": "addTag",
        "data": {
          "tags": [
            "welcomed"
          ]
        },
        "next": null
      }
    ],
    "envelope": {
      "name": "Welcome new contacts",
      "stopOnReply": true
    }
  }
}'
Responses
Valid
{
  "success": true,
  "data": {
    "valid": true,
    "issues": [],
    "step_count": 4
  }
}
Try It!
This endpoint needs a bearer token. Open Settings (top right) and paste your access_token.
Body (JSON)
Request URL
POSThttps://backend.mysmsgateway.app/api/v1/ext/workflows/validate
Previous

« Node catalog

Next

Create workflow »