Skip to main content
PATCH
/
webhooks
/
{id}
Update webhook
curl --request PATCH \
  --url https://xquik.com/api/v1/webhooks/{id} \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "url": "<string>",
  "eventTypes": [
    "<string>"
  ],
  "isActive": true
}
'
import requests

url = "https://xquik.com/api/v1/webhooks/{id}"

payload = {
    "url": "<string>",
    "eventTypes": ["<string>"],
    "isActive": True
}
headers = {
    "x-api-key": "<api-key>",
    "Content-Type": "<content-type>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<api-key>', 'Content-Type': '<content-type>'},
  body: JSON.stringify({url: '<string>', eventTypes: ['<string>'], isActive: true})
};

fetch('https://xquik.com/api/v1/webhooks/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://xquik.com/api/v1/webhooks/{id}"

	payload := strings.NewReader("{\n  \"url\": \"<string>\",\n  \"eventTypes\": [\n    \"<string>\"\n  ],\n  \"isActive\": true\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("x-api-key", "<api-key>")
	req.Header.Add("Content-Type", "<content-type>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
Free - does not consume credits
curl -X PATCH https://xquik.com/api/v1/webhooks/15 \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://new-server.com/webhook",
    "eventTypes": ["tweet.new"],
    "isActive": false
  }' | jq '{
    webhook_id: .id,
    url,
    event_types: .eventTypes,
    is_active: .isActive,
    delivery_status: .deliveryStatus,
    consecutive_failures: .consecutiveFailures,
    failure_hard_cap: .failureHardCap,
    test_endpoint: ("/api/v1/webhooks/" + .id + "/test"),
    resume_endpoint: ("/api/v1/webhooks/" + .id + "/resume"),
    deliveries_endpoint: ("/api/v1/webhooks/" + .id + "/deliveries")
  }'
const response = await fetch("https://xquik.com/api/v1/webhooks/15", {
  method: "PATCH",
  headers: {
    "x-api-key": "xq_YOUR_KEY_HERE",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://new-server.com/webhook",
    eventTypes: ["tweet.new"],
    isActive: false,
  }),
});
const webhook = await response.json();
const updateHandoff = {
  webhook_id: webhook.id,
  url: webhook.url,
  event_types: webhook.eventTypes,
  is_active: webhook.isActive,
  delivery_status: webhook.deliveryStatus,
  consecutive_failures: webhook.consecutiveFailures,
  failure_hard_cap: webhook.failureHardCap,
  test_endpoint: `/api/v1/webhooks/${webhook.id}/test`,
  resume_endpoint: `/api/v1/webhooks/${webhook.id}/resume`,
  deliveries_endpoint: `/api/v1/webhooks/${webhook.id}/deliveries`,
};
import requests

response = requests.patch(
    "https://xquik.com/api/v1/webhooks/15",
    headers={"x-api-key": "xq_YOUR_KEY_HERE"},
    json={
        "url": "https://new-server.com/webhook",
        "eventTypes": ["tweet.new"],
        "isActive": False,
    },
)
webhook = response.json()
update_handoff = {
    "webhook_id": webhook["id"],
    "url": webhook["url"],
    "event_types": webhook["eventTypes"],
    "is_active": webhook["isActive"],
    "delivery_status": webhook["deliveryStatus"],
    "consecutive_failures": webhook["consecutiveFailures"],
    "failure_hard_cap": webhook["failureHardCap"],
    "test_endpoint": f"/api/v1/webhooks/{webhook['id']}/test",
    "resume_endpoint": f"/api/v1/webhooks/{webhook['id']}/resume",
    "deliveries_endpoint": f"/api/v1/webhooks/{webhook['id']}/deliveries",
}
package main

import (
  "bytes"
  "encoding/json"
  "log"
  "net/http"
)

type Webhook struct {
  ConsecutiveFailures int      `json:"consecutiveFailures"`
  DeliveryStatus      string   `json:"deliveryStatus"`
  EventTypes          []string `json:"eventTypes"`
  FailureHardCap      int      `json:"failureHardCap"`
  ID                  string   `json:"id"`
  IsActive            bool     `json:"isActive"`
  URL                 string   `json:"url"`
}

type UpdateHandoff struct {
  ConsecutiveFailures int      `json:"consecutive_failures"`
  DeliveriesEndpoint string   `json:"deliveries_endpoint"`
  DeliveryStatus     string   `json:"delivery_status"`
  EventTypes         []string `json:"event_types"`
  FailureHardCap     int      `json:"failure_hard_cap"`
  IsActive           bool     `json:"is_active"`
  ResumeEndpoint     string   `json:"resume_endpoint"`
  TestEndpoint       string   `json:"test_endpoint"`
  URL                string   `json:"url"`
  WebhookID          string   `json:"webhook_id"`
}

func main() {
  payload := map[string]interface{}{
    "url":        "https://new-server.com/webhook",
    "eventTypes": []string{"tweet.new"},
    "isActive":   false,
  }
  body, err := json.Marshal(payload)
  if err != nil {
    log.Fatal(err)
  }

  req, err := http.NewRequest("PATCH", "https://xquik.com/api/v1/webhooks/15", bytes.NewReader(body))
  if err != nil {
    log.Fatal(err)
  }
  req.Header.Set("x-api-key", "xq_YOUR_KEY_HERE")
  req.Header.Set("Content-Type", "application/json")

  resp, err := http.DefaultClient.Do(req)
  if err != nil {
    log.Fatal(err)
  }
  defer resp.Body.Close()

  var webhook Webhook
  if err := json.NewDecoder(resp.Body).Decode(&webhook); err != nil {
    log.Fatal(err)
  }
  handoff := UpdateHandoff{
    ConsecutiveFailures: webhook.ConsecutiveFailures,
    DeliveriesEndpoint: "/api/v1/webhooks/" + webhook.ID + "/deliveries",
    DeliveryStatus:     webhook.DeliveryStatus,
    EventTypes:         webhook.EventTypes,
    FailureHardCap:     webhook.FailureHardCap,
    IsActive:           webhook.IsActive,
    ResumeEndpoint:     "/api/v1/webhooks/" + webhook.ID + "/resume",
    TestEndpoint:       "/api/v1/webhooks/" + webhook.ID + "/test",
    URL:                webhook.URL,
    WebhookID:          webhook.ID,
  }
  _ = handoff
}
These snippets shape a reconfiguration row. Store the current webhook configuration with its test and delivery-log endpoints instead of printing the full update response.

Path parameters

id
string
required
The webhook ID to update.

Headers

x-api-key
string
required
Your API key. This endpoint also accepts session cookie authentication.
Content-Type
string
required
Must be application/json.

Body

At least 1 field is required.
url
string
New HTTPS endpoint URL. HTTP URLs are rejected.
eventTypes
string[]
Updated event types to subscribe to. Replaces the existing list. At least 1 required when provided. Use any valid account monitor event type listed below. Keyword monitor webhooks should stay on tweet.* event types. Account monitor webhooks can use both tweet.* and profile.* event types.

Valid event types

Valid types: tweet.new, tweet.quote, tweet.reply, tweet.retweet, tweet.media, tweet.link, tweet.poll, tweet.mention, tweet.hashtag, tweet.longform, profile.avatar.changed, profile.banner.changed, profile.name.changed, profile.username.changed, profile.bio.changed, profile.location.changed, profile.url.changed, profile.verified.changed, profile.protected.changed, profile.pinned_tweet.changed, profile.unavailable.changed.

tweet.new

Original tweet from an account monitor or matching keyword monitor. Use for new posts that are not replies, quotes, or retweets.

tweet.quote

Quote tweet from an account monitor or matching keyword monitor. Keep this only when downstream systems handle quote payloads.

tweet.reply

Reply from an account monitor or matching keyword monitor. Keep this when reply alerts or support routing should continue.

tweet.retweet

Retweet from an account monitor or matching keyword monitor. Keep this when repost activity should keep triggering deliveries.
webhook.test is generated only by the Test Webhook endpoint. It cannot be added to a webhook subscription.
isActive
boolean
Set to false to pause deliveries. Set to true to reactivate a paused webhook and reset consecutiveFailures. When deliveryStatus is needs_attention, use Resume Webhook so the receiver must pass a signed test first.

Response

id
string
Unique webhook identifier.
url
string
The current delivery endpoint URL.
eventTypes
string[]
Event types this webhook is subscribed to.
isActive
boolean
Whether the webhook is currently active.
consecutiveFailures
number
Consecutive delivery failures recorded for this webhook.
deliveryStatus
string
active, paused, or needs_attention.
failureHardCap
number
Failure count where the webhook needs attention before resuming.
createdAt
string
ISO 8601 creation timestamp.
{
  "id": "15",
  "url": "https://new-server.com/webhook",
  "eventTypes": ["tweet.new"],
  "isActive": false,
  "consecutiveFailures": 0,
  "deliveryStatus": "paused",
  "failureHardCap": 200,
  "createdAt": "2026-02-24T10:30:00.000Z"
}

Reconfiguration handoff

Use this endpoint when a receiver URL changes, an event filter changes, or an operator needs to pause or resume webhook delivery without creating a new endpoint.

Updated Inventory

Store returned id, url, eventTypes, isActive, deliveryStatus, consecutiveFailures, failureHardCap, and createdAt as the current webhook configuration.

URL Change

After changing url, run Test Webhook before expecting production monitor events at the new receiver.

Event Filter

eventTypes replaces the previous list. Keep it aligned with account or keyword monitor event types.

Pause Delivery

isActive: false stops future deliveries. Existing stored events and delivery records remain available.

Resume Delivery

isActive: true resumes delivery for matching future monitor events. Test the receiver after resuming. Use Resume Webhook when the receiver needs a signed test gate first.

Signing Secret

This endpoint does not rotate or return secret. Keep using the secret from Create Webhook for signature verification.

Delivery check

After the signed test passes, use List Deliveries if production monitor events still miss the receiver. Check status, attempts, lastStatusCode, lastError, createdAt, and deliveredAt.

Event join

Use delivery streamEventId as the {id} for Get Event. Store monitorId, monitorType, type, occurredAt, and data with the reconfiguration incident.
This endpoint supports dual authentication: API key (x-api-key header) or session cookie from the dashboard.Related: List Webhooks · Test Webhook · Resume Webhook · List Deliveries · Get Event · Delete Webhook
Last modified on June 23, 2026