# Create a channel

API call format

POST /channels
{
  "workflows": [
    "string"
  ]
}

Description

To create a channel we need to use the POST /channels endpoint. As we can see from the sample above, the workflow ID's are being sent as an array. This allows for starting multiple channels at once.

Precondition:

In order to start a channel successfully a few things need to be present.

  • Authorization token or API key.
  • At least one workflow id:
    • <workflow_id> - valid workflow id. Take a workflow id using Workflow List API call.
    • The initial workflow status should be NOT_CREATED.

Postcondition:

  • On success response code should be 200
  • On success the created channel initial status will be returned.
  • On failure an error will be returned with the right error code and description.

Example:

[Request] POST /channels
{
  "workflows": [
    "string"
  ]
}
[Request Headers] {"Content-Type":"application/json","Accept":"application/json","Authorization":"<IdToken>"}
[Page] https://<base_api_url>/channels
[Response] 200
[Request Cookies] []
[Response Headers] {"Content-Type":["application/json"],"Content-Length":["28"],"Connection":["keep-alive"],....}
[Response] 
{
    "channelStatus":"CREATING"
}

Hints The initial state returned by this call is "channelStatus":"CREATING". We may poll this status repeatedly until we get the final state "RUNNING".