Skip to main content

Update Webhook

Endpoint: PUT /api/metadata/webhook

Updates an existing webhook definition.

Path parameters

ParamaeterDescriptionTypeRequired
idThe unique identifier of the webhook to update.stringRequired.

Request body

Format the request body as an array with the following parameters:

ParamaeterDescriptionTypeRequired
nameThe updated name of the webhook.stringRequired.
receiverWorkflowNamesToVersionsMap of workflow names to versions that receive the incoming webhook event. If the webhook is only used to start a workflow, this object can be empty.

For example: "receiverWorkflowNamesToVersions": { "<WORKFLOW-NAME>": <WORKFLOW-VERSION> }
objectOptional.
sourcePlatformThe platform that sends webhook requests to Conductor. Supported values:
  • Github
  • Microsoft Teams
  • SendGrid
  • Slack
  • Stripe
  • Custom
This value determines the verification method and the security fields required for the webhook.
stringRequired.
verifierThe verification method used to validate incoming webhook requests. Supported values:
  • SIGNATURE_BASED: For GitHub
  • HMAC_BASED: For Microsoft Teams
  • SENDGRID : For SendGrid
  • SLACK_BASED: For Slack
  • STRIPE: For Stripe
  • HEADER_BASED: For Custom
stringRequired.
headerKeyThe header key used to verify incoming webhook requests. Supported values:
  • X-Hub-Signature-256: For GitHub
  • Authorization: For Microsoft Teams
  • Stripe-Signature: For Stripe
stringRequired for GitHub, Microsoft Teams, and Stripe. Not applicable for other platforms.
secretValueThe secret value used to verify incoming webhook requests. Supported platforms:
  • GitHub: Enter an arbitrary Secret key. You’ll reuse this same value when you configure the webhook in GitHub.
  • Microsoft Teams: Leave the Security token empty for now. This can be added once you get the security token from Microsoft Teams webhook.
  • SendGrid: Leave the Verification key empty for now. This can be added once you get the verification key from SendGrid webhook.
  • Stripe: Leave the Endpoint secret empty for now. This can be added once you get the endpoint secret from Stripe webhook.
stringRequired for GitHub, Microsoft Teams, SendGrid, and Stripe. Not applicable for other platforms.
headersThe key-value pairs of headers used to validate incoming webhook requests.objectRequired for Custom.
workflowsToStartMap of workflows configured to start when the webhook event is received.

For example: "workflowsToStart": { "<WORKFLOW-NAME>": <WORKFLOW-VERSION> }
objectOptional.
workflowsToStart.idempotencyKeyThe idempotency key to prevent duplicate workflow executions for the same webhook event. Supports variables from the workflow input, for example, ${workflow.input.someKey}.stringOptional.
workflowsToStart.idempotencyStrategyThe strategy to use when a workflow with the same idempotency key already exists. Supported values:
  • RETURN_EXISTING: Return the workflowId of the workflow instance with the same idempotency key.
  • FAIL: Start a new workflow instance only if there are no workflow executions with the same idempotency key.
  • FAIL_ON_RUNNING: Start a new workflow instance only if there are no RUNNING or PAUSED workflows with the same idempotency key. Completed workflows can run again.
stringOptional.

Response

Returns 200 OK with the updated webhook object.

Examples

Update a webhook

Request

curl -X 'PUT' \
'https://<YOUR-SERVER-URL>/api/metadata/webhook/dbe38f11-d0fd-4b1b-b6c8-5e6a72840dea' \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"name": "updatedName",
"id": "dbe38f11-d0fd-4b1b-b6c8-5e6a72840dea",
"receiverWorkflowNamesToVersions": {
"http": 1
},
"urlVerified": false,
"sourcePlatform": "Custom",
"verifier": "HEADER_BASED",
"headers": {
"Some-key-4rhnv": "Some-val-xvdhu"
},
"secretValue": "***"
}'

Response

{
"name": "updatedName",
"id": "dbe38f11-d0fd-4b1b-b6c8-5e6a72840dea",
"receiverWorkflowNamesToVersions": {
"http": 1
},
"urlVerified": false,
"sourcePlatform": "Custom",
"verifier": "HEADER_BASED",
"headers": {
"Some-key-4rhnv": "Some-val-xvdhu"
},
"secretValue": "***",
"createdBy": "john.doe@acme.com"
}