Create an automation
curl --request POST \
--url https://api.motion.so/api/motion/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Daily update",
"prompt": "Create a short daily title animation.",
"trigger": {
"type": "schedule_recurring",
"platform": "schedule",
"label": "Every day",
"source": "Schedule",
"interval_minutes": 1440
},
"execution": {
"effort": "standard"
}
}
'import requests
url = "https://api.motion.so/api/motion/automations"
payload = {
"name": "Daily update",
"prompt": "Create a short daily title animation.",
"trigger": {
"type": "schedule_recurring",
"platform": "schedule",
"label": "Every day",
"source": "Schedule",
"interval_minutes": 1440
},
"execution": { "effort": "standard" }
}
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({
name: 'Daily update',
prompt: 'Create a short daily title animation.',
trigger: {
type: 'schedule_recurring',
platform: 'schedule',
label: 'Every day',
source: 'Schedule',
interval_minutes: 1440
},
execution: {effort: 'standard'}
})
};
fetch('https://api.motion.so/api/motion/automations', 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",
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([
'name' => 'Daily update',
'prompt' => 'Create a short daily title animation.',
'trigger' => [
'type' => 'schedule_recurring',
'platform' => 'schedule',
'label' => 'Every day',
'source' => 'Schedule',
'interval_minutes' => 1440
],
'execution' => [
'effort' => 'standard'
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"Daily update\",\n \"prompt\": \"Create a short daily title animation.\",\n \"trigger\": {\n \"type\": \"schedule_recurring\",\n \"platform\": \"schedule\",\n \"label\": \"Every day\",\n \"source\": \"Schedule\",\n \"interval_minutes\": 1440\n },\n \"execution\": {\n \"effort\": \"standard\"\n }\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.motion.so/api/motion/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Daily update\",\n \"prompt\": \"Create a short daily title animation.\",\n \"trigger\": {\n \"type\": \"schedule_recurring\",\n \"platform\": \"schedule\",\n \"label\": \"Every day\",\n \"source\": \"Schedule\",\n \"interval_minutes\": 1440\n },\n \"execution\": {\n \"effort\": \"standard\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.motion.so/api/motion/automations")
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 \"name\": \"Daily update\",\n \"prompt\": \"Create a short daily title animation.\",\n \"trigger\": {\n \"type\": \"schedule_recurring\",\n \"platform\": \"schedule\",\n \"label\": \"Every day\",\n \"source\": \"Schedule\",\n \"interval_minutes\": 1440\n },\n \"execution\": {\n \"effort\": \"standard\"\n }\n}"
response = http.request(request)
puts response.read_body{
"automation": {
"id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
"name": "Daily product update",
"enabled": true,
"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>"
}Automations
Create an automation
Create an automation that runs on a schedule or channel event. Each run starts a new project.
POST
/
automations
Create an automation
curl --request POST \
--url https://api.motion.so/api/motion/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Daily update",
"prompt": "Create a short daily title animation.",
"trigger": {
"type": "schedule_recurring",
"platform": "schedule",
"label": "Every day",
"source": "Schedule",
"interval_minutes": 1440
},
"execution": {
"effort": "standard"
}
}
'import requests
url = "https://api.motion.so/api/motion/automations"
payload = {
"name": "Daily update",
"prompt": "Create a short daily title animation.",
"trigger": {
"type": "schedule_recurring",
"platform": "schedule",
"label": "Every day",
"source": "Schedule",
"interval_minutes": 1440
},
"execution": { "effort": "standard" }
}
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({
name: 'Daily update',
prompt: 'Create a short daily title animation.',
trigger: {
type: 'schedule_recurring',
platform: 'schedule',
label: 'Every day',
source: 'Schedule',
interval_minutes: 1440
},
execution: {effort: 'standard'}
})
};
fetch('https://api.motion.so/api/motion/automations', 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",
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([
'name' => 'Daily update',
'prompt' => 'Create a short daily title animation.',
'trigger' => [
'type' => 'schedule_recurring',
'platform' => 'schedule',
'label' => 'Every day',
'source' => 'Schedule',
'interval_minutes' => 1440
],
'execution' => [
'effort' => 'standard'
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"Daily update\",\n \"prompt\": \"Create a short daily title animation.\",\n \"trigger\": {\n \"type\": \"schedule_recurring\",\n \"platform\": \"schedule\",\n \"label\": \"Every day\",\n \"source\": \"Schedule\",\n \"interval_minutes\": 1440\n },\n \"execution\": {\n \"effort\": \"standard\"\n }\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.motion.so/api/motion/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Daily update\",\n \"prompt\": \"Create a short daily title animation.\",\n \"trigger\": {\n \"type\": \"schedule_recurring\",\n \"platform\": \"schedule\",\n \"label\": \"Every day\",\n \"source\": \"Schedule\",\n \"interval_minutes\": 1440\n },\n \"execution\": {\n \"effort\": \"standard\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.motion.so/api/motion/automations")
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 \"name\": \"Daily update\",\n \"prompt\": \"Create a short daily title animation.\",\n \"trigger\": {\n \"type\": \"schedule_recurring\",\n \"platform\": \"schedule\",\n \"label\": \"Every day\",\n \"source\": \"Schedule\",\n \"interval_minutes\": 1440\n },\n \"execution\": {\n \"effort\": \"standard\"\n }\n}"
response = http.request(request)
puts response.read_body{
"automation": {
"id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
"name": "Daily product update",
"enabled": true,
"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>"
}Authorizations
MotionApiKeyMotionOAuth
Headers
Body
application/json
Create an automation that runs on a schedule or channel event.
Was this page helpful?