diff --git a/doc/compiled.json b/doc/compiled.json index 46fd61a1..f30b9b88 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -28849,6 +28849,51 @@ } ] } + }, + "/accounts/{account_id}/automations/{automation_id}/trigger": { + "post": { + "summary": "Trigger an automation", + "description": "Trigger an automation.\n", + "operationId": "automation/trigger", + "tags": [ + "Automations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/X-PhraseApp-OTP" + }, + { + "$ref": "#/components/parameters/account_id" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "429": { + "$ref": "#/components/responses/429" + } + }, + "x-code-samples": [ + { + "lang": "Curl", + "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/automations/:id/trigger\" \\\n -u USERNAME_OR_ACCESS_TOKEN\n -X POST\n -H 'Content-Type: application/json'" + }, + { + "lang": "CLI v2", + "source": "phrase automations trigger \\\n--account_id \\\n--id \\\n--access_token " + } + ] + } } } } diff --git a/paths.yaml b/paths.yaml index a6584f39..a16e6459 100644 --- a/paths.yaml +++ b/paths.yaml @@ -735,3 +735,6 @@ "/accounts/{account_id}/automations/{automation_id}/deactivate": post: "$ref": "./paths/automations/deactivate.yaml" +"/accounts/{account_id}/automations/{automation_id}/trigger": + post: + "$ref": "./paths/automations/trigger.yaml" diff --git a/paths/automations/trigger.yaml b/paths/automations/trigger.yaml new file mode 100644 index 00000000..353408f6 --- /dev/null +++ b/paths/automations/trigger.yaml @@ -0,0 +1,33 @@ +--- +summary: Trigger an automation +description: | + Trigger an automation. +operationId: automation/trigger +tags: +- Automations +parameters: +- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" +- "$ref": "../../parameters.yaml#/account_id" +- "$ref": "../../parameters.yaml#/id" +responses: + '204': + "$ref": "../../responses.yaml#/204" + '400': + "$ref": "../../responses.yaml#/400" + '404': + "$ref": "../../responses.yaml#/404" + '429': + "$ref": "../../responses.yaml#/429" +x-code-samples: +- lang: Curl + source: |- + curl "https://api.phrase.com/v2/accounts/:account_id/automations/:id/trigger" \ + -u USERNAME_OR_ACCESS_TOKEN + -X POST + -H 'Content-Type: application/json' +- lang: CLI v2 + source: |- + phrase automations trigger \ + --account_id \ + --id \ + --access_token