Create automation
curl --request POST \
--url https://api.capy.ai/api/v1/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "<string>",
"projectId": "<string>",
"name": "<string>",
"prompt": "<string>",
"triggers": [
{
"type": "schedule",
"cron": "<string>",
"timezone": "<string>"
}
],
"description": "<string>",
"repos": [
{
"repo": "<string>",
"branch": "<string>"
}
],
"mcpOverrides": {
"enabled_server_keys": [
"<string>"
],
"disabled_server_keys": [
"<string>"
]
},
"maxRunsPerDay": 2,
"runAs": {
"kind": "human",
"user_id": "<string>"
},
"enabled": true
}
'import requests
url = "https://api.capy.ai/api/v1/automations"
payload = {
"requestId": "<string>",
"projectId": "<string>",
"name": "<string>",
"prompt": "<string>",
"triggers": [
{
"type": "schedule",
"cron": "<string>",
"timezone": "<string>"
}
],
"description": "<string>",
"repos": [
{
"repo": "<string>",
"branch": "<string>"
}
],
"mcpOverrides": {
"enabled_server_keys": ["<string>"],
"disabled_server_keys": ["<string>"]
},
"maxRunsPerDay": 2,
"runAs": {
"kind": "human",
"user_id": "<string>"
},
"enabled": True
}
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({
requestId: '<string>',
projectId: '<string>',
name: '<string>',
prompt: '<string>',
triggers: [{type: 'schedule', cron: '<string>', timezone: '<string>'}],
description: '<string>',
repos: [{repo: '<string>', branch: '<string>'}],
mcpOverrides: {enabled_server_keys: ['<string>'], disabled_server_keys: ['<string>']},
maxRunsPerDay: 2,
runAs: {kind: 'human', user_id: '<string>'},
enabled: true
})
};
fetch('https://api.capy.ai/api/v1/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.capy.ai/api/v1/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([
'requestId' => '<string>',
'projectId' => '<string>',
'name' => '<string>',
'prompt' => '<string>',
'triggers' => [
[
'type' => 'schedule',
'cron' => '<string>',
'timezone' => '<string>'
]
],
'description' => '<string>',
'repos' => [
[
'repo' => '<string>',
'branch' => '<string>'
]
],
'mcpOverrides' => [
'enabled_server_keys' => [
'<string>'
],
'disabled_server_keys' => [
'<string>'
]
],
'maxRunsPerDay' => 2,
'runAs' => [
'kind' => 'human',
'user_id' => '<string>'
],
'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.capy.ai/api/v1/automations"
payload := strings.NewReader("{\n \"requestId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"triggers\": [\n {\n \"type\": \"schedule\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"repos\": [\n {\n \"repo\": \"<string>\",\n \"branch\": \"<string>\"\n }\n ],\n \"mcpOverrides\": {\n \"enabled_server_keys\": [\n \"<string>\"\n ],\n \"disabled_server_keys\": [\n \"<string>\"\n ]\n },\n \"maxRunsPerDay\": 2,\n \"runAs\": {\n \"kind\": \"human\",\n \"user_id\": \"<string>\"\n },\n \"enabled\": true\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.capy.ai/api/v1/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"triggers\": [\n {\n \"type\": \"schedule\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"repos\": [\n {\n \"repo\": \"<string>\",\n \"branch\": \"<string>\"\n }\n ],\n \"mcpOverrides\": {\n \"enabled_server_keys\": [\n \"<string>\"\n ],\n \"disabled_server_keys\": [\n \"<string>\"\n ]\n },\n \"maxRunsPerDay\": 2,\n \"runAs\": {\n \"kind\": \"human\",\n \"user_id\": \"<string>\"\n },\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.capy.ai/api/v1/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 \"requestId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"triggers\": [\n {\n \"type\": \"schedule\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"repos\": [\n {\n \"repo\": \"<string>\",\n \"branch\": \"<string>\"\n }\n ],\n \"mcpOverrides\": {\n \"enabled_server_keys\": [\n \"<string>\"\n ],\n \"disabled_server_keys\": [\n \"<string>\"\n ]\n },\n \"maxRunsPerDay\": 2,\n \"runAs\": {\n \"kind\": \"human\",\n \"user_id\": \"<string>\"\n },\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"projectId": "<string>",
"name": "<string>",
"description": "<string>",
"prompt": "<string>",
"triggers": [
{
"type": "schedule",
"cron": "<string>",
"timezone": "<string>"
}
],
"model": {
"modelId": "<string>",
"modes": {
"fast": true,
"pro": true
}
},
"repos": [
{
"repo": "<string>",
"branch": "<string>"
}
],
"mcpOverrides": {
"enabled_server_keys": [
"<string>"
],
"disabled_server_keys": [
"<string>"
]
},
"maxRunsPerDay": 123,
"enabled": true,
"deleted": true,
"disabledReason": "run_as_unavailable",
"runAsId": "<string>",
"runCount": 123,
"lastTriggeredAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"webhookUrl": "<string>"
}{
"_tag": "capy/InvalidRequest",
"message": "<string>"
}{
"_tag": "capy/Unauthorized"
}{
"_tag": "capy/PaidFeatureUnavailable",
"feature": "bigguy"
}{
"_tag": "capy/Forbidden"
}{
"_tag": "capy/ProjectNotFound",
"projectId": "<string>"
}{
"_tag": "capy/BillingAuthorityUnavailable"
}automations
Create automation
POST
/
api
/
v1
/
automations
Create automation
curl --request POST \
--url https://api.capy.ai/api/v1/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "<string>",
"projectId": "<string>",
"name": "<string>",
"prompt": "<string>",
"triggers": [
{
"type": "schedule",
"cron": "<string>",
"timezone": "<string>"
}
],
"description": "<string>",
"repos": [
{
"repo": "<string>",
"branch": "<string>"
}
],
"mcpOverrides": {
"enabled_server_keys": [
"<string>"
],
"disabled_server_keys": [
"<string>"
]
},
"maxRunsPerDay": 2,
"runAs": {
"kind": "human",
"user_id": "<string>"
},
"enabled": true
}
'import requests
url = "https://api.capy.ai/api/v1/automations"
payload = {
"requestId": "<string>",
"projectId": "<string>",
"name": "<string>",
"prompt": "<string>",
"triggers": [
{
"type": "schedule",
"cron": "<string>",
"timezone": "<string>"
}
],
"description": "<string>",
"repos": [
{
"repo": "<string>",
"branch": "<string>"
}
],
"mcpOverrides": {
"enabled_server_keys": ["<string>"],
"disabled_server_keys": ["<string>"]
},
"maxRunsPerDay": 2,
"runAs": {
"kind": "human",
"user_id": "<string>"
},
"enabled": True
}
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({
requestId: '<string>',
projectId: '<string>',
name: '<string>',
prompt: '<string>',
triggers: [{type: 'schedule', cron: '<string>', timezone: '<string>'}],
description: '<string>',
repos: [{repo: '<string>', branch: '<string>'}],
mcpOverrides: {enabled_server_keys: ['<string>'], disabled_server_keys: ['<string>']},
maxRunsPerDay: 2,
runAs: {kind: 'human', user_id: '<string>'},
enabled: true
})
};
fetch('https://api.capy.ai/api/v1/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.capy.ai/api/v1/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([
'requestId' => '<string>',
'projectId' => '<string>',
'name' => '<string>',
'prompt' => '<string>',
'triggers' => [
[
'type' => 'schedule',
'cron' => '<string>',
'timezone' => '<string>'
]
],
'description' => '<string>',
'repos' => [
[
'repo' => '<string>',
'branch' => '<string>'
]
],
'mcpOverrides' => [
'enabled_server_keys' => [
'<string>'
],
'disabled_server_keys' => [
'<string>'
]
],
'maxRunsPerDay' => 2,
'runAs' => [
'kind' => 'human',
'user_id' => '<string>'
],
'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.capy.ai/api/v1/automations"
payload := strings.NewReader("{\n \"requestId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"triggers\": [\n {\n \"type\": \"schedule\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"repos\": [\n {\n \"repo\": \"<string>\",\n \"branch\": \"<string>\"\n }\n ],\n \"mcpOverrides\": {\n \"enabled_server_keys\": [\n \"<string>\"\n ],\n \"disabled_server_keys\": [\n \"<string>\"\n ]\n },\n \"maxRunsPerDay\": 2,\n \"runAs\": {\n \"kind\": \"human\",\n \"user_id\": \"<string>\"\n },\n \"enabled\": true\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.capy.ai/api/v1/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"triggers\": [\n {\n \"type\": \"schedule\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"repos\": [\n {\n \"repo\": \"<string>\",\n \"branch\": \"<string>\"\n }\n ],\n \"mcpOverrides\": {\n \"enabled_server_keys\": [\n \"<string>\"\n ],\n \"disabled_server_keys\": [\n \"<string>\"\n ]\n },\n \"maxRunsPerDay\": 2,\n \"runAs\": {\n \"kind\": \"human\",\n \"user_id\": \"<string>\"\n },\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.capy.ai/api/v1/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 \"requestId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"triggers\": [\n {\n \"type\": \"schedule\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"repos\": [\n {\n \"repo\": \"<string>\",\n \"branch\": \"<string>\"\n }\n ],\n \"mcpOverrides\": {\n \"enabled_server_keys\": [\n \"<string>\"\n ],\n \"disabled_server_keys\": [\n \"<string>\"\n ]\n },\n \"maxRunsPerDay\": 2,\n \"runAs\": {\n \"kind\": \"human\",\n \"user_id\": \"<string>\"\n },\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"projectId": "<string>",
"name": "<string>",
"description": "<string>",
"prompt": "<string>",
"triggers": [
{
"type": "schedule",
"cron": "<string>",
"timezone": "<string>"
}
],
"model": {
"modelId": "<string>",
"modes": {
"fast": true,
"pro": true
}
},
"repos": [
{
"repo": "<string>",
"branch": "<string>"
}
],
"mcpOverrides": {
"enabled_server_keys": [
"<string>"
],
"disabled_server_keys": [
"<string>"
]
},
"maxRunsPerDay": 123,
"enabled": true,
"deleted": true,
"disabledReason": "run_as_unavailable",
"runAsId": "<string>",
"runCount": 123,
"lastTriggeredAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"webhookUrl": "<string>"
}{
"_tag": "capy/InvalidRequest",
"message": "<string>"
}{
"_tag": "capy/Unauthorized"
}{
"_tag": "capy/PaidFeatureUnavailable",
"feature": "bigguy"
}{
"_tag": "capy/Forbidden"
}{
"_tag": "capy/ProjectNotFound",
"projectId": "<string>"
}{
"_tag": "capy/BillingAuthorityUnavailable"
}Authorizations
An API key created in Capy under Settings → API.
Body
application/json
Required string length:
1 - 191Minimum string length:
1Minimum string length:
1Required array length:
1 - 20 elements- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
new, single Show child attributes
Show child attributes
Required range:
x >= 1Available options:
small, medium, large, ultra, hyper, bigguy - Option 1
- Option 2
Show child attributes
Show child attributes
Response
AutomationCreated
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
new, single Show child attributes
Show child attributes
Available options:
small, medium, large, ultra, hyper, bigguy Available options:
run_as_unavailable Available options:
human, service Was this page helpful?
⌘I