Update a webhook subscription

Manage outbound webhook subscriptions for the authenticated tenant.

Subscriptions are tenant-scoped. Only active subscriptions are returned by list and retrieve. Deletion is permanent — the row is removed from the DB and any associated delivery rows cascade.

On this page

HTTP request

PATCH https://api.parsewise.ai/api/v1/webhooks/{id}/

URI Parameters

Name In Required Type Description
id path Yes string (uuid)  

Request Header

Name Required Type Description
X-API-Key Yes string API key with the pw_live_ prefix. See Authentication.

Request Body

Supported content types: application/json, application/x-www-form-urlencoded, multipart/form-data.

Name Required Type Description
name No string Friendly name for this subscription (optional).
url No string HTTPS URL Parsewise will POST webhook events to.
subscribed_events No array<string> Event names this subscription should receive.
headers No object<string, string> Custom HTTP headers to include with every delivery. Encrypted at rest. Up to 10 entries; values up to 1KB each; total ≤ 4KB. The Host, Connection, Content-Length, Transfer-Encoding, Content-Type and any Parsewise-* headers are reserved.

Responses

Status Type Description
200 V1WebhookSubscription

Security

  • ApiKeyAuth — apiKey — in X-API-Key header. API key with pw_live_ prefix.

Python example

import os
import requests

API_KEY = os.environ["PARSEWISE_API_KEY"]
BASE_URL = "https://api.parsewise.ai/api/v1"

id = "<uuid>"

body = {
    "name": "...",  # optional
    "url": "...",  # optional
    "subscribed_events": [],  # optional
    "headers": {},  # optional
}

resp = requests.patch(
    f"{BASE_URL}/webhooks/{id}/",
    headers={"X-API-Key": API_KEY},
    json=body,
)
resp.raise_for_status()
print(resp.json() if resp.content else None)

Definitions

PatchedV1WebhookSubscriptionWriteRequest

Validates create / update bodies. Not bound to the model.

Name Required Type Description
name No string Friendly name for this subscription (optional).
url No string HTTPS URL Parsewise will POST webhook events to.
subscribed_events No array<string> Event names this subscription should receive.
headers No object<string, string> Custom HTTP headers to include with every delivery. Encrypted at rest. Up to 10 entries; values up to 1KB each; total ≤ 4KB. The Host, Connection, Content-Length, Transfer-Encoding, Content-Type and any Parsewise-* headers are reserved.

V1WebhookSubscription

Read-side serializer. Used by list / retrieve / create / update responses.

Name Required Type Description
id Yes string (uuid)  
name Yes string  
url Yes string  
subscribed_events Yes array<string> Event names this subscription is subscribed to.
is_active Yes boolean  
headers Yes object<string, string> Custom request header keys registered for this subscription. Values are always redacted.
created_at Yes string (date-time)  
updated_at Yes string (date-time)