> For the complete documentation index, see [llms.txt](https://argos-ci.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://argos-ci.com/docs/api-reference/reference/automations.md).

# Automations

Run actions when a build event matches your conditions — post to Slack, Microsoft Teams or Discord when a build completes or is reviewed.

## List a project's automation rules

> List the automation rules of a project, most recent first. Requires administrator access to the project.

````json
{"openapi":"3.2.0","info":{"title":"Argos API","version":"2.0.0"},"tags":[{"name":"Automations","description":"Run actions when a build event matches your conditions — post to Slack, Microsoft Teams or Discord when a build completes or is reviewed."}],"servers":[{"url":"https://api.argos-ci.com/v2","description":"API Endpoint"}],"security":[{"personalAccessToken":[]},{"oauth2":["projects:read"]}],"components":{"securitySchemes":{"personalAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"Personal Access Token","description":"Authenticate as a **user** with a personal access token.\n\nSend it as a bearer token in the `Authorization` header:\n\n```http\nAuthorization: Bearer <personal-access-token>\n```\n\nPersonal access tokens act on behalf of the user that created them\nand are required by endpoints that perform user actions, such as\nreviewing builds and posting comments."},"oauth2":{"type":"oauth2","description":"Authenticate as a **user** via an OAuth 2.1 access token obtained\nthrough the authorization-code (+ PKCE) flow. Used by the CLI and by\nMCP clients/agents. The token acts on behalf of the authorizing user,\nlimited to the granted scopes and organizations.","flows":{"authorizationCode":{"authorizationUrl":"https://app.argos-ci.com/oauth/authorize","tokenUrl":"https://app.argos-ci.com/oauth/token","refreshUrl":"https://app.argos-ci.com/oauth/token","scopes":{"profile":"Read your Argos profile and the list of teams you belong to.","projects:read":"Read your projects, builds, screenshots, diffs, tests, and analytics.","projects:write":"Create and configure projects and their settings.","builds:write":"Create and upload builds and screenshots.","reviews:write":"Approve, reject, or dismiss build reviews and ignore changes.","comments:read":"Read build comments and threads.","comments:write":"Post, edit, and delete comments, add reactions, and manage subscriptions.","media:read":"Read the images and videos uploaded to your teams.","media:write":"Upload images and videos, and delete the ones already uploaded.","account:admin":"Manage organization settings and members."}}}}},"schemas":{"PageInfo":{"type":"object","properties":{"total":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"perPage":{"type":"number","description":"Number of items per page"}},"required":["total","page","perPage"],"additionalProperties":false,"description":"Page information"},"AutomationRule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean","description":"Whether the rule still fires. Deactivated rules keep their run history."},"events":{"type":"array","items":{"$ref":"#/components/schemas/AutomationEvent"}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/AutomationConditionOutput"}},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"actionPayload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["action","actionPayload"],"additionalProperties":false},"description":"The actions as stored, with their targets already resolved (a Slack channel id, a webhook id)."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","active","events","conditions","actions","createdAt","updatedAt"],"additionalProperties":false,"description":"A rule that runs actions when a build event matches its conditions."},"AutomationEvent":{"type":"string","enum":["build.completed","build.reviewed"],"description":"An event an automation rule can react to."},"AutomationConditionOutput":{"anyOf":[{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false}},"required":["glob"],"additionalProperties":false}]},{"type":"object","properties":{"not":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false}},"required":["glob"],"additionalProperties":false}]}},"required":["not"],"additionalProperties":false}],"description":"A condition narrowing when a rule fires. Conditions are combined with AND; wrap one in `{ not: … }` to negate it, or `{ glob: … }` to match a branch by pattern."},"Error":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false,"description":"Error response"}}},"paths":{"/projects/{owner}/{project}/automation-rules":{"get":{"operationId":"listAutomationRules","summary":"List a project's automation rules","description":"List the automation rules of a project, most recent first. Requires administrator access to the project.","tags":["Automations"],"parameters":[{"in":"path","name":"owner","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"project","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"perPage","schema":{"description":"Number of items per page (max 100)","type":"string"},"description":"Number of items per page (max 100)"},{"in":"query","name":"page","schema":{"description":"Page number","type":"string"},"description":"Page number"},{"in":"query","name":"active","schema":{"description":"Restrict to rules that still fire (`true`) or to deactivated ones (`false`). Omit for both.","type":"string","enum":["true","false"]},"description":"Restrict to rules that still fire (`true`) or to deactivated ones (`false`). Omit for both."}],"responses":{"200":{"description":"List of automation rules","content":{"application/json":{"schema":{"type":"object","properties":{"pageInfo":{"$ref":"#/components/schemas/PageInfo"},"results":{"type":"array","items":{"$ref":"#/components/schemas/AutomationRule"}}},"required":["pageInfo","results"],"additionalProperties":false}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Create an automation rule

> Create an automation rule on a project. Requires administrator access to the project. Action targets must belong to the project's account.

````json
{"openapi":"3.2.0","info":{"title":"Argos API","version":"2.0.0"},"tags":[{"name":"Automations","description":"Run actions when a build event matches your conditions — post to Slack, Microsoft Teams or Discord when a build completes or is reviewed."}],"servers":[{"url":"https://api.argos-ci.com/v2","description":"API Endpoint"}],"security":[{"personalAccessToken":[]},{"oauth2":["projects:write"]}],"components":{"securitySchemes":{"personalAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"Personal Access Token","description":"Authenticate as a **user** with a personal access token.\n\nSend it as a bearer token in the `Authorization` header:\n\n```http\nAuthorization: Bearer <personal-access-token>\n```\n\nPersonal access tokens act on behalf of the user that created them\nand are required by endpoints that perform user actions, such as\nreviewing builds and posting comments."},"oauth2":{"type":"oauth2","description":"Authenticate as a **user** via an OAuth 2.1 access token obtained\nthrough the authorization-code (+ PKCE) flow. Used by the CLI and by\nMCP clients/agents. The token acts on behalf of the authorizing user,\nlimited to the granted scopes and organizations.","flows":{"authorizationCode":{"authorizationUrl":"https://app.argos-ci.com/oauth/authorize","tokenUrl":"https://app.argos-ci.com/oauth/token","refreshUrl":"https://app.argos-ci.com/oauth/token","scopes":{"profile":"Read your Argos profile and the list of teams you belong to.","projects:read":"Read your projects, builds, screenshots, diffs, tests, and analytics.","projects:write":"Create and configure projects and their settings.","builds:write":"Create and upload builds and screenshots.","reviews:write":"Approve, reject, or dismiss build reviews and ignore changes.","comments:read":"Read build comments and threads.","comments:write":"Post, edit, and delete comments, add reactions, and manage subscriptions.","media:read":"Read the images and videos uploaded to your teams.","media:write":"Upload images and videos, and delete the ones already uploaded.","account:admin":"Manage organization settings and members."}}}}},"schemas":{"AutomationEvent":{"type":"string","enum":["build.completed","build.reviewed"],"description":"An event an automation rule can react to."},"AutomationCondition":{"anyOf":[{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"]}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"]}},"required":["glob"]}]},{"type":"object","properties":{"not":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"]}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"]}},"required":["glob"]}]}},"required":["not"]}],"description":"A condition narrowing when a rule fires. Conditions are combined with AND; wrap one in `{ not: … }` to negate it, or `{ glob: … }` to match a branch by pattern."},"AutomationActionInput":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"sendSlackMessage"},"payload":{"type":"object","properties":{"slackId":{"default":"","type":"string","maxLength":256},"name":{"type":"string","minLength":1,"maxLength":256}},"required":["name"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","const":"sendMsTeamsMessage"},"payload":{"type":"object","properties":{"webhookId":{"type":"string","minLength":1}},"required":["webhookId"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","const":"sendDiscordMessage"},"payload":{"type":"object","properties":{"webhookId":{"type":"string","minLength":1}},"required":["webhookId"]}},"required":["type","payload"]}],"description":"An action to run. Slack channels are addressed by `slackId` when known, otherwise by `name`; Teams and Discord by the id of a webhook registered on the project's account.","type":"object"},"AutomationRule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean","description":"Whether the rule still fires. Deactivated rules keep their run history."},"events":{"type":"array","items":{"$ref":"#/components/schemas/AutomationEvent"}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/AutomationConditionOutput"}},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"actionPayload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["action","actionPayload"],"additionalProperties":false},"description":"The actions as stored, with their targets already resolved (a Slack channel id, a webhook id)."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","active","events","conditions","actions","createdAt","updatedAt"],"additionalProperties":false,"description":"A rule that runs actions when a build event matches its conditions."},"AutomationConditionOutput":{"anyOf":[{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false}},"required":["glob"],"additionalProperties":false}]},{"type":"object","properties":{"not":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false}},"required":["glob"],"additionalProperties":false}]}},"required":["not"],"additionalProperties":false}],"description":"A condition narrowing when a rule fires. Conditions are combined with AND; wrap one in `{ not: … }` to negate it, or `{ glob: … }` to match a branch by pattern."},"Error":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false,"description":"Error response"}}},"paths":{"/projects/{owner}/{project}/automation-rules":{"post":{"operationId":"createAutomationRule","summary":"Create an automation rule","description":"Create an automation rule on a project. Requires administrator access to the project. Action targets must belong to the project's account.","tags":["Automations"],"parameters":[{"in":"path","name":"owner","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"project","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":100},"events":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/AutomationEvent"}},"conditions":{"default":[],"type":"array","items":{"$ref":"#/components/schemas/AutomationCondition"}},"actions":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/AutomationActionInput"}}},"required":["name","events","actions"]}}}},"responses":{"201":{"description":"The created rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRule"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Get an automation rule

> Retrieve a single automation rule. Requires administrator access to the project.

````json
{"openapi":"3.2.0","info":{"title":"Argos API","version":"2.0.0"},"tags":[{"name":"Automations","description":"Run actions when a build event matches your conditions — post to Slack, Microsoft Teams or Discord when a build completes or is reviewed."}],"servers":[{"url":"https://api.argos-ci.com/v2","description":"API Endpoint"}],"security":[{"personalAccessToken":[]},{"oauth2":["projects:read"]}],"components":{"securitySchemes":{"personalAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"Personal Access Token","description":"Authenticate as a **user** with a personal access token.\n\nSend it as a bearer token in the `Authorization` header:\n\n```http\nAuthorization: Bearer <personal-access-token>\n```\n\nPersonal access tokens act on behalf of the user that created them\nand are required by endpoints that perform user actions, such as\nreviewing builds and posting comments."},"oauth2":{"type":"oauth2","description":"Authenticate as a **user** via an OAuth 2.1 access token obtained\nthrough the authorization-code (+ PKCE) flow. Used by the CLI and by\nMCP clients/agents. The token acts on behalf of the authorizing user,\nlimited to the granted scopes and organizations.","flows":{"authorizationCode":{"authorizationUrl":"https://app.argos-ci.com/oauth/authorize","tokenUrl":"https://app.argos-ci.com/oauth/token","refreshUrl":"https://app.argos-ci.com/oauth/token","scopes":{"profile":"Read your Argos profile and the list of teams you belong to.","projects:read":"Read your projects, builds, screenshots, diffs, tests, and analytics.","projects:write":"Create and configure projects and their settings.","builds:write":"Create and upload builds and screenshots.","reviews:write":"Approve, reject, or dismiss build reviews and ignore changes.","comments:read":"Read build comments and threads.","comments:write":"Post, edit, and delete comments, add reactions, and manage subscriptions.","media:read":"Read the images and videos uploaded to your teams.","media:write":"Upload images and videos, and delete the ones already uploaded.","account:admin":"Manage organization settings and members."}}}}},"schemas":{"AutomationRule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean","description":"Whether the rule still fires. Deactivated rules keep their run history."},"events":{"type":"array","items":{"$ref":"#/components/schemas/AutomationEvent"}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/AutomationConditionOutput"}},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"actionPayload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["action","actionPayload"],"additionalProperties":false},"description":"The actions as stored, with their targets already resolved (a Slack channel id, a webhook id)."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","active","events","conditions","actions","createdAt","updatedAt"],"additionalProperties":false,"description":"A rule that runs actions when a build event matches its conditions."},"AutomationEvent":{"type":"string","enum":["build.completed","build.reviewed"],"description":"An event an automation rule can react to."},"AutomationConditionOutput":{"anyOf":[{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false}},"required":["glob"],"additionalProperties":false}]},{"type":"object","properties":{"not":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false}},"required":["glob"],"additionalProperties":false}]}},"required":["not"],"additionalProperties":false}],"description":"A condition narrowing when a rule fires. Conditions are combined with AND; wrap one in `{ not: … }` to negate it, or `{ glob: … }` to match a branch by pattern."},"Error":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false,"description":"Error response"}}},"paths":{"/projects/{owner}/{project}/automation-rules/{ruleId}":{"get":{"operationId":"getAutomationRule","summary":"Get an automation rule","description":"Retrieve a single automation rule. Requires administrator access to the project.","tags":["Automations"],"parameters":[{"in":"path","name":"owner","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"project","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"ruleId","schema":{"type":"string","description":"Identifier of the automation rule."},"required":true,"description":"Identifier of the automation rule."}],"responses":{"200":{"description":"The automation rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRule"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Update an automation rule

> Replace an automation rule's definition. Requires administrator access to the project. The whole definition is replaced, so send the events, conditions and actions you want the rule to end up with.

````json
{"openapi":"3.2.0","info":{"title":"Argos API","version":"2.0.0"},"tags":[{"name":"Automations","description":"Run actions when a build event matches your conditions — post to Slack, Microsoft Teams or Discord when a build completes or is reviewed."}],"servers":[{"url":"https://api.argos-ci.com/v2","description":"API Endpoint"}],"security":[{"personalAccessToken":[]},{"oauth2":["projects:write"]}],"components":{"securitySchemes":{"personalAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"Personal Access Token","description":"Authenticate as a **user** with a personal access token.\n\nSend it as a bearer token in the `Authorization` header:\n\n```http\nAuthorization: Bearer <personal-access-token>\n```\n\nPersonal access tokens act on behalf of the user that created them\nand are required by endpoints that perform user actions, such as\nreviewing builds and posting comments."},"oauth2":{"type":"oauth2","description":"Authenticate as a **user** via an OAuth 2.1 access token obtained\nthrough the authorization-code (+ PKCE) flow. Used by the CLI and by\nMCP clients/agents. The token acts on behalf of the authorizing user,\nlimited to the granted scopes and organizations.","flows":{"authorizationCode":{"authorizationUrl":"https://app.argos-ci.com/oauth/authorize","tokenUrl":"https://app.argos-ci.com/oauth/token","refreshUrl":"https://app.argos-ci.com/oauth/token","scopes":{"profile":"Read your Argos profile and the list of teams you belong to.","projects:read":"Read your projects, builds, screenshots, diffs, tests, and analytics.","projects:write":"Create and configure projects and their settings.","builds:write":"Create and upload builds and screenshots.","reviews:write":"Approve, reject, or dismiss build reviews and ignore changes.","comments:read":"Read build comments and threads.","comments:write":"Post, edit, and delete comments, add reactions, and manage subscriptions.","media:read":"Read the images and videos uploaded to your teams.","media:write":"Upload images and videos, and delete the ones already uploaded.","account:admin":"Manage organization settings and members."}}}}},"schemas":{"AutomationEvent":{"type":"string","enum":["build.completed","build.reviewed"],"description":"An event an automation rule can react to."},"AutomationCondition":{"anyOf":[{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"]}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"]}},"required":["glob"]}]},{"type":"object","properties":{"not":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"]}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"]}},"required":["glob"]}]}},"required":["not"]}],"description":"A condition narrowing when a rule fires. Conditions are combined with AND; wrap one in `{ not: … }` to negate it, or `{ glob: … }` to match a branch by pattern."},"AutomationActionInput":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"sendSlackMessage"},"payload":{"type":"object","properties":{"slackId":{"default":"","type":"string","maxLength":256},"name":{"type":"string","minLength":1,"maxLength":256}},"required":["name"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","const":"sendMsTeamsMessage"},"payload":{"type":"object","properties":{"webhookId":{"type":"string","minLength":1}},"required":["webhookId"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","const":"sendDiscordMessage"},"payload":{"type":"object","properties":{"webhookId":{"type":"string","minLength":1}},"required":["webhookId"]}},"required":["type","payload"]}],"description":"An action to run. Slack channels are addressed by `slackId` when known, otherwise by `name`; Teams and Discord by the id of a webhook registered on the project's account.","type":"object"},"AutomationRule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean","description":"Whether the rule still fires. Deactivated rules keep their run history."},"events":{"type":"array","items":{"$ref":"#/components/schemas/AutomationEvent"}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/AutomationConditionOutput"}},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"actionPayload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["action","actionPayload"],"additionalProperties":false},"description":"The actions as stored, with their targets already resolved (a Slack channel id, a webhook id)."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","active","events","conditions","actions","createdAt","updatedAt"],"additionalProperties":false,"description":"A rule that runs actions when a build event matches its conditions."},"AutomationConditionOutput":{"anyOf":[{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false}},"required":["glob"],"additionalProperties":false}]},{"type":"object","properties":{"not":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false}},"required":["glob"],"additionalProperties":false}]}},"required":["not"],"additionalProperties":false}],"description":"A condition narrowing when a rule fires. Conditions are combined with AND; wrap one in `{ not: … }` to negate it, or `{ glob: … }` to match a branch by pattern."},"Error":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false,"description":"Error response"}}},"paths":{"/projects/{owner}/{project}/automation-rules/{ruleId}":{"put":{"operationId":"updateAutomationRule","summary":"Update an automation rule","description":"Replace an automation rule's definition. Requires administrator access to the project. The whole definition is replaced, so send the events, conditions and actions you want the rule to end up with.","tags":["Automations"],"parameters":[{"in":"path","name":"owner","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"project","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"ruleId","schema":{"type":"string","description":"Identifier of the automation rule."},"required":true,"description":"Identifier of the automation rule."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":100},"events":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/AutomationEvent"}},"conditions":{"default":[],"type":"array","items":{"$ref":"#/components/schemas/AutomationCondition"}},"actions":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/AutomationActionInput"}}},"required":["name","events","actions"]}}}},"responses":{"200":{"description":"The updated rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRule"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Deactivate an automation rule

> Stop a rule from firing. Rules are never deleted — a deactivated one keeps its run history, which is what tells you why something fired. Requires administrator access to the project.

````json
{"openapi":"3.2.0","info":{"title":"Argos API","version":"2.0.0"},"tags":[{"name":"Automations","description":"Run actions when a build event matches your conditions — post to Slack, Microsoft Teams or Discord when a build completes or is reviewed."}],"servers":[{"url":"https://api.argos-ci.com/v2","description":"API Endpoint"}],"security":[{"personalAccessToken":[]},{"oauth2":["projects:write"]}],"components":{"securitySchemes":{"personalAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"Personal Access Token","description":"Authenticate as a **user** with a personal access token.\n\nSend it as a bearer token in the `Authorization` header:\n\n```http\nAuthorization: Bearer <personal-access-token>\n```\n\nPersonal access tokens act on behalf of the user that created them\nand are required by endpoints that perform user actions, such as\nreviewing builds and posting comments."},"oauth2":{"type":"oauth2","description":"Authenticate as a **user** via an OAuth 2.1 access token obtained\nthrough the authorization-code (+ PKCE) flow. Used by the CLI and by\nMCP clients/agents. The token acts on behalf of the authorizing user,\nlimited to the granted scopes and organizations.","flows":{"authorizationCode":{"authorizationUrl":"https://app.argos-ci.com/oauth/authorize","tokenUrl":"https://app.argos-ci.com/oauth/token","refreshUrl":"https://app.argos-ci.com/oauth/token","scopes":{"profile":"Read your Argos profile and the list of teams you belong to.","projects:read":"Read your projects, builds, screenshots, diffs, tests, and analytics.","projects:write":"Create and configure projects and their settings.","builds:write":"Create and upload builds and screenshots.","reviews:write":"Approve, reject, or dismiss build reviews and ignore changes.","comments:read":"Read build comments and threads.","comments:write":"Post, edit, and delete comments, add reactions, and manage subscriptions.","media:read":"Read the images and videos uploaded to your teams.","media:write":"Upload images and videos, and delete the ones already uploaded.","account:admin":"Manage organization settings and members."}}}}},"schemas":{"AutomationRule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean","description":"Whether the rule still fires. Deactivated rules keep their run history."},"events":{"type":"array","items":{"$ref":"#/components/schemas/AutomationEvent"}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/AutomationConditionOutput"}},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"actionPayload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["action","actionPayload"],"additionalProperties":false},"description":"The actions as stored, with their targets already resolved (a Slack channel id, a webhook id)."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","active","events","conditions","actions","createdAt","updatedAt"],"additionalProperties":false,"description":"A rule that runs actions when a build event matches its conditions."},"AutomationEvent":{"type":"string","enum":["build.completed","build.reviewed"],"description":"An event an automation rule can react to."},"AutomationConditionOutput":{"anyOf":[{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false}},"required":["glob"],"additionalProperties":false}]},{"type":"object","properties":{"not":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-conclusion"},"value":{"anyOf":[{"type":"string","enum":["no-changes","changes-detected"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-mode"},"value":{"anyOf":[{"type":"string","enum":["ci","monitoring"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-name"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"build-type"},"value":{"anyOf":[{"type":"string","enum":["reference","check","orphan","skipped"]},{"type":"null"}]}},"required":["type","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"glob":{"type":"object","properties":{"type":{"type":"string","const":"build-branch"},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false}},"required":["glob"],"additionalProperties":false}]}},"required":["not"],"additionalProperties":false}],"description":"A condition narrowing when a rule fires. Conditions are combined with AND; wrap one in `{ not: … }` to negate it, or `{ glob: … }` to match a branch by pattern."},"Error":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false,"description":"Error response"}}},"paths":{"/projects/{owner}/{project}/automation-rules/{ruleId}/deactivate":{"post":{"operationId":"deactivateAutomationRule","summary":"Deactivate an automation rule","description":"Stop a rule from firing. Rules are never deleted — a deactivated one keeps its run history, which is what tells you why something fired. Requires administrator access to the project.","tags":["Automations"],"parameters":[{"in":"path","name":"owner","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"project","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"ruleId","schema":{"type":"string","description":"Identifier of the automation rule."},"required":true,"description":"Identifier of the automation rule."}],"responses":{"200":{"description":"The deactivated rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRule"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://argos-ci.com/docs/api-reference/reference/automations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
