API ReferenceTriggers

Create or update a trigger

Markdown
POST
/api/v3/trigger_instances/{slug}/upsert

Creates a new trigger instance or updates an existing one with the same configuration. Triggers listen for events from external services (webhooks or polling) and can invoke your workflows. If a matching trigger already exists and is disabled, it will be re-enabled. Requires a connected account ID to associate the trigger with a specific user connection.

Authorization

ApiKeyAuth
x-api-key<token>

API key authentication

In: header

Path Parameters

slug*string

The slug of the trigger instance. Case-insensitive (internally normalized to uppercase).

Request Body

application/json

connectedAuthId?stringDeprecated

DEPRECATED: This parameter will be removed in a future version. Please use connected_account_id instead.

FormatconnectedAccountId
triggerConfig?Deprecated

DEPRECATED: This parameter will be removed in a future version. Please use trigger_config instead.

connected_account_id?string

Connected account nanoid

FormatconnectedAccountId
trigger_config?

Trigger configuration

version?stringDeprecated

DEPRECATED: This parameter will be removed in a future version. Please use toolkit_versions instead.

toolkit_versions?string||

Toolkit version specification. Supports "latest" string or a record mapping toolkit slugs to specific versions.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://backend.composio.dev/api/v3/trigger_instances/string/upsert" \  -H "Content-Type: application/json" \  -d '{}'
{
  "trigger_id": "string",
  "deprecated": {
    "uuid": "string"
  }
}
{
  "trigger_id": "string",
  "deprecated": {
    "uuid": "string"
  }
}
{}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}