github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/paths/webhooks/update.yaml (about) 1 --- 2 summary: Update a webhook 3 description: Update an existing webhook. 4 operationId: webhook/update 5 tags: 6 - Webhooks 7 parameters: 8 - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" 9 - "$ref": "../../parameters.yaml#/project_id" 10 - "$ref": "../../parameters.yaml#/id" 11 responses: 12 '200': 13 description: OK 14 content: 15 application/json: 16 schema: 17 "$ref": "../../schemas/webhook.yaml#/webhook" 18 headers: 19 X-Rate-Limit-Limit: 20 "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" 21 X-Rate-Limit-Remaining: 22 "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" 23 X-Rate-Limit-Reset: 24 "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" 25 '400': 26 "$ref": "../../responses.yaml#/400" 27 '404': 28 "$ref": "../../responses.yaml#/404" 29 '429': 30 "$ref": "../../responses.yaml#/429" 31 x-code-samples: 32 - lang: Curl 33 source: |- 34 curl "https://api.phrase.com/v2/projects/:project_id/webhooks/:id" \ 35 -u USERNAME_OR_ACCESS_TOKEN \ 36 -X PATCH \ 37 -d '{"callback_url":"http://example.com/hooks/phraseapp-notifications","description":"My webhook for chat notifications","events":"locales:create,translations:update"}' \ 38 -H 'Content-Type: application/json' 39 - lang: CLI v2 40 source: |- 41 phrase webhooks update \ 42 --project_id <project_id> \ 43 --id <id> \ 44 --data '{"callback_url": "http://example.com/hooks/phraseapp-notifications", "description": "My webhook for chat notifications", "events": "locales:create,translations:update"}' \ 45 --access_token <token> 46 requestBody: 47 required: true 48 content: 49 application/json: 50 schema: 51 type: object 52 title: webhook/update/parameters 53 properties: 54 callback_url: 55 description: Callback URL to send requests to 56 type: string 57 example: http://example.com/hooks/phraseapp-notifications 58 secret: 59 description: Webhook secret used to calculate signature. If empty, the default project secret will be used. 60 type: string 61 example: secr3t 62 description: 63 description: Webhook description 64 type: string 65 example: My webhook for chat notifications 66 events: 67 description: List of event names to trigger the webhook (separated by comma) 68 type: string 69 example: locales:create,translations:update 70 active: 71 description: Whether webhook is active or inactive 72 type: boolean 73 example: 74 include_branches: 75 description: If enabled, webhook will also be triggered for events from branches of the project specified. 76 type: boolean 77 example: 78 x-cli-version: '2.5'