Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <account_id> \\\n--id <id> \\\n--access_token <token>"
}
]
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
33 changes: 33 additions & 0 deletions paths/automations/trigger.yaml
Original file line number Diff line number Diff line change
@@ -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 <account_id> \
--id <id> \
--access_token <token>
Loading