curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-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.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"workflow_id": "68b1c0d4e7b91d003c45a1f2",
"status": "active",
"message": "The schedule already ended, so the workflow stayed inactive."
}Toggle workflow status
Toggles a workflow between active and inactive, based on whichever it currently is.
Pass status=active or status=inactive to set a specific status. Repeating the same target also finishes any pending hook policy synchronization after a failed request.
If you omit status, this flips the current status; two calls in a row land you back where you started.
For ordinary workflows, pausing removes the schedule and stops the trigger. For before-action workflows (hooks), pausing blocks the protected app operation until an active hook replaces it.
Starting a workflow again requires a plan that includes workflows, but pausing doesn’t, so a workspace that has lost the capability can still stop a workflow it can no longer start.
Archived workflows cannot be toggled. Restore one first with Restore workflow.
Toggling in either direction, including pausing, is only allowed from the app’s main branch.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-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.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/workflows/{workflow_id}/toggle-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"workflow_id": "68b1c0d4e7b91d003c45a1f2",
"status": "active",
"message": "The schedule already ended, so the workflow stayed inactive."
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Path Parameters
ID of the app whose workflows you want to work with.
ID of the workflow, as returned in id by List workflows.
Query Parameters
Set this status instead of toggling. Repeat the same value to safely retry a hook status change.
active, inactive Response
The workflow's new status.
ID of the workflow.
"68b1c0d4e7b91d003c45a1f2"
The status the workflow actually landed in, which is not always the one you asked for.
"active"
Why a restored workflow did not come back active, written for a person to read. This is null when you toggled the status yourself.
"The schedule already ended, so the workflow stayed inactive."
Was this page helpful?