Update Webhook

Update an existing company webhook

PUThttps://api.pact.im/api/p2/companies/<COMPANY_ID>/webhooks/<WEBHOOK_ID>

Updates an existing webhook of the company.

When you set or change the webhook url (or activate the webhook), Pact checks that the URL is available.

URL Parameters

ParameterDescription
COMPANY_IDID of the company
WEBHOOK_IDID of the webhook

Query Parameters

ParameterRequiredValidationsDescription
private_api_tokentrueMust be a stringYOUR_API_TOKEN
urlfalseMust be a stringWebhook URL
activefalseMust be a booleanWhether webhook is active or not

Example

Request

shell
curl -X PUT 'https://api.pact.im/api/p2/companies/COMPANY_ID/webhooks/WEBHOOK_ID' \
--header 'Content-Type: application/json' \
--data '{
    "private_api_token": YOUR_API_TOKEN,
    "url": "https://example.com/new-webhook",
    "active": true
  }'

Response

json
{
  "webhook": {
    "id": 1,
    "url": "https://example.com/new-webhook",
    "active": true
  }
}

Search…

Start typing to search