Automation
21 methods on the Automation resource.
21 methods · 18 available to app tokens36 pages in SDK Reference
import { Compozy } from "@compozy/client";21 of 21
acceptAutomationSuggestioncreateAutomationJobcreateAutomationTriggerdeleteAutomationJobdeleteAutomationTriggerdeliverGlobalWebhookdeliverWorkspaceWebhookdismissAutomationSuggestiongetAutomationJobgetAutomationRungetAutomationTriggerlistAutomationJobRunslistAutomationJobslistAutomationRunslistAutomationSuggestionslistAutomationSuggestionsAggregatelistAutomationTriggerRunslistAutomationTriggerstriggerAutomationJobupdateAutomationJobupdateAutomationTrigger
acceptAutomationSuggestion
Accept one automation suggestion and create its Job
compozy.automation.acceptAutomationSuggestion({ path }) → Promise<AutomationSuggestionAcceptanceResponse>
Options
- workspace_idstringpathrequired
- Workspace id
- suggestion_idstringpathrequired
- Automation suggestion id
POST /api/workspaces/{workspace_id}/automation/suggestions/{suggestion_id}/acceptapp tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.acceptAutomationSuggestion({ path: { "workspace_id": "workspace_id", "suggestion_id": "suggestion_id" } });createAutomationJob
Create an automation job
compozy.automation.createAutomationJob({ query, body }) → Promise<JobResponse>
Options
- profilestringquery
- Act as this profile by name
Request bodyCreateJobRequest
POST /api/automation/jobsapp tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.createAutomationJob({ body: { /* request fields */ } });createAutomationTrigger
Create an automation trigger
compozy.automation.createAutomationTrigger({ query, body }) → Promise<TriggerResponse>
Options
- profilestringquery
- Act as this profile by name
Request bodyCreateTriggerRequest
POST /api/automation/triggersapp tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.createAutomationTrigger({ body: { /* request fields */ } });deleteAutomationJob
Delete one automation job
compozy.automation.deleteAutomationJob({ path, query }) → Promise<void>
Options
- idstringpathrequired
- Automation job id
- profilestringquery
- Act as this profile by name
DELETE /api/automation/jobs/{id}app tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.deleteAutomationJob({ path: { "id": "id" } });deleteAutomationTrigger
Delete one automation trigger
compozy.automation.deleteAutomationTrigger({ path, query }) → Promise<void>
Options
- idstringpathrequired
- Automation trigger id
- profilestringquery
- Act as this profile by name
DELETE /api/automation/triggers/{id}app tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.deleteAutomationTrigger({ path: { "id": "id" } });deliverGlobalWebhook
Deliver one global automation webhook
compozy.automation.deliverGlobalWebhook({ path, query, headers, body }) → Promise<WebhookDeliveryResponse>
Options
- endpointstringpathrequired
- Webhook endpoint slug and id
- X-Compozy-Webhook-Delivery-IDstringheaderrequired
- Unique webhook delivery id
- X-Compozy-Webhook-Timestampstringheaderrequired
- Signed webhook timestamp
- X-Compozy-Webhook-Signaturestringheaderrequired
- Signed webhook HMAC signature
- profilestringquery
- Act as this profile by name
Request bodyDeliverGlobalWebhookData["body"]
POST /api/webhooks/global/{endpoint}app tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.deliverGlobalWebhook({ path: { "endpoint": "endpoint" }, headers: { "X-Compozy-Webhook-Delivery-ID": "X-Compozy-Webhook-Delivery-ID", "X-Compozy-Webhook-Timestamp": "X-Compozy-Webhook-Timestamp", "X-Compozy-Webhook-Signature": "X-Compozy-Webhook-Signature" }, body: { /* request fields */ } });deliverWorkspaceWebhook
Deliver one workspace-scoped automation webhook
compozy.automation.deliverWorkspaceWebhook({ path, query, headers, body }) → Promise<WebhookDeliveryResponse>
Options
- workspace_idstringpathrequired
- Workspace id
- endpointstringpathrequired
- Webhook endpoint slug and id
- X-Compozy-Webhook-Delivery-IDstringheaderrequired
- Unique webhook delivery id
- X-Compozy-Webhook-Timestampstringheaderrequired
- Signed webhook timestamp
- X-Compozy-Webhook-Signaturestringheaderrequired
- Signed webhook HMAC signature
- profilestringquery
- Act as this profile by name
Request bodyDeliverWorkspaceWebhookData["body"]
POST /api/webhooks/workspaces/{workspace_id}/{endpoint}app tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.deliverWorkspaceWebhook({ path: { "workspace_id": "workspace_id", "endpoint": "endpoint" }, headers: { "X-Compozy-Webhook-Delivery-ID": "X-Compozy-Webhook-Delivery-ID", "X-Compozy-Webhook-Timestamp": "X-Compozy-Webhook-Timestamp", "X-Compozy-Webhook-Signature": "X-Compozy-Webhook-Signature" }, body: { /* request fields */ } });dismissAutomationSuggestion
Durably dismiss one automation suggestion
compozy.automation.dismissAutomationSuggestion({ path }) → Promise<AutomationSuggestionResponse>
Options
- workspace_idstringpathrequired
- Workspace id
- suggestion_idstringpathrequired
- Automation suggestion id
POST /api/workspaces/{workspace_id}/automation/suggestions/{suggestion_id}/dismissapp tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.dismissAutomationSuggestion({ path: { "workspace_id": "workspace_id", "suggestion_id": "suggestion_id" } });getAutomationJob
Get one automation job
compozy.automation.getAutomationJob({ path, query }) → Promise<JobResponse>
Options
- idstringpathrequired
- Automation job id
- profilestringquery
- Read one profile's rows by name
- all_profilesbooleanquery
- Read the owner-labeled all-profiles aggregate
GET /api/automation/jobs/{id}app tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.getAutomationJob({ path: { "id": "id" } });getAutomationRun
Get one automation run
compozy.automation.getAutomationRun({ path, query }) → Promise<RunResponse>
Options
- idstringpathrequired
- Automation run id
- profilestringquery
- Read one profile's rows by name
- all_profilesbooleanquery
- Read the owner-labeled all-profiles aggregate
GET /api/automation/runs/{id}app tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.getAutomationRun({ path: { "id": "id" } });Show all 21 methods
getAutomationTrigger
Get one automation trigger
compozy.automation.getAutomationTrigger({ path, query }) → Promise<TriggerResponse>
Options
- idstringpathrequired
- Automation trigger id
- profilestringquery
- Read one profile's rows by name
- all_profilesbooleanquery
- Read the owner-labeled all-profiles aggregate
GET /api/automation/triggers/{id}app tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.getAutomationTrigger({ path: { "id": "id" } });listAutomationJobRuns
List run history for one automation job
compozy.automation.listAutomationJobRuns({ path, query }) → Promise<RunsResponse>
Options
- idstringpathrequired
- Automation job id
- status"scheduled" | "running" | "delegated" | "completed" | "failed" | "canceled"query
- Filter by run status
- sincestringquery
- Only runs started since this timestamp
- untilstringquery
- Only runs started before this timestamp
- limitintegerquery
- Maximum number of records to return
- profilestringquery
- Read one profile's rows by name
- all_profilesbooleanquery
- Read the owner-labeled all-profiles aggregate
GET /api/automation/jobs/{id}/runsapp tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.listAutomationJobRuns({ path: { "id": "id" }, query: { "status": "scheduled" } });listAutomationJobs
List automation jobs
compozy.automation.listAutomationJobs({ query }) → Promise<JobsResponse>
Options
- scope"global" | "workspace" | "user" | "@user"query
- Filter by automation scope
- workspace_idstringquery
- Filter by workspace id
- all_workspacesbooleanquery
- Read every definition
- workspace_idsstring[]query
- Project IDs or @user; requires all_workspaces=true
- source"config" | "package" | "dynamic"query
- Filter by job source
- target"agent" | "loop" | "task"query
- Filter by target kind; task matches jobs with a task target
- enabledbooleanquery
- Filter by enabled state
- qstringquery
- Search jobs by name, agent, prompt, scope, source, or schedule
- cursorstringquery
- Continue after this automation job cursor
- limitintegerquery
- Maximum number of records to return
- profilestringquery
- Read one profile's rows by name
- all_profilesbooleanquery
- Read the owner-labeled all-profiles aggregate
- loopstringquery
- Filter by Loop target name
GET /api/automation/jobsapp tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.listAutomationJobs();listAutomationRuns
List automation runs
compozy.automation.listAutomationRuns({ query }) → Promise<RunsResponse>
Options
- workspace_idstringquery
- Filter by source project; @user selects User
- all_workspacesbooleanquery
- Read every run, including unknown attribution
- workspace_idsstring[]query
- Source project IDs or @user; excludes unknown attribution
- cursorstringquery
- Opaque source-filter-bound cursor
- job_idstringquery
- Filter by automation job id
- trigger_idstringquery
- Filter by automation trigger id
- status"scheduled" | "running" | "delegated" | "completed" | "failed" | "canceled"query
- Filter by run status
- sincestringquery
- Only runs started since this timestamp
- untilstringquery
- Only runs started before this timestamp
- limitintegerquery
- Maximum number of records to return
- profilestringquery
- Read one profile's rows by name
- all_profilesbooleanquery
- Read the owner-labeled all-profiles aggregate
GET /api/automation/runsapp tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.listAutomationRuns({ query: { "status": "scheduled" } });listAutomationSuggestions
List consent-first automation suggestions for one workspace
compozy.automation.listAutomationSuggestions({ path, query }) → Promise<AutomationSuggestionsResponse>
Options
- workspace_idstringpathrequired
- Workspace id
- status"pending" | "accepted" | "dismissed"query
- Filter by suggestion status
GET /api/workspaces/{workspace_id}/automation/suggestionsapp tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.listAutomationSuggestions({ path: { "workspace_id": "workspace_id" }, query: { "status": "pending" } });listAutomationSuggestionsAggregate
List consent-first automation suggestions for one workspace
compozy.automation.listAutomationSuggestionsAggregate({ query }) → Promise<AutomationSuggestionsResponse>
Options
- all_workspacesbooleanquery
- Read all projects and User rows
- workspace_idsstring[]query
- Repeatable project IDs or @user; requires all_workspaces=true
- status"pending" | "accepted" | "dismissed"query
- Filter by suggestion status
GET /api/automation/suggestionsapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.listAutomationSuggestionsAggregate({ query: { "status": "pending" } });listAutomationTriggerRuns
List run history for one automation trigger
compozy.automation.listAutomationTriggerRuns({ path, query }) → Promise<RunsResponse>
Options
- idstringpathrequired
- Automation trigger id
- status"scheduled" | "running" | "delegated" | "completed" | "failed" | "canceled"query
- Filter by run status
- sincestringquery
- Only runs started since this timestamp
- untilstringquery
- Only runs started before this timestamp
- limitintegerquery
- Maximum number of records to return
- profilestringquery
- Read one profile's rows by name
- all_profilesbooleanquery
- Read the owner-labeled all-profiles aggregate
GET /api/automation/triggers/{id}/runsapp tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.listAutomationTriggerRuns({ path: { "id": "id" }, query: { "status": "scheduled" } });listAutomationTriggers
List automation triggers
compozy.automation.listAutomationTriggers({ query }) → Promise<TriggersResponse>
Options
- scope"global" | "workspace" | "user" | "@user"query
- Filter by automation scope
- workspace_idstringquery
- Filter by workspace id
- all_workspacesbooleanquery
- Read every definition
- workspace_idsstring[]query
- Project IDs or @user; requires all_workspaces=true
- source"config" | "package" | "dynamic"query
- Filter by trigger source
- target"agent" | "loop" | "task" | "agent_instance"query
- Filter by target kind; task matches no trigger
- enabledbooleanquery
- Filter by enabled state
- eventstringquery
- Filter by trigger event
- qstringquery
- Search triggers by definition or filter fields
- cursorstringquery
- Continue after this automation trigger cursor
- limitintegerquery
- Maximum number of records to return
- profilestringquery
- Read one profile's rows by name
- all_profilesbooleanquery
- Read the owner-labeled all-profiles aggregate
- loopstringquery
- Filter by Loop target name
GET /api/automation/triggersapp tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.listAutomationTriggers();triggerAutomationJob
Trigger one automation job immediately
compozy.automation.triggerAutomationJob({ path, query }) → Promise<RunResponse>
Options
- idstringpathrequired
- Automation job id
- profilestringquery
- Act as this profile by name
POST /api/automation/jobs/{id}/triggerapp tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.triggerAutomationJob({ path: { "id": "id" } });updateAutomationJob
Update one automation job
compozy.automation.updateAutomationJob({ path, query, body }) → Promise<JobResponse>
Options
- idstringpathrequired
- Automation job id
- profilestringquery
- Act as this profile by name
Request bodyUpdateJobRequest
PATCH /api/automation/jobs/{id}app tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.updateAutomationJob({ path: { "id": "id" }, body: { /* request fields */ } });updateAutomationTrigger
Update one automation trigger
compozy.automation.updateAutomationTrigger({ path, query, body }) → Promise<TriggerResponse>
Options
- idstringpathrequired
- Automation trigger id
- profilestringquery
- Act as this profile by name
Request bodyUpdateTriggerRequest
PATCH /api/automation/triggers/{id}app tokens allowed
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.automation.updateAutomationTrigger({ path: { "id": "id" }, body: { /* request fields */ } });