Skip to main content
POST
/
api
/
agents
/
{agentId}
/
trigger
/
save
cURL
curl --request POST \
  --url https://app.cotool.ai/api/agents/{agentId}/trigger/save \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "secret": "<string>",
  "webhookUrl": "<string>",
  "source": "jira"
}'
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "source": "jira",
    "name": "<string>",
    "description": "<string>",
    "enabled": true,
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "secret": "<string>",
    "cronSchedule": "<string>",
    "emailAddress": "<string>",
    "config": {},
    "lastRunAttemptedAt": "<string>",
    "lastRunSucceededAt": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here

Path Parameters

agentId
string<uuid>
required

Unique identifier of the agent

Body

application/json
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6

Request body for creating a new trigger, with different fields required based on the source type

triggerId
string<uuid>
required

Unique identifier for the trigger

name
string
required

Display name for the trigger

secret
string
required

Secret for webhook authentication

webhookUrl
string
required

Webhook URL for Jira to call

source
enum<string>
required
Available options:
jira
description
string

Optional description of what this trigger does

Response

200 - application/json

Successful response

success
boolean
required
data
object
required