Get an automation
curl --request GET \
--url https://api.motion.so/api/motion/automations/{automation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.motion.so/api/motion/automations/{automation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.motion.so/api/motion/automations/{automation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.motion.so/api/motion/automations/{automation_id}")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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>"
}Automations
Get an automation
Requires motion:automations:read 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.
GET
/
automations
/
{automation_id}
Get an automation
curl --request GET \
--url https://api.motion.so/api/motion/automations/{automation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.motion.so/api/motion/automations/{automation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.motion.so/api/motion/automations/{automation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.motion.so/api/motion/automations/{automation_id}")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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>"
}Authorizations
MotionApiKeyMotionOAuth
Motion API key (motion_ prefix), authenticated as its owner. Account and engine permissions still apply.
Path Parameters
ID returned by list or create.
Required string length:
1 - 200Pattern:
^[a-zA-Z0-9_-]+$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?