> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Resume Twitter webhook deliveries & retry events

> Resume a webhook and start sending waiting deliveries at once. Xquik sends a signed test first and resumes only after a 2xx response. The call is free.

<Panel>
  <Tabs defaultTabIndex={0} sync={false}>
    <Tab title="200" id="response-webhooks-resume-200">
      ```json theme={null}
      {
        "success": true,
        "statusCode": 200,
        "webhook": {
          "id": "42",
          "url": "https://example.com/webhook",
          "eventTypes": [
            "tweet.new"
          ],
          "isActive": true,
          "consecutiveFailures": 0
        }
      }
      ```
    </Tab>

    <Tab title="400" id="response-webhooks-resume-400">
      ```json theme={null}
      {
        "error": "Connection timed out"
      }
      ```
    </Tab>

    <Tab title="401" id="response-webhooks-resume-401">
      ```json theme={null}
      {
        "error": "unauthenticated",
        "message": "Authentication required. Provide a valid API key or bearer token."
      }
      ```
    </Tab>

    <Tab title="404" id="response-webhooks-resume-404">
      ```json theme={null}
      {
        "error": "not_found",
        "message": "Resource not found."
      }
      ```
    </Tab>

    <Tab title="429" id="response-webhooks-resume-429">
      ```json theme={null}
      {
        "error": "rate_limit_exceeded",
        "message": "Too many requests. Try again later.",
        "retryAfter": 60
      }
      ```
    </Tab>
  </Tabs>
</Panel>

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

<Callout icon="circle-check" color="#16a34a">
  **Free.** This endpoint does not consume credits.
