Create automation

POST
/api/v1/automations

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Capy under Settings → API.

Request body

application/json
  1. body
requestId*string
Length1 <= length <= 191
projectId*string
name*string
Length1 <= length
description?string
prompt*string
Length1 <= length
triggers*array<||||||>
Items1 <= items <= 20
model?

Model every run uses, pinned at creation. Omit to leave the automation unpinned: each run then resolves the run-as principal's default model at run creation, their personal default first, then the organization default.

repos?array<>
threadMode?string
One of"new""single"
slackImpersonation?boolean
quietSlackPosts?boolean
singleJamId?string
maxRunsPerDay?integer
Range1 <= value
machineSize?string
One of"small""medium""large""ultra""hyper""bigguy"
organize?

Board placement for each run's thread: pin, folders (folder ids visible to the run-as principal), tags (active tag ids). Pinning and tagging need a human run-as principal.

runAs?|
enabled?boolean

Response body

AutomationCreated

application/json
  1. response
id*string
projectId*string
name*string
description*string|null
prompt*string
triggers*array<||||||>
model*|

The pinned model, or null when the automation is unpinned and each run resolves the run-as principal's default model at run creation.

repos*array<>
threadMode*string
One of"new""single"
slackImpersonation*boolean
quietSlackPosts*boolean
singleJamId*string|null
mcpOverrides*|null
maxRunsPerDay*integer|null
machineSize*|null
organize*|

How each run's thread lands on the board, applied as the run-as principal when the run creates its thread: pinned, filed into folders, tagged. Null organizes nothing.

enabled*boolean
deleted*boolean
disabledReason*|null
runAsKind*string
One of"human""service"
runAsId*string
runCount*integer
lastTriggeredAt*string|null
nextRunAt?string
createdAt*string
updatedAt*string
webhookUrl*|

The incoming-webhook URL, present only when this save minted the credential: a create with an incoming_webhook trigger, or an update that adds one. It is shown once and never appears in later automation reads.

curl -X POST 'https://api.capy.ai/api/v1/automations' \  -H 'Content-Type: application/json' \  -d '{  "requestId": "string",  "projectId": "string",  "name": "string",  "prompt": "string",  "triggers": [    {      "type": "schedule",      "cron": "string",      "timezone": "string"    }  ]}'
{  "id": "string",  "projectId": "string",  "name": "string",  "description": "string",  "prompt": "string",  "triggers": [    {      "type": "schedule",      "cron": "string",      "timezone": "string"    }  ],  "model": {    "modelId": "string",    "reasoningMode": "none",    "modes": {      "fast": true,      "pro": true,      "ultrafast": true,      "daybreak": true    }  },  "repos": [    {      "repo": "string",      "branch": "string"    }  ],  "threadMode": "new",  "slackImpersonation": true,  "quietSlackPosts": true,  "singleJamId": "string",  "mcpOverrides": {    "enabled_server_keys": [      "string"    ],    "disabled_server_keys": [      "string"    ]  },  "maxRunsPerDay": 0,  "machineSize": "small",  "organize": {    "pin": true,    "folders": [      "string"    ],    "tags": [      "string"    ]  },  "enabled": true,  "deleted": true,  "disabledReason": "run_as_unavailable",  "runAsKind": "human",  "runAsId": "string",  "runCount": 0,  "lastTriggeredAt": "string",  "nextRunAt": "string",  "createdAt": "string",  "updatedAt": "string",  "webhookUrl": "string"}
Open in Capy