# Update webhook subscription (`update_webhook_subscription`)

Changes a webhook subscription topic or destination URL. Only the fields sent change. The signing secret is unchanged and is not returned, so moving a destination does not rotate it. A subscription its integration provider manages is refused rather than changed here. It requires the webhooks:write scope and an idempotency_key.

- Source URL: https://www.signcustomiser.com/help/mcp/tools/update_webhook_subscription/
- Markdown URL: https://www.signcustomiser.com/help/mcp/tools/update_webhook_subscription.md
- MCP endpoint: https://web.signcustomiser.com/mcp
- Required scope: `webhooks:write`
- Behaviour: write

## Purpose

Move a subscription to another endpoint, or point it at a different event topic.

## Annotations

| Hint | Value |
| --- | --- |
| readOnlyHint | false |
| destructiveHint | false |
| idempotentHint | true |
| openWorldHint | true |

## Prerequisites

- A subscription id from list_webhook_subscriptions.
- At least one of topic or url.
- A merchant has connected this store and approved the webhooks:write scope.

## Side effects

- Changes where future events of that topic are delivered, as outbound HTTPS requests to the new URL.
- Leaves the signing secret as it was.
- Claims the idempotency_key for at least 24 hours.

## Arguments

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `webhook_id` | integer | yes | The subscription id, from list_webhook_subscriptions. An integer, not an opaque string. |
| `topic` | string | no | The event topic to deliver, from list_webhook_event_types. Expected to grow: tolerate unknown values. One of: `product:created`, `order:created`, `form:submitted`. |
| `url` | string | no | The destination, which must be a public HTTPS address Sign Customiser can reach. A private, loopback or plain-HTTP address is refused. |
| `idempotency_key` | string | no | A client-generated key unique to this logical write, such as a UUID. Required: repeating the call with the same key and the same arguments replays the original result instead of writing twice, and the same key with different arguments is an idempotency_key_conflict. A dry run claims no key. |

## Result

The subscription as it now stands, without its secret. There is no changed-field list: /api/v3 reports none.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `request_id` | string | yes |  |
| `store` | object | yes |  |
| `store.id` | integer | yes |  |
| `store.name` | string | yes |  |
| `subscription` | object | no | The subscription as it now stands. Never carries the signing secret: the secret is readable only when the subscription is created. |
| `subscription.id` | integer | yes |  |
| `subscription.topic` | string | yes |  |
| `subscription.url` | string | yes |  |
| `subscription.created_at` | string or null | no |  |
| `subscription.updated_at` | string or null | no |  |

## Error cases

| Code | Recovery |
| --- | --- |
| `insufficient_scope` | The connection was approved without webhooks:write. |
| `missing_idempotency_key` | Send idempotency_key. It is required for this write. |
| `provider_managed_subscription` | The subscription belongs to an integration provider and has to be changed there, not through this connector. |
| `resource_not_found` | No subscription with that id belongs to this store. Call list_webhook_subscriptions. |
| `validation_failed` | An unknown topic, whose allowed_values the problem repeats, or a URL that is not a public HTTPS address. |

## Example: Move a subscription to a new endpoint

Request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_webhook_subscription",
    "arguments": {
      "webhook_id": 42,
      "url": "https://example.com/webhooks/sign-customiser-v2",
      "idempotency_key": "293a4b5c-6d7e-4f01-8c6d-7e8f90123456"
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "structuredContent": {
      "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t",
      "store": {
        "id": 12,
        "name": "Demo Signs"
      },
      "subscription": {
        "id": 42,
        "topic": "order:created",
        "url": "https://example.com/webhooks/sign-customiser-v2",
        "created_at": "2026-07-22T00:00:00Z",
        "updated_at": "2026-07-22T00:05:00Z"
      }
    }
  }
}
```

## Example: A provider-managed subscription is refused (error)

Request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_webhook_subscription",
    "arguments": {
      "webhook_id": 43,
      "url": "https://example.com/webhooks/elsewhere",
      "idempotency_key": "293a4b5c-6d7e-4f01-8c6d-7e8f90123456"
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "isError": true,
    "structuredContent": {
      "error": {
        "code": "provider_managed_subscription",
        "title": "Provider-managed subscription",
        "detail": "This subscription is managed by its integration provider and cannot be changed through API v3.",
        "recovery": "This subscription belongs to an integration provider. Change it in that provider rather than here."
      }
    }
  }
}
```
