Update automation
curl --request PATCH \
--url https://app.outlit.ai/api/automations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "10000000-0000-4000-8000-000000000004",
"name": "Churn response",
"description": null,
"enabled": false,
"triggerType": "SIGNAL_OCCURRENCE",
"signalIds": [
"10000000-0000-4000-8000-000000000002"
],
"destinationIds": []
}
'import requests
url = "https://app.outlit.ai/api/automations/{id}"
payload = {
"agentId": "10000000-0000-4000-8000-000000000004",
"name": "Churn response",
"description": None,
"enabled": False,
"triggerType": "SIGNAL_OCCURRENCE",
"signalIds": ["10000000-0000-4000-8000-000000000002"],
"destinationIds": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '10000000-0000-4000-8000-000000000004',
name: 'Churn response',
description: null,
enabled: false,
triggerType: 'SIGNAL_OCCURRENCE',
signalIds: ['10000000-0000-4000-8000-000000000002'],
destinationIds: []
})
};
fetch('https://app.outlit.ai/api/automations/{id}', 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.outlit.ai/api/automations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => '10000000-0000-4000-8000-000000000004',
'name' => 'Churn response',
'description' => null,
'enabled' => false,
'triggerType' => 'SIGNAL_OCCURRENCE',
'signalIds' => [
'10000000-0000-4000-8000-000000000002'
],
'destinationIds' => [
]
]),
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://app.outlit.ai/api/automations/{id}"
payload := strings.NewReader("{\n \"agentId\": \"10000000-0000-4000-8000-000000000004\",\n \"name\": \"Churn response\",\n \"description\": null,\n \"enabled\": false,\n \"triggerType\": \"SIGNAL_OCCURRENCE\",\n \"signalIds\": [\n \"10000000-0000-4000-8000-000000000002\"\n ],\n \"destinationIds\": []\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.outlit.ai/api/automations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"10000000-0000-4000-8000-000000000004\",\n \"name\": \"Churn response\",\n \"description\": null,\n \"enabled\": false,\n \"triggerType\": \"SIGNAL_OCCURRENCE\",\n \"signalIds\": [\n \"10000000-0000-4000-8000-000000000002\"\n ],\n \"destinationIds\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.outlit.ai/api/automations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"10000000-0000-4000-8000-000000000004\",\n \"name\": \"Churn response\",\n \"description\": null,\n \"enabled\": false,\n \"triggerType\": \"SIGNAL_OCCURRENCE\",\n \"signalIds\": [\n \"10000000-0000-4000-8000-000000000002\"\n ],\n \"destinationIds\": []\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"commandId": "<string>",
"commandVersion": 123,
"correlationId": "<string>",
"result": {
"operationId": "<string>",
"status": "<string>",
"resources": [
{
"type": "<string>",
"id": "<string>"
}
],
"data": {
"automation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"triggerJson": "<unknown>",
"audienceFilterJson": "<unknown>",
"schemaVersion": "<string>",
"configHash": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"nextRunAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"signals": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"definition": "<unknown>",
"schemaVersion": "<string>",
"configHash": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"destinations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"maskedConfig": {},
"lastSyncedAt": "2023-11-07T05:31:56Z",
"providerErrorCode": "<string>",
"providerErrorMessage": "<string>",
"isDefault": true,
"schemaVersion": "<string>",
"configHash": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"activeSignalCount": 1,
"activeDestinationCount": 1,
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"warnings": [
"<string>"
],
"auditId": "<string>"
}
}{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}{
"error": "Invalid credentials"
}{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}{
"error": "Internal server error"
}{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}Platform API
Update automation
Update an agent automation with a full configuration body. Provide agentId, name, enabled, and triggerType; Outlit maps agentId to the hosted-agent processor internally.
PATCH
/
api
/
automations
/
{id}
Update automation
curl --request PATCH \
--url https://app.outlit.ai/api/automations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "10000000-0000-4000-8000-000000000004",
"name": "Churn response",
"description": null,
"enabled": false,
"triggerType": "SIGNAL_OCCURRENCE",
"signalIds": [
"10000000-0000-4000-8000-000000000002"
],
"destinationIds": []
}
'import requests
url = "https://app.outlit.ai/api/automations/{id}"
payload = {
"agentId": "10000000-0000-4000-8000-000000000004",
"name": "Churn response",
"description": None,
"enabled": False,
"triggerType": "SIGNAL_OCCURRENCE",
"signalIds": ["10000000-0000-4000-8000-000000000002"],
"destinationIds": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '10000000-0000-4000-8000-000000000004',
name: 'Churn response',
description: null,
enabled: false,
triggerType: 'SIGNAL_OCCURRENCE',
signalIds: ['10000000-0000-4000-8000-000000000002'],
destinationIds: []
})
};
fetch('https://app.outlit.ai/api/automations/{id}', 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.outlit.ai/api/automations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => '10000000-0000-4000-8000-000000000004',
'name' => 'Churn response',
'description' => null,
'enabled' => false,
'triggerType' => 'SIGNAL_OCCURRENCE',
'signalIds' => [
'10000000-0000-4000-8000-000000000002'
],
'destinationIds' => [
]
]),
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://app.outlit.ai/api/automations/{id}"
payload := strings.NewReader("{\n \"agentId\": \"10000000-0000-4000-8000-000000000004\",\n \"name\": \"Churn response\",\n \"description\": null,\n \"enabled\": false,\n \"triggerType\": \"SIGNAL_OCCURRENCE\",\n \"signalIds\": [\n \"10000000-0000-4000-8000-000000000002\"\n ],\n \"destinationIds\": []\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.outlit.ai/api/automations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"10000000-0000-4000-8000-000000000004\",\n \"name\": \"Churn response\",\n \"description\": null,\n \"enabled\": false,\n \"triggerType\": \"SIGNAL_OCCURRENCE\",\n \"signalIds\": [\n \"10000000-0000-4000-8000-000000000002\"\n ],\n \"destinationIds\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.outlit.ai/api/automations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"10000000-0000-4000-8000-000000000004\",\n \"name\": \"Churn response\",\n \"description\": null,\n \"enabled\": false,\n \"triggerType\": \"SIGNAL_OCCURRENCE\",\n \"signalIds\": [\n \"10000000-0000-4000-8000-000000000002\"\n ],\n \"destinationIds\": []\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"commandId": "<string>",
"commandVersion": 123,
"correlationId": "<string>",
"result": {
"operationId": "<string>",
"status": "<string>",
"resources": [
{
"type": "<string>",
"id": "<string>"
}
],
"data": {
"automation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"triggerJson": "<unknown>",
"audienceFilterJson": "<unknown>",
"schemaVersion": "<string>",
"configHash": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"nextRunAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"signals": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"definition": "<unknown>",
"schemaVersion": "<string>",
"configHash": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"destinations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"maskedConfig": {},
"lastSyncedAt": "2023-11-07T05:31:56Z",
"providerErrorCode": "<string>",
"providerErrorMessage": "<string>",
"isDefault": true,
"schemaVersion": "<string>",
"configHash": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"activeSignalCount": 1,
"activeDestinationCount": 1,
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"warnings": [
"<string>"
],
"auditId": "<string>"
}
}{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}{
"error": "Invalid credentials"
}{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}{
"error": "Internal server error"
}{
"ok": true,
"commandId": "<string>",
"commandVersion": 2,
"error": {
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"details": {}
}
}Authorizations
Outlit API key using the Bearer ok_... format.
Path Parameters
Automation ID.
Body
application/json
Required string length:
1 - 120Available options:
SIGNAL_OCCURRENCE, SCHEDULE Maximum string length:
1000Maximum array length:
50Available options:
ANY, ALL, AT_LEAST Show child attributes
Show child attributes
Required range:
2 <= x <= 5Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum array length:
25Was this page helpful?
⌘I