---
title: "Update a subscription"
method: PUT
path: "/NotificationSubscriptions/Http/{id}"
tags: ["NotificationSubscriptions"]
---

# Update a subscription

`PUT /NotificationSubscriptions/Http/{id}`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/NotificationSubscriptions/Http/{id}`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/NotificationSubscriptions/Http/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates the specified subscription by setting the values of the parameters passed.
            <br />**Example Request**
            
                PUT /NotificationSubscriptions/Http/{id}
                {
                  "Id": 1111,
                  "Url": "https://your-company.com/webhook-target-URL",
                  "Enabled": true,
                  "Name": "Subscription to new WOs",
                  "EventTypes": [
                    "WorkOrderCreated"
                  ],
                  "Rules": {
                    "Trades": [
                      "GLASS"
                    ],
                    "Categories": [
                      "MAINTENANCE"
                    ]
                  }
                }

## Path parameters

- `id` integer, required

## Request body

- ServiceChannelServicesMessagingNotificationsHttpNotificationSubscription
  - `Id` integer: The unique subscription ID. Generated automatically and cannot be modified.
  - `Url` string, required: The URL to which the events should be delivered.
  - `Enabled` boolean: Defines if the subscription is active or inactive.
  - `Name` string, required: The user-friendly name for the subscription.
  - `EventTypes` string[], required: The list of events to subscribe to. Events within one subscription should belong to one object.
  - `Rules` ServiceChannelServicesMessagingNotificationsNotificationSubscriptionsRules: The event rules used to receive events matching only certain criteria.
    - `Trades` string[]: The trades that the events should belong to.
    - `Categories` string[]: The categories that the events should belong to.
    - `Statuses` string[]: The statuses that the events should belong to.

## Response `204`

The subscription is updated, and the response is intentionally blank.

## Other responses

- `400`: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc. <br/>Error codes: 502 - Subscription not found 503 - Required data missing or incorrect
- `401`: The request is not authorized. <br/>Error codes: 504 - Missing or incorrect authentication credentials

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
