Start a manual run of an enabled automation
curl --request POST \
--url https://api.royalti.io/ai/automations/{templateId}/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>"
}
'import requests
url = "https://api.royalti.io/ai/automations/{templateId}/run"
payload = { "idempotency_key": "<string>" }
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({idempotency_key: '<string>'})
};
fetch('https://api.royalti.io/ai/automations/{templateId}/run', 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.royalti.io/ai/automations/{templateId}/run",
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([
'idempotency_key' => '<string>'
]),
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.royalti.io/ai/automations/{templateId}/run"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\"\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.royalti.io/ai/automations/{templateId}/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/ai/automations/{templateId}/run")
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 \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "<string>",
"data": {
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantId": 123,
"tenant_automation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_id": "catalog-hygiene",
"template_version": "<string>",
"mastra_run_id": "<string>",
"status": "queued",
"trigger_source": "manual:user",
"triggered_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotency_key": "<string>",
"config_snapshot": {},
"approved_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved_at": "2023-11-07T05:31:56Z",
"approval_decision": "approved",
"awaiting_since": "2023-11-07T05:31:56Z",
"result_summary": "<string>",
"error": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"awaiting": {
"step_id": "<string>",
"kind": "approval",
"reject_label": "<string>",
"payload": {}
},
"steps": [
{}
]
}
}{
"status": "error",
"message": "<string>",
"code": "<string>",
"details": {}
}{
"status": "error",
"message": "<string>",
"code": "FEATURE_REQUIRED",
"data": null
}{
"status": "error",
"message": "<string>",
"code": "FEATURE_REQUIRED",
"data": null
}{
"status": "error",
"message": "<string>",
"code": "FEATURE_REQUIRED",
"data": null
}Automations
Start a manual run of an enabled automation
POST /ai/automations//run
POST
/
ai
/
automations
/
{templateId}
/
run
Start a manual run of an enabled automation
curl --request POST \
--url https://api.royalti.io/ai/automations/{templateId}/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>"
}
'import requests
url = "https://api.royalti.io/ai/automations/{templateId}/run"
payload = { "idempotency_key": "<string>" }
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({idempotency_key: '<string>'})
};
fetch('https://api.royalti.io/ai/automations/{templateId}/run', 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.royalti.io/ai/automations/{templateId}/run",
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([
'idempotency_key' => '<string>'
]),
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.royalti.io/ai/automations/{templateId}/run"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\"\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.royalti.io/ai/automations/{templateId}/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/ai/automations/{templateId}/run")
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 \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "<string>",
"data": {
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantId": 123,
"tenant_automation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_id": "catalog-hygiene",
"template_version": "<string>",
"mastra_run_id": "<string>",
"status": "queued",
"trigger_source": "manual:user",
"triggered_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotency_key": "<string>",
"config_snapshot": {},
"approved_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved_at": "2023-11-07T05:31:56Z",
"approval_decision": "approved",
"awaiting_since": "2023-11-07T05:31:56Z",
"result_summary": "<string>",
"error": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"awaiting": {
"step_id": "<string>",
"kind": "approval",
"reject_label": "<string>",
"payload": {}
},
"steps": [
{}
]
}
}{
"status": "error",
"message": "<string>",
"code": "<string>",
"details": {}
}{
"status": "error",
"message": "<string>",
"code": "FEATURE_REQUIRED",
"data": null
}{
"status": "error",
"message": "<string>",
"code": "FEATURE_REQUIRED",
"data": null
}{
"status": "error",
"message": "<string>",
"code": "FEATURE_REQUIRED",
"data": null
}This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
POST /ai/automations//runtrigger_source is always manual:user on this route. Not
plan-gated — manual runs are available on every tier — but subject
to the service’s own concurrency (1 live run per automation) and the
FREE-tier monthly run quota (10/month; uncapped on paid tiers). The
run row is written before the workflow starts, so a refused or
throwing start is still visible in run history.
Authorization: any authenticated tenant member.
Code Examples
const response = await fetch('https://api.royalti.io/ai/automations/example-id/run', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"idempotency_key": "sample-idempotency_key"
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.royalti.io/ai/automations/example-id/run',
headers={
'Authorization': f'Bearer {token}'
},
json={"idempotency_key":"sample-idempotency_key"}
)
data = response.json()
print(data)
curl -X POST https://api.royalti.io/ai/automations/example-id/run \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"idempotency_key":"sample-idempotency_key"}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Path Parameters
Available options:
statement-notify-artists, royalty-file-anomaly-hold, catalog-hygiene, release-delivery Body
application/json
Supplied by event subscribers (P2) so a redelivered event is a no-op. Ignored for manual UI runs.