Activate workflow
curl --request POST \
--url https://api.example.com/v1/workflows/{workflow_id}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 1
}
'import requests
url = "https://api.example.com/v1/workflows/{workflow_id}/activate"
payload = { "expected_revision": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expected_revision: 1})
};
fetch('https://api.example.com/v1/workflows/{workflow_id}/activate', 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://api.example.com/v1/workflows/{workflow_id}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_revision' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.example.com/v1/workflows/{workflow_id}/activate"
payload := strings.NewReader("{\n \"expected_revision\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.example.com/v1/workflows/{workflow_id}/activate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/workflows/{workflow_id}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_revision\": 1\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workflow": {
"id": "<string>",
"projectId": "<string>",
"title": "<string>",
"description": "<string>",
"ownerUserId": "<string>",
"status": "<string>",
"executionFormat": "<string>",
"outputFolder": "<string>",
"revision": 123,
"activeVersionId": "<string>",
"triggers": [
{
"id": "<string>",
"type": "<string>",
"label": "<string>",
"enabled": true,
"params": {},
"schedule": {
"type": "<string>",
"zoneId": "<string>",
"cronExpression": "<string>",
"everyMinutes": 123,
"timeOfDay": "<string>",
"runDate": "<string>",
"anchorDate": "<string>",
"daysOfWeek": [
"<string>"
],
"dayOfMonth": 123,
"interval": 123
}
}
],
"steps": [
{
"id": "<string>",
"position": 123,
"type": "<string>",
"targetFileId": "<string>",
"config": {},
"targets": [
{
"kind": "email_to",
"value": "<string>",
"displayName": "<string>"
}
]
}
],
"graph": {},
"createdAt": "<string>",
"updatedAt": "<string>"
},
"version": {
"id": "<string>",
"workflowId": "<string>",
"versionNumber": 123,
"executionFormat": "<string>",
"sourceRevision": 123,
"createdBy": "<string>",
"createdAt": "<string>"
}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}Workflows
Activate workflow
Freeze the workflow as it stands into a new version, make that the version it runs, and set it active. From here its schedules fire that frozen definition, so this can start sending outbound email and Slack messages to the recipients the workflow names. Later edits do not change what an activated workflow runs — activate again to ship them.
POST
/
v1
/
workflows
/
{workflow_id}
/
activate
Activate workflow
curl --request POST \
--url https://api.example.com/v1/workflows/{workflow_id}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 1
}
'import requests
url = "https://api.example.com/v1/workflows/{workflow_id}/activate"
payload = { "expected_revision": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expected_revision: 1})
};
fetch('https://api.example.com/v1/workflows/{workflow_id}/activate', 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://api.example.com/v1/workflows/{workflow_id}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_revision' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.example.com/v1/workflows/{workflow_id}/activate"
payload := strings.NewReader("{\n \"expected_revision\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.example.com/v1/workflows/{workflow_id}/activate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/workflows/{workflow_id}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_revision\": 1\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workflow": {
"id": "<string>",
"projectId": "<string>",
"title": "<string>",
"description": "<string>",
"ownerUserId": "<string>",
"status": "<string>",
"executionFormat": "<string>",
"outputFolder": "<string>",
"revision": 123,
"activeVersionId": "<string>",
"triggers": [
{
"id": "<string>",
"type": "<string>",
"label": "<string>",
"enabled": true,
"params": {},
"schedule": {
"type": "<string>",
"zoneId": "<string>",
"cronExpression": "<string>",
"everyMinutes": 123,
"timeOfDay": "<string>",
"runDate": "<string>",
"anchorDate": "<string>",
"daysOfWeek": [
"<string>"
],
"dayOfMonth": 123,
"interval": 123
}
}
],
"steps": [
{
"id": "<string>",
"position": 123,
"type": "<string>",
"targetFileId": "<string>",
"config": {},
"targets": [
{
"kind": "email_to",
"value": "<string>",
"displayName": "<string>"
}
]
}
],
"graph": {},
"createdAt": "<string>",
"updatedAt": "<string>"
},
"version": {
"id": "<string>",
"workflowId": "<string>",
"versionNumber": 123,
"executionFormat": "<string>",
"sourceRevision": 123,
"createdBy": "<string>",
"createdAt": "<string>"
}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Body
application/json
The revision you last read. Activation freezes the workflow as it stands, so a revision you have not seen is refused rather than frozen under your name.
Required range:
x >= 0Response
Successful Response
Show child attributes
Show child attributes