Saltar para o conteúdo principal
PATCH
/
public
/
api
/
v1
/
agents
/
{agentPublicId}
/
automations
/
{automationPublicId}
Update automation
curl --request PATCH \
  --url https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/automations/{automationPublicId} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "description": "Runs every morning and emails the invoice digest.",
  "name": "Daily invoice summary",
  "prompt": "Summarize the invoices created in the last 24 hours and send the digest.",
  "schedule": "@daily",
  "timezone": "America/Sao_Paulo",
  "triggerConfig": {},
  "triggerSlug": "GMAIL_NEW_EMAIL",
  "triggerToolkitSlug": "gmail"
}
'
{
  "createdAt": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "lastRunAt": "2023-11-07T05:31:56Z",
  "lastRunStatus": "<string>",
  "name": "<string>",
  "nextRunAt": "2023-11-07T05:31:56Z",
  "prompt": "<string>",
  "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "schedule": "<string>",
  "timezone": "<string>",
  "triggerConfig": {},
  "triggerSlug": "<string>",
  "triggerToolkitSlug": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Autorizações

X-Api-Key
string
header
obrigatório

Parâmetros de caminho

agentPublicId
string<uuid>
obrigatório
automationPublicId
string<uuid>
obrigatório

Corpo

application/json

Body for updating an existing automation. All fields are optional; only provided fields are updated.

description
string

New short description shown in the automation list.

Maximum string length: 500
Exemplo:

"Runs every morning and emails the invoice digest."

hitlMode
enum<string>

New human-in-the-loop approval mode for this automation.

Opções disponíveis:
auto_approve,
pause_on_approval
name
string

New display name of the automation.

Maximum string length: 150
Exemplo:

"Daily invoice summary"

prompt
string

New prompt executed by the automation when triggered.

Maximum string length: 10000
Exemplo:

"Summarize the invoices created in the last 24 hours and send the digest."

schedule
string

New cron expression for scheduled triggerMode.

Maximum string length: 100
Exemplo:

"@daily"

status
enum<string>

New status of the automation (active, paused, etc.).

Opções disponíveis:
active,
inactive
timezone
string

New IANA timezone in which the schedule cron should be interpreted.

Maximum string length: 50
Exemplo:

"America/Sao_Paulo"

triggerConfig
object

New trigger-specific configuration object. Shape depends on the triggerSlug.

triggerMode
enum<string>

New trigger mode (e.g. schedule, manual, external event).

Opções disponíveis:
manual,
schedule,
webhook,
webhook_url
triggerSlug
string

New trigger slug within the toolkit.

Maximum string length: 200
Exemplo:

"GMAIL_NEW_EMAIL"

triggerToolkitSlug
string

New Composio toolkit slug used to source the trigger.

Maximum string length: 100
Exemplo:

"gmail"

Resposta

OK

Scheduled / trigger-based agent automation.

createdAt
string<date-time>
description
string
hitlMode
enum<string>
Opções disponíveis:
auto_approve,
pause_on_approval
lastRunAt
string<date-time>
lastRunStatus
string
name
string
nextRunAt
string<date-time>
prompt
string
publicId
string<uuid>
schedule
string
status
enum<string>
Opções disponíveis:
active,
inactive
timezone
string
triggerConfig
object
triggerMode
enum<string>
Opções disponíveis:
manual,
schedule,
webhook,
webhook_url
triggerSlug
string
triggerToolkitSlug
string
updatedAt
string<date-time>