---
title: "Update Webhook"
method: PATCH
path: "/{webhook_id}/"
tags: ["Webhooks"]
---

# Update Webhook

`PATCH /{webhook_id}/`

## Request

- Base URL: `https://app2test.infiniaweb.com/infinia_api/v1/webhooks`
- URL: `https://app2test.infiniaweb.com/infinia_api/v1/webhooks/{webhook_id}/`
- Auth: HTTP basic

Updates an existing webhook's configuration or status. If the webhook is currently in an ERROR state, you can trigger a resend by updating its status to PENDING.

## Path parameters

- `webhook_id` string, required

## Headers

- `x-company-id` integer: ID of a child company for authentication. If not provided, the parent company will be authenticated.

## Request body

- PatchRequest
  - `status` 'PENDING', required: The new status of the webhook
  - `url` string: The new URL of the webhook to send.

## Response `200`

Successful Response

- WebhookSuccess
  - `status` 'success'
  - `data` PublicWebhookResponse, required
    - `id` string: The unique identifier of the webhook
    - `status` 'INITIATED' | 'PENDING' | 'QUEUED' | 'SENT' | 'ERROR'
    - `created_at` string, date-time: The creation timestamp of the webhook
    - `updated_at` string, date-time: The last update timestamp of the webhook
    - `operation_type` string: The type of operation the webhook is associated with
    - `url` string: The URL the webhook is pointing to
    - `last_response_status` string: The status of the last response received from the webhook
    - `last_response_body` union: The body of the last response received from the webhook
      - object
      - string

## Other responses

- `400`: Bad Request
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/infiniaweb/apis/webhooks.md) - [All operations](https://skmtc.dev/infiniaweb/apis/webhooks/llms.txt) - [OpenAPI document](https://skmtc.dev/infiniaweb/apis/webhooks/revisions/b118efd2f511?raw)
