curl --request PATCH \
--url https://api.motion.so/api/motion/automations/{automation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"prompt": "<string>",
"maxConcurrentRuns": 1,
"maxRunsPerHour": 4,
"execution": {
"engine": "gva"
},
"enabled": true
}
'import requests
url = "https://api.motion.so/api/motion/automations/{automation_id}"
payload = {
"name": "<string>",
"prompt": "<string>",
"maxConcurrentRuns": 1,
"maxRunsPerHour": 4,
"execution": { "engine": "gva" },
"enabled": True
}
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>',
prompt: '<string>',
maxConcurrentRuns: 1,
maxRunsPerHour: 4,
execution: {engine: 'gva'},
enabled: true
})
};
fetch('https://api.motion.so/api/motion/automations/{automation_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://api.motion.so/api/motion/automations/{automation_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([
'name' => '<string>',
'prompt' => '<string>',
'maxConcurrentRuns' => 1,
'maxRunsPerHour' => 4,
'execution' => [
'engine' => 'gva'
],
'enabled' => true
]),
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.motion.so/api/motion/automations/{automation_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"maxConcurrentRuns\": 1,\n \"maxRunsPerHour\": 4,\n \"execution\": {\n \"engine\": \"gva\"\n },\n \"enabled\": true\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.motion.so/api/motion/automations/{automation_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"maxConcurrentRuns\": 1,\n \"maxRunsPerHour\": 4,\n \"execution\": {\n \"engine\": \"gva\"\n },\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.motion.so/api/motion/automations/{automation_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 \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"maxConcurrentRuns\": 1,\n \"maxRunsPerHour\": 4,\n \"execution\": {\n \"engine\": \"gva\"\n },\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"automation": {
"id": "<string>",
"name": "<string>",
"enabled": true,
"prompt": "<string>",
"trigger": {
"type": "<string>",
"platform": "<string>",
"source": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"nextRunAt": "2023-11-07T05:31:56Z",
"runs": [
{
"id": "<string>",
"status": "queued",
"motionAgentChatId": "<string>",
"queuedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"attempt": 123,
"resultSummary": "<string>",
"error": "<string>"
}
],
"memory": {
"rememberProcessedItems": true,
"includePreviousRuns": 10,
"compactAfterRuns": 52
},
"connectorPolicy": {
"mode": "none",
"onUnavailable": "block",
"grants": [
{
"connectorId": "github",
"access": "read",
"resources": [
"<string>"
],
"condition": {
"eventTypes": [
"schedule_once"
],
"payloadField": "<string>",
"equals": "<string>"
}
}
]
},
"maxConcurrentRuns": 123,
"maxRunsPerHour": 123
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Update or pause an automation
Requires motion:automations:write for OAuth tokens. API keys use the owner account permissions. Automation access must be enabled for the account and environment. See /guides/automations. Automations execute only with GVA; Claude supports reads, pause, and delete only.
curl --request PATCH \
--url https://api.motion.so/api/motion/automations/{automation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"prompt": "<string>",
"maxConcurrentRuns": 1,
"maxRunsPerHour": 4,
"execution": {
"engine": "gva"
},
"enabled": true
}
'import requests
url = "https://api.motion.so/api/motion/automations/{automation_id}"
payload = {
"name": "<string>",
"prompt": "<string>",
"maxConcurrentRuns": 1,
"maxRunsPerHour": 4,
"execution": { "engine": "gva" },
"enabled": True
}
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>',
prompt: '<string>',
maxConcurrentRuns: 1,
maxRunsPerHour: 4,
execution: {engine: 'gva'},
enabled: true
})
};
fetch('https://api.motion.so/api/motion/automations/{automation_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://api.motion.so/api/motion/automations/{automation_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([
'name' => '<string>',
'prompt' => '<string>',
'maxConcurrentRuns' => 1,
'maxRunsPerHour' => 4,
'execution' => [
'engine' => 'gva'
],
'enabled' => true
]),
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.motion.so/api/motion/automations/{automation_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"maxConcurrentRuns\": 1,\n \"maxRunsPerHour\": 4,\n \"execution\": {\n \"engine\": \"gva\"\n },\n \"enabled\": true\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.motion.so/api/motion/automations/{automation_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"maxConcurrentRuns\": 1,\n \"maxRunsPerHour\": 4,\n \"execution\": {\n \"engine\": \"gva\"\n },\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.motion.so/api/motion/automations/{automation_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 \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"maxConcurrentRuns\": 1,\n \"maxRunsPerHour\": 4,\n \"execution\": {\n \"engine\": \"gva\"\n },\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"automation": {
"id": "<string>",
"name": "<string>",
"enabled": true,
"prompt": "<string>",
"trigger": {
"type": "<string>",
"platform": "<string>",
"source": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"nextRunAt": "2023-11-07T05:31:56Z",
"runs": [
{
"id": "<string>",
"status": "queued",
"motionAgentChatId": "<string>",
"queuedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"attempt": 123,
"resultSummary": "<string>",
"error": "<string>"
}
],
"memory": {
"rememberProcessedItems": true,
"includePreviousRuns": 10,
"compactAfterRuns": 52
},
"connectorPolicy": {
"mode": "none",
"onUnavailable": "block",
"grants": [
{
"connectorId": "github",
"access": "read",
"resources": [
"<string>"
],
"condition": {
"eventTypes": [
"schedule_once"
],
"payloadField": "<string>",
"equals": "<string>"
}
}
]
},
"maxConcurrentRuns": 123,
"maxRunsPerHour": 123
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Motion API key (motion_ prefix), authenticated as its owner. Account and engine permissions still apply.
Path Parameters
ID returned by list or create.
1 - 200^[a-zA-Z0-9_-]+$Body
Supply at least one editable field. Nested objects replace their saved value; include all required nested fields. outputKind is creation-only. Execution changes can return 409 update_conflict; reread before retrying.
1 - 160Self-contained instructions used for every future invocation.
1 - 20000Match platform to trigger type. Discover environment availability with GET /automations/capabilities.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Uses existing connected accounts and permissions; this request cannot connect an account or grant access.
Show child attributes
Show child attributes
1 <= x <= 101 <= x <= 100Supply engine or effort. Engine changes use the new engine default when effort is omitted.
Show child attributes
Show child attributes
False pauses future scheduling; true resumes it. Does not cancel an already running invocation.
Response
Success
Owner-scoped read view. Read responses can include additional saved context and history. Use the dedicated run-history endpoint for pagination. Read fields are not accepted as write inputs.
Show child attributes
Show child attributes
Was this page helpful?