Update an automation
curl --request PATCH \
--url https://api.motion.so/api/motion/automations/{automation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": false
}
'import requests
url = "https://api.motion.so/api/motion/automations/{automation_id}"
payload = { "enabled": False }
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({enabled: false})
};
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([
'enabled' => false
]),
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 \"enabled\": false\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 \"enabled\": false\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 \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"automation": {
"id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
"name": "Daily product update",
"enabled": false,
"prompt": "Create a 15-second 16:9 animated update summarizing the latest release notes.",
"trigger": {
"type": "schedule_recurring",
"platform": "schedule",
"label": "Every 24 hours",
"source": "Schedule",
"interval_minutes": 1440
},
"created_at": "2026-11-18T14:00:00Z",
"updated_at": "2026-11-19T14:02:18Z",
"next_run_at": "2026-11-20T14:00:00Z",
"runs": [
{
"id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
"status": "completed",
"motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
"queued_at": "2026-11-19T14:00:00Z",
"started_at": "2026-11-19T14:00:03Z",
"completed_at": "2026-11-19T14:02:18Z",
"attempt": 1,
"result_summary": "Created the daily product update video.",
"error": null
}
],
"memory": {
"remember_processed_items": true,
"include_previous_runs": 5,
"compact_after_runs": 20
},
"max_concurrent_runs": 1,
"max_runs_per_hour": 4
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Automations
Update an automation
Update an automation. Set enabled to false to pause it.
PATCH
/
automations
/
{automation_id}
Update an automation
curl --request PATCH \
--url https://api.motion.so/api/motion/automations/{automation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": false
}
'import requests
url = "https://api.motion.so/api/motion/automations/{automation_id}"
payload = { "enabled": False }
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({enabled: false})
};
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([
'enabled' => false
]),
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 \"enabled\": false\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 \"enabled\": false\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 \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"automation": {
"id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
"name": "Daily product update",
"enabled": false,
"prompt": "Create a 15-second 16:9 animated update summarizing the latest release notes.",
"trigger": {
"type": "schedule_recurring",
"platform": "schedule",
"label": "Every 24 hours",
"source": "Schedule",
"interval_minutes": 1440
},
"created_at": "2026-11-18T14:00:00Z",
"updated_at": "2026-11-19T14:02:18Z",
"next_run_at": "2026-11-20T14:00:00Z",
"runs": [
{
"id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
"status": "completed",
"motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
"queued_at": "2026-11-19T14:00:00Z",
"started_at": "2026-11-19T14:00:03Z",
"completed_at": "2026-11-19T14:02:18Z",
"attempt": 1,
"result_summary": "Created the daily product update video.",
"error": null
}
],
"memory": {
"remember_processed_items": true,
"include_previous_runs": 5,
"compact_after_runs": 20
},
"max_concurrent_runs": 1,
"max_runs_per_hour": 4
}
}{
"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
MotionApiKeyMotionOAuth
Headers
Path Parameters
Body
application/json
Fields to update on an automation. Nested objects replace their saved values.
Was this page helpful?