Update a webhook

PATCH /advertising/v1.0/webhooks/{webhookId}

Endpoint for updating webhooks. Webhook will be invoked as POST http request on provided targetUrl whenever specific event occurs. Specific events and their payloads are described in WEBHOOKS section.

Path parameters

  • webhookId string Required
application/json

Body

  • event string

    Value is inquiry_created.

  • configuration object

    Additional properties are NOT allowed.

    Hide configuration attributes Show configuration attributes object
    • targetUrl string

      Url of the webhook.

    • headers object | null

      Optional object with header sent as key-value. These headers will be sent with every request. Could be used for example for authorization.

      Additional properties are NOT allowed.

Responses

  • 200 application/json

    Webhook successfully updated

    Hide response attributes Show response attributes object
    • success boolean Required
    • data object Required

      Additional properties are NOT allowed.

      Hide data attributes Show data attributes object
      • id string Required
      • event string Required

        Value is inquiry_created.

      • configuration object Required

        Additional properties are NOT allowed.

        Hide configuration attributes Show configuration attributes object
        • targetUrl string Required

          Url of the webhook.

        • headers object | null

          Optional object with header sent as key-value. These headers will be sent with every request. Could be used for example for authorization.

          Additional properties are NOT allowed.

  • 400

    Either validation failed or related company was not found.

  • 404

    Webhook was not found.

PATCH /advertising/v1.0/webhooks/{webhookId}
curl \
 --request PATCH 'http://apis.reas.cz/advertising/v1.0/webhooks/{webhookId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"event":"inquiry_created","configuration":{"targetUrl":"https://example.com/hooks","headers":{"Authorization":"Token 95abe511ff"}}}'
Request examples
{
  "event": "inquiry_created",
  "configuration": {
    "targetUrl": "https://example.com/hooks",
    "headers": {
      "Authorization": "Token 95abe511ff"
    }
  }
}
Response examples (200)
{
  "success": true,
  "data": {
    "id": "string",
    "event": "inquiry_created",
    "configuration": {
      "targetUrl": "https://example.com/hooks",
      "headers": {
        "Authorization": "Token 95abe511ff"
      }
    }
  }
}