Update
curl --request PATCH \
--url https://api.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"instructions": "<string>",
"cronSchedule": "<string>",
"timezone": "<string>",
"enabled": true,
"slackChannelId": "<string>",
"confirmationToken": "<string>"
}
'import requests
url = "https://api.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}"
payload = {
"name": "<string>",
"instructions": "<string>",
"cronSchedule": "<string>",
"timezone": "<string>",
"enabled": True,
"slackChannelId": "<string>",
"confirmationToken": "<string>"
}
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({
name: '<string>',
instructions: '<string>',
cronSchedule: '<string>',
timezone: '<string>',
enabled: true,
slackChannelId: '<string>',
confirmationToken: '<string>'
})
};
fetch('https://api.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}', 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.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}",
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([
'name' => '<string>',
'instructions' => '<string>',
'cronSchedule' => '<string>',
'timezone' => '<string>',
'enabled' => true,
'slackChannelId' => '<string>',
'confirmationToken' => '<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.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"cronSchedule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"slackChannelId\": \"<string>\",\n \"confirmationToken\": \"<string>\"\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://api.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"cronSchedule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"slackChannelId\": \"<string>\",\n \"confirmationToken\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}")
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 \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"cronSchedule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"slackChannelId\": \"<string>\",\n \"confirmationToken\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task": {
"id": "<string>",
"workspaceId": "<string>",
"name": "<string>",
"instructions": "<string>",
"cronSchedule": "<string>",
"timezone": "<string>",
"enabled": true,
"slackChannelId": "<string>",
"slackChannelName": "<string>",
"slackDestinationId": "<string>",
"expiresAt": "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",
"url": "<string>",
"actions": [
{
"id": "<string>",
"taskId": "<string>",
"runId": "<string>",
"source": "<string>",
"toolName": "<string>",
"summary": "<string>",
"resultId": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"_count": {
"actions": 123
}
},
"requiresInvite": true
}Routines
Update
Approve routine edits and reauthorize its future runs
CLI: adside routines update
PATCH
/
v1
/
workspaces
/
{workspaceId}
/
routines
/
{taskId}
Update
curl --request PATCH \
--url https://api.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"instructions": "<string>",
"cronSchedule": "<string>",
"timezone": "<string>",
"enabled": true,
"slackChannelId": "<string>",
"confirmationToken": "<string>"
}
'import requests
url = "https://api.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}"
payload = {
"name": "<string>",
"instructions": "<string>",
"cronSchedule": "<string>",
"timezone": "<string>",
"enabled": True,
"slackChannelId": "<string>",
"confirmationToken": "<string>"
}
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({
name: '<string>',
instructions: '<string>',
cronSchedule: '<string>',
timezone: '<string>',
enabled: true,
slackChannelId: '<string>',
confirmationToken: '<string>'
})
};
fetch('https://api.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}', 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.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}",
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([
'name' => '<string>',
'instructions' => '<string>',
'cronSchedule' => '<string>',
'timezone' => '<string>',
'enabled' => true,
'slackChannelId' => '<string>',
'confirmationToken' => '<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.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"cronSchedule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"slackChannelId\": \"<string>\",\n \"confirmationToken\": \"<string>\"\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://api.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"cronSchedule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"slackChannelId\": \"<string>\",\n \"confirmationToken\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adside.ai/v1/workspaces/{workspaceId}/routines/{taskId}")
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 \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"cronSchedule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"enabled\": true,\n \"slackChannelId\": \"<string>\",\n \"confirmationToken\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task": {
"id": "<string>",
"workspaceId": "<string>",
"name": "<string>",
"instructions": "<string>",
"cronSchedule": "<string>",
"timezone": "<string>",
"enabled": true,
"slackChannelId": "<string>",
"slackChannelName": "<string>",
"slackDestinationId": "<string>",
"expiresAt": "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",
"url": "<string>",
"actions": [
{
"id": "<string>",
"taskId": "<string>",
"runId": "<string>",
"source": "<string>",
"toolName": "<string>",
"summary": "<string>",
"resultId": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"_count": {
"actions": 123
}
},
"requiresInvite": true
}Authorizations
A personal API key (adside_pat_…) or a token from adside login. Either carries the permissions of the person it belongs to.
Path Parameters
Minimum string length:
1Minimum string length:
1Body
application/json