</Callout>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://xquik.com/api/v1/webhooks/15/resume \
    -H "x-api-key: xq_YOUR_KEY_HERE" \
    | jq '{
      webhook_id: .webhook.id,
      resumed: (.success == true),
      status_code: .statusCode,
      delivery_status: .webhook.deliveryStatus,
      consecutive_failures: .webhook.consecutiveFailures,
      failure_hard_cap: .webhook.failureHardCap,
      test_endpoint: ("/api/v1/webhooks/" + .webhook.id + "/test"),
      deliveries_endpoint: ("/api/v1/webhooks/" + .webhook.id + "/deliveries")
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://xquik.com/api/v1/webhooks/15/resume", {
    method: "POST",
    headers: { "x-api-key": "xq_YOUR_KEY_HERE" },
  });
  const result = await response.json();
  const resumeHandoff = {
    webhook_id: result.webhook.id,
    resumed: result.success === true,
    status_code: result.statusCode,
    delivery_status: result.webhook.deliveryStatus,
    consecutive_failures: result.webhook.consecutiveFailures,
    failure_hard_cap: result.webhook.failureHardCap,
    test_endpoint: `/api/v1/webhooks/${result.webhook.id}/test`,
    deliveries_endpoint: `/api/v1/webhooks/${result.webhook.id}/deliveries`,
  };
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://xquik.com/api/v1/webhooks/15/resume",
      headers={"x-api-key": "xq_YOUR_KEY_HERE"},
  )
  result = response.json()
  webhook = result["webhook"]
  resume_handoff = {
      "webhook_id": webhook["id"],
      "resumed": result["success"] is True,
      "status_code": result["statusCode"],
      "delivery_status": webhook["deliveryStatus"],
      "consecutive_failures": webhook["consecutiveFailures"],
      "failure_hard_cap": webhook["failureHardCap"],
      "test_endpoint": f"/api/v1/webhooks/{webhook['id']}/test",
      "deliveries_endpoint": f"/api/v1/webhooks/{webhook['id']}/deliveries",
  }
  ```

  ```go Go theme={null}
  package main

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

  type Webhook struct {
    ConsecutiveFailures int      `json:"consecutiveFailures"`
    CreatedAt           string   `json:"createdAt"`
    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 ResumeResponse struct {
    StatusCode int     `json:"statusCode"`
    Success    bool    `json:"success"`
    Webhook    Webhook `json:"webhook"`
  }

  type ResumeHandoff struct {
    ConsecutiveFailures int    `json:"consecutive_failures"`
    DeliveriesEndpoint  string `json:"deliveries_endpoint"`
    DeliveryStatus      string `json:"delivery_status"`
    FailureHardCap      int    `json:"failure_hard_cap"`
    Resumed             bool   `json:"resumed"`
    StatusCode          int    `json:"status_code"`
    TestEndpoint        string `json:"test_endpoint"`
    WebhookID           string `json:"webhook_id"`
  }

  func main() {
    req, err := http.NewRequest("POST", "https://xquik.com/api/v1/webhooks/15/resume", nil)
    if err != nil {
      log.Fatal(err)
    }
    req.Header.Set("x-api-key", "xq_YOUR_KEY_HERE")

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

    var result ResumeResponse
    if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
      log.Fatal(err)
    }
    handoff := ResumeHandoff{
      ConsecutiveFailures: result.Webhook.ConsecutiveFailures,
      DeliveriesEndpoint:  "/api/v1/webhooks/" + result.Webhook.ID + "/deliveries",
      DeliveryStatus:      result.Webhook.DeliveryStatus,
      FailureHardCap:      result.Webhook.FailureHardCap,
      Resumed:             result.Success,
      StatusCode:          result.StatusCode,
      TestEndpoint:        "/api/v1/webhooks/" + result.Webhook.ID + "/test",
      WebhookID:           result.Webhook.ID,
    }
    _ = handoff
  }
  ```
</CodeGroup>

These snippets build a recovery row. Store `delivery_status`,
`consecutive_failures`, `failure_hard_cap`, `status_code`, and the delivery-log
endpoint beside the webhook ID.

## Path parameters

<ParamField path="id" type="string" required>
  The webhook ID to test and resume.
</ParamField>

## Headers

<ParamField header="x-api-key" type="string" required>
  Your API key. This endpoint also accepts session cookie authentication.
</ParamField>

## What happens

Xquik sends a signed `webhook.test` request to the webhook URL. If your receiver
returns a `2xx` status, Xquik reactivates the webhook. It resets `consecutiveFailures` to `0` and returns the updated webhook object.

Xquik then starts sending waiting deliveries at once. This includes failed
deliveries and ones that waited when you paused the webhook. A paused webhook
keeps waiting deliveries until you resume. Events expire 30 days after Xquik
creates them.

Events that happen during a pause may never arrive. To catch up, page through
[List Events](/api-reference/events/list).

If the signed test fails, Xquik returns `400` with `success: false`,
`statusCode`, and `error`. Xquik does not reactivate the webhook.

This endpoint does not rotate or return the signing secret. Keep using the
one-time secret from [Create Webhook](/api-reference/webhooks/create).

| Webhook resume check | Response source | Recovery rule |
| - | - | - |
| Signed test result | `success` | Resume only when this value is `true`. |
| Receiver status | `statusCode` | Require a `2xx` response. |
| Webhook ID | `webhook.id` | Match the receiver you are recovering. |
| Delivery URL | `webhook.url` | Confirm the repaired HTTPS endpoint. |
| Event filter | `webhook.eventTypes` | Confirm the filter still covers your monitor event types. |
| Active state | `webhook.isActive` | Expect `true` after recovery. |
| Failure count | `webhook.consecutiveFailures` | Expect `0` after recovery. |
| Delivery state | `webhook.deliveryStatus` | Expect `active` after recovery. |

## Response

### 200 OK

<ResponseField name="success" type="boolean">
  `true` when the signed test request succeeded and Xquik resumed the webhook.
</ResponseField>

<ResponseField name="statusCode" type="number">
  HTTP status code returned by your receiver during the signed test.
</ResponseField>

<ResponseField name="webhook" type="object">
  Updated webhook configuration.
  **Webhook object fields.**

  <ResponseField name="id" type="string">
    Unique webhook identifier.
  </ResponseField>

  <ResponseField name="url" type="string">
    Delivery endpoint URL.
  </ResponseField>

  <ResponseField name="eventTypes" type="string[]">
    Event types this webhook subscribes to.
  </ResponseField>

  <ResponseField name="isActive" type="boolean">
    `true` after a successful resume.
  </ResponseField>

  <ResponseField name="consecutiveFailures" type="number">
    Consecutive receiver failures. Resets to `0` after a successful resume.
  </ResponseField>

  <ResponseField name="deliveryStatus" type="string">
    `active`, `paused`, or `needs_attention`.
  </ResponseField>

  <ResponseField name="failureHardCap" type="number">
    Failure count that sets `needs_attention`. Delivery continues past it.
  </ResponseField>

  <ResponseField name="createdAt" type="string">
    ISO 8601 creation timestamp.
  </ResponseField>
</ResponseField>

```json theme={null}
{
  "success": true,
  "statusCode": 200,
  "webhook": {
    "id": "15",
    "url": "https://your-server.com/webhook",
    "eventTypes": ["tweet.new", "tweet.reply"],
    "isActive": true,
    "consecutiveFailures": 0,
    "deliveryStatus": "active",
    "failureHardCap": 200,
    "createdAt": "2026-02-24T10:30:00.000Z"
  }
}
```

### 400 Test failed

<ResponseField name="success" type="boolean">
  `false` when the signed test did not receive a `2xx` response.
</ResponseField>

<ResponseField name="statusCode" type="number">
  HTTP status code from the receiver, or `0` if it was unreachable.
</ResponseField>

<ResponseField name="error" type="string">
  Delivery failure reason.
</ResponseField>

```json theme={null}
{
  "success": false,
  "statusCode": 500,
  "error": "HTTP 500"
}
```

Fix the receiver, then retry this endpoint.

### 400 Invalid request

```json theme={null}
{ "error": "invalid_id", "message": "Invalid webhook ID format" }
```

The provided webhook ID is not a valid format.

### 401 Unauthenticated

```json theme={null}
{ "error": "unauthenticated", "message": "Missing or invalid API key" }
```

Missing or invalid API key or session cookie.

### 404 Not found

```json theme={null}
{ "error": "not_found", "message": "Webhook not found" }
```

No webhook exists with this ID, or it belongs to a different account.

### 429 Rate limited

```json theme={null}
{
  "error": "rate_limit_exceeded",
  "message": "Too many requests. Try again later.",
  "retryAfter": 60
}
```

Too many requests. Wait for the `Retry-After` header before retrying.

## Recovery handoff

Use this endpoint to reactivate a webhook you paused. Also use it after you fix
a failing receiver. Xquik sends a signed test first, then starts sending
waiting deliveries at once.

<CardGroup cols={2}>
  <Card title="Needs attention" icon="triangle-alert">
    `deliveryStatus: "needs_attention"` means 200 failed checks in a row. Each
    check retries 1 real waiting delivery. Delivery continues. After you fix
    the receiver, call Resume to start sending at once.
  </Card>

  <Card title="Signed test required" icon="flask-conical">
    Resume succeeds only after your receiver answers a signed `webhook.test` request with a `2xx`
    response.
  </Card>

  <Card title="Failure counter" icon="rotate-ccw">
    Store `consecutiveFailures` and `failureHardCap` for alerting and recovery
    dashboards.
  </Card>

  <Card title="No secret rotation" icon="shield-check">
    Resume does not return or rotate `secret`. Keep verifying delivery
    signatures with the secret returned at creation time.
  </Card>

  <Card title="Delivery log" icon="activity">
    After resuming, check
    [List Deliveries](/api-reference/webhooks/deliveries) for recent `status`,
    `attempts`, `lastStatusCode`, and `lastError` rows.
  </Card>

  <Card title="Event replay" icon="link">
    Use delivery `streamEventId` with [Get Event](/api-reference/events/get) or
    event list pages to backfill missed work.
  </Card>
</CardGroup>

<Note>
  This endpoint accepts 2 auth methods. Send an API key in the `x-api-key` header or a session cookie from the dashboard.

  **Related.** [List Webhooks](/api-reference/webhooks/list) · [Update Webhook](/api-reference/webhooks/update) · [Test Webhook](/api-reference/webhooks/test) · [List Deliveries](/api-reference/webhooks/deliveries) · [Webhook Verification](/webhooks/verification)
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.