**Version: 202201**

# Update Webhook

**PUT** `/openapi/2022-01/webhooks/:id`

Update a webhook with a unique identifier, notification URL, event name, and format.

## Request

**Path Parameters**

- `id` string (required)

  Webhook record ID

**application/json**

**Body | Example**

**Body**

- `address` string

  Webhook notification URL, e.g. `https://example.com/webhook`
- `topic` string

  Event name, e.g. `orders/cancelled,orders/create`

```json
{
  "address": "string",
  "topic": "string"
}
```

## Responses

**200 | 422**

200

**application/json**

**Schema | Example | Result**

**Schema**

- `webhook` object

  - `id` string

    **Example:** `37593634-c272-4ed5-9096-1a4f1212125e`
  - `address` string

    **Example:** `https://abc.com`
  - `topic` string

    **Example:** `order/create`
  - `created_at` string

    **Example:** `2018-08-26T06:50:00Z`
  - `updated_at` string

    **Example:** `2018-08-26T06:50:00Z`
  - `format` string

    **Example:** `json`

```json
{
  "webhook": {
    "id": "37593634-c272-4ed5-9096-1a4f1212125e",
    "address": "https://abc.com",
    "topic": "order/create",
    "created_at": "2018-08-26T06:50:00Z",
    "updated_at": "2018-08-26T06:50:00Z",
    "format": "json"
  }
}
```

```json
{
  "webhook": {
    "id": "37593634-c272-4ed5-9096-1a4f1212125e",
    "address": "https://abc.com",
    "topic": "order/create",
    "created_at": "2018-08-26T06:50:00Z",
    "updated_at": "2018-08-26T06:50:00Z",
    "format": "json"
  }
}
```

422

**application/json**

**Schema | Example | Result**

**Schema**

- `errors` object

  - `address` string[]
  - `topic` string[]

```json
{
  "errors": {
    "address": [
      "can't be blank"
    ],
    "topic": [
      "can't be blank"
    ]
  }
}
```

```json
{
  "errors": {
    "address": [
      "can't be blank",
      "is invalid"
    ],
    "topic": [
      "can't be blank"
    ]
  }
}
```
