Skip to main content
POST
/
v1
/
accounts
/
{accountId}
/
workflows
/
{workflowId}
/
nodes
Create a node for a version of the workflow
curl --request POST \
  --url https://api.sakari.io/v1/accounts/{accountId}/workflows/{workflowId}/nodes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "type": {},
  "config": {
    "message": "<string>",
    "groups": [
      {
        "id": "<string>",
        "name": "<string>",
        "phoneNumbers?": [
          {
            "id": "<string>",
            "status": "<string>",
            "number": "<string>",
            "country": "<string>",
            "type": "<string>",
            "name": "<string>",
            "verified": true,
            "provider": "<string>",
            "supportedDestinations": [
              "<string>"
            ],
            "forwardTo": {},
            "universalReply": true,
            "channels": {
              "sms": {
                "active": true,
                "universalReply": true,
                "supportedDestinations": {},
                "regulatory": {
                  "brandStatus": "<string>",
                  "campaign": {
                    "id": "<string>",
                    "campaignId": "<string>",
                    "useCase": "<string>"
                  },
                  "pft": true,
                  "submitted": "2023-11-07T05:31:56Z",
                  "approved": "2023-11-07T05:31:56Z",
                  "rejected": "2023-11-07T05:31:56Z"
                }
              },
              "voice": {
                "active": true,
                "incoming": {
                  "action": "forward",
                  "forwardTo": "<string>",
                  "message": "<string>",
                  "transcribe": true
                },
                "features": [
                  "<string>"
                ]
              },
              "whatsapp": {
                "active": true
              }
            },
            "groups": [
              {
                "id": "<string>",
                "name": "<string>"
              }
            ],
            "hosted": true
          }
        ],
        "notifications": [
          {
            "integration": "<string>"
          }
        ],
        "tags": [
          "<string>"
        ],
        "users": [
          {
            "email": "chris@sakari.io",
            "role": "Administrator",
            "firstName": "Chris",
            "lastName": "Bloggs",
            "tacAccepted": "2023-11-07T05:31:56Z"
          }
        ],
        "senders": [
          {
            "id": "<string>",
            "type": "phonenumber",
            "subType": "<string>",
            "status": "<string>",
            "identifier": "<string>",
            "channels": {
              "sms": {
                "active": true,
                "universalReply": true,
                "supportedDestinations": {},
                "regulatory": {
                  "brandStatus": "<string>",
                  "campaign": {
                    "id": "<string>",
                    "campaignId": "<string>",
                    "useCase": "<string>"
                  },
                  "pft": true,
                  "submitted": "2023-11-07T05:31:56Z",
                  "approved": "2023-11-07T05:31:56Z",
                  "rejected": "2023-11-07T05:31:56Z"
                }
              },
              "voice": {
                "active": true,
                "incoming": {
                  "action": "forward",
                  "forwardTo": "<string>",
                  "message": "<string>",
                  "transcribe": true
                },
                "features": [
                  "<string>"
                ]
              },
              "whatsapp": {
                "active": true
              }
            },
            "groups": [
              {
                "id": "<string>",
                "name": "<string>"
              }
            ]
          }
        ],
        "officeHours": {
          "active": true,
          "timezone": "<string>",
          "times": {
            "sun": [
              {
                "start": {
                  "hour": 123,
                  "minute": 123
                },
                "end": {
                  "hour": 123,
                  "minute": 123
                }
              }
            ],
            "mon": [
              {
                "start": {
                  "hour": 123,
                  "minute": 123
                },
                "end": {
                  "hour": 123,
                  "minute": 123
                }
              }
            ],
            "tue": [
              {
                "start": {
                  "hour": 123,
                  "minute": 123
                },
                "end": {
                  "hour": 123,
                  "minute": 123
                }
              }
            ],
            "wed": [
              {
                "start": {
                  "hour": 123,
                  "minute": 123
                },
                "end": {
                  "hour": 123,
                  "minute": 123
                }
              }
            ],
            "thu": [
              {
                "start": {
                  "hour": 123,
                  "minute": 123
                },
                "end": {
                  "hour": 123,
                  "minute": 123
                }
              }
            ],
            "fri": [
              {
                "start": {
                  "hour": 123,
                  "minute": 123
                },
                "end": {
                  "hour": 123,
                  "minute": 123
                }
              }
            ],
            "sat": [
              {
                "start": {
                  "hour": 123,
                  "minute": 123
                },
                "end": {
                  "hour": 123,
                  "minute": 123
                }
              }
            ]
          }
        },
        "isDefault": true,
        "useSharedPool": true
      }
    ]
  }
}
'
{
  "success": true,
  "data": {
    "edges": [
      {
        "id": "<string>",
        "type": "standard",
        "source": "<string>",
        "target": "<string>",
        "value": "<string>"
      }
    ]
  }
}

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

Body

application/json
id
string
required
type
object
required
config
object
required

Response

successful operation

success
boolean
required
data
object
required