Skip to main content
PUT
/
v1
/
accounts
/
{accountId}
/
workflows
/
{workflowId}
/
versions
/
{versionId}
Edit a version of a Workflow
curl --request PUT \
  --url https://api.sakari.io/v1/accounts/{accountId}/workflows/{workflowId}/versions/{versionId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "nodes": [
    {
      "id": "<string>",
      "type": {},
      "config": {
        "message": "<string>",
        "groups": [
          {
            "id": "<string>",
            "name": "<string>",
            "phoneNumbers?": [
              {}
            ],
            "notifications": [
              {}
            ],
            "tags": [
              "<string>"
            ],
            "users": [
              {}
            ],
            "senders": [
              {}
            ],
            "officeHours": {
              "active": true,
              "timezone": "<string>",
              "times": {}
            },
            "isDefault": true,
            "useSharedPool": true
          }
        ]
      }
    }
  ],
  "edges": [
    {
      "id": "<string>",
      "type": "standard",
      "source": "<string>",
      "target": "<string>",
      "value": "<string>"
    }
  ],
  "properties": [
    {
      "name": "<string>",
      "dataType": "string",
      "created": {
        "at": "2023-11-07T05:31:56Z"
      }
    }
  ]
}'
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "definition": {
      "nodes": [
        {
          "id": "<string>",
          "type": {
            "id": "<string>",
            "type": "<string>",
            "group": "<string>",
            "name": "<string>",
            "label": "<string>",
            "description": "<string>",
            "icon": "<string>",
            "properties": [
              {
                "label": "<string>",
                "helperText": "<string>",
                "link": "<string>",
                "type": "basictext",
                "mandatory": true,
                "args": [
                  "<string>"
                ],
                "options": [
                  {}
                ],
                "min": 123,
                "max": 123,
                "defaultValue": "<string>",
                "name": "<string>",
                "conditions": [
                  {}
                ]
              }
            ],
            "outputs": [
              {
                "default": true,
                "path": "<string>",
                "name": "<string>",
                "dataType": "boolean"
              }
            ],
            "validation": {
              "numEdgeCondition": "exactly",
              "numEdges": 123,
              "edges": [
                {
                  "type": "timeout",
                  "value": {
                    "mandatory": true,
                    "editable": true,
                    "value": "<any>",
                    "default": "<any>"
                  },
                  "multiple": true,
                  "defaultEdge": true
                }
              ]
            },
            "supportsReenrollment": true,
            "color": "<string>",
            "status": "<string>",
            "supportLink": "<string>"
          },
          "config": {
            "message": "<string>",
            "groups": [
              {
                "id": "<string>",
                "name": "<string>",
                "phoneNumbers?": [
                  "<any>"
                ],
                "notifications": [
                  "<any>"
                ],
                "tags": [
                  "<any>"
                ],
                "users": [
                  "<any>"
                ],
                "senders": [
                  "<any>"
                ],
                "officeHours": {},
                "isDefault": true,
                "useSharedPool": true
              }
            ]
          }
        }
      ],
      "edges": [
        {
          "id": "<string>",
          "type": "standard",
          "source": "<string>",
          "target": "<string>",
          "value": "<string>"
        }
      ],
      "properties": [
        {
          "name": "<string>",
          "dataType": "string",
          "created": {
            "at": "2023-11-07T05:31:56Z"
          }
        }
      ]
    },
    "readonly": true,
    "active": "2023-11-07T05:31:56Z",
    "lastActive": "2023-11-07T05:31:56Z",
    "created": {
      "at": "<any>",
      "by": "<any>"
    },
    "updated": {
      "at": "<any>",
      "by": "<any>"
    }
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

accountId
string
required

Account to apply operations to

workflowId
string
required

Workflow to apply operations to

versionId
string
required

Workflow version to apply operations to

Body

application/json
nodes
object[]
required
edges
object[]
required
properties
object[]

Response

successful operation

success
boolean
required
data
object
required