> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getsinbad.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getsinbad.com/_mcp/server.

# Update or pause a webhook

PATCH https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/webhooks/{webhookId}
Content-Type: application/json

Update or pause a webhook.

**Credential:** Partner secret

**Before you call**

- A server-side partner secret for the owning partner. Do not send an Origin header.
- An active integration that your partner credential permits.
- Set an Idempotency-Key and reuse it for an identical retry.
- Use the current revision returned by Get a webhook endpoint.

Update description/subscriptions or pause/resume with expected revision

Use the current revision; stale revisions return 409 REVISION_CONFLICT. Activation requires successful verification (VERIFICATION_REQUIRED). Changes cancel unsent work for an old subscription; requests already in flight may complete.

Server-only partner credential access: a 403 means the integration is unauthorized or inactive. Mutations share 60/min per partner; test and replay allow 5/min each per endpoint, rotation 1/min per endpoint. Only committed changes count; identical idempotent replays within 24 hours do not. A 429 includes retryAfter. Conflict details.kind can include IDEMPOTENCY_CONFLICT, ENDPOINT_DELETED, ENDPOINT_LIMIT, REVISION_CONFLICT, VERIFICATION_REQUIRED, ROTATION_IN_PROGRESS or REPLAY_UNAVAILABLE. Webhook availability depends on environment readiness; confirm it with Sinbad.



> Webhook delivery must be available in the selected environment. Confirm readiness with Sinbad.

**Errors**

| Status | Code | What to do |
| --- | --- | --- |
| 400 | `VALIDATION_ERROR` | Correct the fields reported in details before retrying. |
| 401 | `UNAUTHENTICATED` | Create a new customer session or use a valid server credential. |
| 403 | `FORBIDDEN` | Use a server credential permitted for this active integration. |
| 404 | `NOT_FOUND` | Check the resource ID. A resource that belongs to someone else also returns 404. |
| 409 | `CONFLICT` | Read the current state again before you prepare or retry. |
| 429 | `RATE_LIMITED` | Wait for Retry-After before retrying. |
| 503 | `UPSTREAM_ERROR` | Retry with backoff; preserve the same idempotency key for a repeated mutation. |

Reference: https://docs.getsinbad.com/api-reference/webhooks/update-webhook

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `webhookId` (string, required)

### Headers

- `Idempotency-Key` (string, required) — Required on mutations. Same key/body returns safe original results for 24 hours. Signing secrets are never returned again.

### Body (application/json)

This endpoint expects a webhooks__UpdateEndpoint.

- `revision` (integer, required)
- `description` (string, optional)
- `eventTypes` (list of enum, optional)
  - Allowed values: `trade.created`, `trade.updated`, `trade.message.created`
- `status` (enum, optional)
  - Allowed values: `active`, `paused`

## Response

### 200

Success

- `webhook` (webhooks__Endpoint, required)

## Errors

### 400 Bad Request Error

The request is invalid.

- `error` (V1WebhooksWebhookIdPatchResponsesContentApplicationJsonSchemaError, required)

### 401 Unauthorized Error

Authentication is required.

- `error` (V1WebhooksWebhookIdPatchResponsesContentApplicationJsonSchemaError, required)

### 403 Forbidden Error

You do not have permission to perform this action.

- `error` (V1WebhooksWebhookIdPatchResponsesContentApplicationJsonSchemaError, required)

### 404 Not Found Error

The requested resource was not found.

- `error` (V1WebhooksWebhookIdPatchResponsesContentApplicationJsonSchemaError, required)

### 409 Conflict Error

The request conflicts with the current state of the resource.

- `error` (V1WebhooksWebhookIdPatchResponsesContentApplicationJsonSchemaError, required)

### 429 Too Many Requests Error

Too many requests. Please try again later.

- `error` (V1WebhooksWebhookIdPatchResponsesContentApplicationJsonSchemaError, required)

### 503 Service Unavailable Error

Service temporarily unavailable.

- `error` (V1WebhooksWebhookIdPatchResponsesContentApplicationJsonSchemaError, required)

## Types

### webhooks__Endpoint

- `webhookId` (string, required)
- `partnerId` (string, required)
- `integrationId` (string, required)
- `environment` (string, required)
- `url` (string, required)
- `description` (string, required)
- `eventTypes` (list of enum, required)
  - Allowed values: `trade.created`, `trade.updated`, `trade.message.created`
- `apiVersion` (enum, required)
  - Allowed values: `2026-10-22`
- `status` (enum, required)
  - Allowed values: `pending_verification`, `active`, `paused`, `disabled`, `deleted`
- `revision` (integer, required)
- `verifiedAt` (datetime, required, nullable)
- `createdAt` (datetime, required, nullable)
- `updatedAt` (datetime, required, nullable)
- `deletedAt` (datetime, required, nullable)
- `overlapUntil` (datetime, required, nullable)
- `signingKeyId` (string, required, nullable)

### V1WebhooksWebhookIdPatchResponsesContentApplicationJsonSchemaError

- `code` (string, required)
- `numericId` (integer, required)
- `message` (string, required)
- `requestId` (string, optional)
- `details` (map from string to any, optional)

## Examples

**Request**

```json
{
  "revision": 1,
  "status": "paused"
}
```

**Response**

```json
{
  "webhook": {
    "webhookId": "wh_demo",
    "partnerId": "partner_demo",
    "integrationId": "integration_demo",
    "environment": "sinbad-staging-env",
    "url": "https://partner.example.com/events",
    "description": "Trade updates",
    "eventTypes": [
      "trade.created",
      "trade.updated",
      "trade.message.created"
    ],
    "apiVersion": "2026-10-22",
    "status": "paused",
    "revision": 2,
    "verifiedAt": null,
    "createdAt": "2026-10-23T10:00:00.000Z",
    "updatedAt": "2026-10-23T10:00:00.000Z",
    "deletedAt": null,
    "overlapUntil": null,
    "signingKeyId": "key_demo"
  }
}
```

**SDK Code**

```python Default
import requests

url = "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/webhooks/wh_demo"

payload = {
    "revision": 1,
    "status": "paused"
}
headers = {
    "Idempotency-Key": "request_demo_001",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Default
const url = 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/webhooks/wh_demo';
const options = {
  method: 'PATCH',
  headers: {
    'Idempotency-Key': 'request_demo_001',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"revision":1,"status":"paused"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Default
package main

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

func main() {

	url := "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/webhooks/wh_demo"

	payload := strings.NewReader("{\n  \"revision\": 1,\n  \"status\": \"paused\"\n}")

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

	req.Header.Add("Idempotency-Key", "request_demo_001")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Default
require 'uri'
require 'net/http'

url = URI("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/webhooks/wh_demo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = 'request_demo_001'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"revision\": 1,\n  \"status\": \"paused\"\n}"

response = http.request(request)
puts response.read_body
```

```java Default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/webhooks/wh_demo")
  .header("Idempotency-Key", "request_demo_001")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"revision\": 1,\n  \"status\": \"paused\"\n}")
  .asString();
```

```php Default
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/webhooks/wh_demo', [
  'body' => '{
  "revision": 1,
  "status": "paused"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'request_demo_001',
  ],
]);

echo $response->getBody();
```

```csharp Default
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/webhooks/wh_demo");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Idempotency-Key", "request_demo_001");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"revision\": 1,\n  \"status\": \"paused\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Default
import Foundation

let headers = [
  "Idempotency-Key": "request_demo_001",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "revision": 1,
  "status": "paused"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/webhooks/wh_demo")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```