curl --request POST \
--url https://api.range.org/v2/workflows \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"template": "cadoc-5711",
"name": "CADOC 5711 - Range Brasil Ltda",
"enabled": true,
"email": "compliance@example.com",
"channel_id": "3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a",
"recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"report_mode": "always",
"cadence": "daily",
"formats": [
"xml"
],
"fields": {
"cnpj": "99999999"
}
}
'import requests
url = "https://api.range.org/v2/workflows"
payload = {
"template": "cadoc-5711",
"name": "CADOC 5711 - Range Brasil Ltda",
"enabled": True,
"email": "compliance@example.com",
"channel_id": "3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a",
"recipients": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"report_mode": "always",
"cadence": "daily",
"formats": ["xml"],
"fields": { "cnpj": "99999999" }
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template: 'cadoc-5711',
name: 'CADOC 5711 - Range Brasil Ltda',
enabled: true,
email: 'compliance@example.com',
channel_id: '3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a',
recipients: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
report_mode: 'always',
cadence: 'daily',
formats: ['xml'],
fields: {cnpj: '99999999'}
})
};
fetch('https://api.range.org/v2/workflows', 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.range.org/v2/workflows",
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([
'template' => 'cadoc-5711',
'name' => 'CADOC 5711 - Range Brasil Ltda',
'enabled' => true,
'email' => 'compliance@example.com',
'channel_id' => '3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a',
'recipients' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'report_mode' => 'always',
'cadence' => 'daily',
'formats' => [
'xml'
],
'fields' => [
'cnpj' => '99999999'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.range.org/v2/workflows"
payload := strings.NewReader("{\n \"template\": \"cadoc-5711\",\n \"name\": \"CADOC 5711 - Range Brasil Ltda\",\n \"enabled\": true,\n \"email\": \"compliance@example.com\",\n \"channel_id\": \"3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a\",\n \"recipients\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"report_mode\": \"always\",\n \"cadence\": \"daily\",\n \"formats\": [\n \"xml\"\n ],\n \"fields\": {\n \"cnpj\": \"99999999\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.range.org/v2/workflows")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"template\": \"cadoc-5711\",\n \"name\": \"CADOC 5711 - Range Brasil Ltda\",\n \"enabled\": true,\n \"email\": \"compliance@example.com\",\n \"channel_id\": \"3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a\",\n \"recipients\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"report_mode\": \"always\",\n \"cadence\": \"daily\",\n \"formats\": [\n \"xml\"\n ],\n \"fields\": {\n \"cnpj\": \"99999999\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.range.org/v2/workflows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template\": \"cadoc-5711\",\n \"name\": \"CADOC 5711 - Range Brasil Ltda\",\n \"enabled\": true,\n \"email\": \"compliance@example.com\",\n \"channel_id\": \"3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a\",\n \"recipients\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"report_mode\": \"always\",\n \"cadence\": \"daily\",\n \"formats\": [\n \"xml\"\n ],\n \"fields\": {\n \"cnpj\": \"99999999\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "9b2f7c61-2d4e-4a8b-9f10-3c5d7e9a1b2c",
"name": "CADOC 5711 - Range Brasil Ltda",
"email": "compliance@example.com",
"recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enabled": true,
"report_mode": "<string>",
"cadence": "daily",
"formats": [
"<string>"
],
"fields": {
"cnpj": "99999999"
},
"created_at": "2026-08-25T00:00:00.000Z",
"updated_at": "2026-08-25T00:00:00.000Z",
"updated_by": "user@example.com"
}Create a workflow instance
Creates one instance of a template for the caller workspace. Email and the template required fields (cnpj for CADOC) are mandatory; cadence and formats are fixed by the template: 5711 daily XML, 5710 month-end JSON. Optional recipients select existing delivery channels. report_mode accepts always or exception_only; unsupported overrides return 400.
curl --request POST \
--url https://api.range.org/v2/workflows \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"template": "cadoc-5711",
"name": "CADOC 5711 - Range Brasil Ltda",
"enabled": true,
"email": "compliance@example.com",
"channel_id": "3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a",
"recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"report_mode": "always",
"cadence": "daily",
"formats": [
"xml"
],
"fields": {
"cnpj": "99999999"
}
}
'import requests
url = "https://api.range.org/v2/workflows"
payload = {
"template": "cadoc-5711",
"name": "CADOC 5711 - Range Brasil Ltda",
"enabled": True,
"email": "compliance@example.com",
"channel_id": "3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a",
"recipients": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"report_mode": "always",
"cadence": "daily",
"formats": ["xml"],
"fields": { "cnpj": "99999999" }
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template: 'cadoc-5711',
name: 'CADOC 5711 - Range Brasil Ltda',
enabled: true,
email: 'compliance@example.com',
channel_id: '3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a',
recipients: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
report_mode: 'always',
cadence: 'daily',
formats: ['xml'],
fields: {cnpj: '99999999'}
})
};
fetch('https://api.range.org/v2/workflows', 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.range.org/v2/workflows",
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([
'template' => 'cadoc-5711',
'name' => 'CADOC 5711 - Range Brasil Ltda',
'enabled' => true,
'email' => 'compliance@example.com',
'channel_id' => '3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a',
'recipients' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'report_mode' => 'always',
'cadence' => 'daily',
'formats' => [
'xml'
],
'fields' => [
'cnpj' => '99999999'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.range.org/v2/workflows"
payload := strings.NewReader("{\n \"template\": \"cadoc-5711\",\n \"name\": \"CADOC 5711 - Range Brasil Ltda\",\n \"enabled\": true,\n \"email\": \"compliance@example.com\",\n \"channel_id\": \"3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a\",\n \"recipients\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"report_mode\": \"always\",\n \"cadence\": \"daily\",\n \"formats\": [\n \"xml\"\n ],\n \"fields\": {\n \"cnpj\": \"99999999\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.range.org/v2/workflows")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"template\": \"cadoc-5711\",\n \"name\": \"CADOC 5711 - Range Brasil Ltda\",\n \"enabled\": true,\n \"email\": \"compliance@example.com\",\n \"channel_id\": \"3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a\",\n \"recipients\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"report_mode\": \"always\",\n \"cadence\": \"daily\",\n \"formats\": [\n \"xml\"\n ],\n \"fields\": {\n \"cnpj\": \"99999999\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.range.org/v2/workflows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template\": \"cadoc-5711\",\n \"name\": \"CADOC 5711 - Range Brasil Ltda\",\n \"enabled\": true,\n \"email\": \"compliance@example.com\",\n \"channel_id\": \"3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a\",\n \"recipients\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"report_mode\": \"always\",\n \"cadence\": \"daily\",\n \"formats\": [\n \"xml\"\n ],\n \"fields\": {\n \"cnpj\": \"99999999\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "9b2f7c61-2d4e-4a8b-9f10-3c5d7e9a1b2c",
"name": "CADOC 5711 - Range Brasil Ltda",
"email": "compliance@example.com",
"recipients": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enabled": true,
"report_mode": "<string>",
"cadence": "daily",
"formats": [
"<string>"
],
"fields": {
"cnpj": "99999999"
},
"created_at": "2026-08-25T00:00:00.000Z",
"updated_at": "2026-08-25T00:00:00.000Z",
"updated_by": "user@example.com"
}Authorizations
Authorization method required to allow user to access the api endpoints.
Body
cadoc-5710, cadoc-5711, alert-investigation, control-testing-and-sampling "cadoc-5711"
Shown in the sidebar and run list. One per regulated entity.
1 - 120"CADOC 5711 - Range Brasil Ltda"
Set false to keep the instance configured but paused.
true
Recipient of the workflow report emails, direct. Prefer channel_id when the caller has a destination id, not an address — either one's required.
"compliance@example.com"
An existing email destination's id (GET /v1/risk/channels). The server resolves this to that channel's real recipient address; either this or email is required.
"3f7e2d1a-9c4b-4e5f-8a6d-1b2c3d4e5f6a"
Existing delivery channel IDs. Omit on PATCH to preserve selections; [] clears them. Selected channels receive eligible stored output.
Delivery policy. Omit on PATCH to preserve the stored mode.
always, exception_only Defaults to the template cadence.
daily, monthly, event "daily"
Output formats; must be allowed by the template. Defaults to every allowed format.
["xml"]
Template-declared fields, validated against the template field_schema. Required ones must be present when creating.
Show child attributes
Show child attributes
{ "cnpj": "99999999" }
Response
"9b2f7c61-2d4e-4a8b-9f10-3c5d7e9a1b2c"
"CADOC 5711 - Range Brasil Ltda"
"compliance@example.com"
true
Stored delivery mode; unsupported legacy values remain unchanged and execute as always.
daily, monthly, event Show child attributes
Show child attributes
{ "cnpj": "99999999" }
"2026-08-25T00:00:00.000Z"
"2026-08-25T00:00:00.000Z"
"user@example.com"
Was this page helpful?