Skip to main content
PUT
/
api
/
v1
/
workflow
/
{workflow_id}
/
status
Update Workflow Status
curl --request PUT \
  --url https://app.asisso.com/api/v1/workflow/{workflow_id}/status \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "<string>"
}
'
import requests

url = "https://app.asisso.com/api/v1/workflow/{workflow_id}/status"

payload = { "status": "<string>" }
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({status: '<string>'})
};

fetch('https://app.asisso.com/api/v1/workflow/{workflow_id}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.asisso.com/api/v1/workflow/{workflow_id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'status' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://app.asisso.com/api/v1/workflow/{workflow_id}/status"

payload := strings.NewReader("{\n \"status\": \"<string>\"\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://app.asisso.com/api/v1/workflow/{workflow_id}/status")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.asisso.com/api/v1/workflow/{workflow_id}/status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "name": "<string>",
  "status": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "workflow_definition": {},
  "current_definition_id": 123,
  "template_context_variables": {},
  "call_disposition_codes": {
    "disposition_codes": []
  },
  "total_runs": 123,
  "workflow_configurations": {},
  "version_number": 123,
  "version_status": "<string>",
  "workflow_uuid": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
Send {"status": "archived"} to deactivate an agent, or {"status": "active"} to restore it. Archived agents cannot receive calls but their history and definition are preserved.

Headers

authorization
string | null
X-API-Key
string | null

Path Parameters

workflow_id
integer
required

Body

application/json
status
string
required

Response

Successful Response

id
integer
required
name
string
required
status
string
required
created_at
string<date-time>
required
workflow_definition
Workflow Definition · object
required
current_definition_id
integer | null
required
template_context_variables
Template Context Variables · object | null
call_disposition_codes
CallDispositionCodes · object | null
total_runs
integer | null
workflow_configurations
Workflow Configurations · object | null
version_number
integer | null
version_status
string | null
workflow_uuid
string | null