# “Subscriptions” Endpoints - PATCH Updates an existing subscription enabled status given its ID and workspace ID

**URL:** <https://community.toggl.com/t/subscriptions-endpoints-patch-updates-an-existing-subscription-enabled-status-given-its-id-and-workspace-id/408>\
**Category:** Webhooks API\
**Tags:** subscription, api, endpoints, patch, webhooks\
**Created:** [December 2, 2024, 5:53pm UTC](https://community.toggl.com/t/subscriptions-endpoints-patch-updates-an-existing-subscription-enabled-status-given-its-id-and-workspace-id/408 "2024-12-02T17:53:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Support](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.toggl.com/support/32/1577_2.png) [@Support](https://community.toggl.com/u/Support)\
**Post date:** [December 2, 2024, 5:53pm UTC](https://community.toggl.com/t/subscriptions-endpoints-patch-updates-an-existing-subscription-enabled-status-given-its-id-and-workspace-id/408/1 "2024-12-02T17:53:31Z")

</div>

```auto
https://api.track.toggl.com/webhooks/api/v1/subscriptions/{workspace_id}/{subscription_id}

```

Updates existing subscription enabled status.

- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust

```auto
extern crate tokio;extern crate serde_json;use reqwest::{Client};use reqwest::header::{CONTENT_TYPE};#[tokio::main]async fn main() -> Result<(), reqwest::Error> { let client = Client::new(); let json = client.request(Method::PATCH, "https://api.track.toggl.com/webhooks/api/v1/subscriptions/{workspace_id}/{subscription_id}".to_string()).json(&serde_json::json!(\{"enabled":"boolean"\})) .header(CONTENT_TYPE, "application/json") .send() .await? .json() .await?; println!("{:#?}", json); Ok(())}

```

### Parameters[​](https://engineering.toggl.com/docs/webhooks/subscriptions/#parameters-4)

#### Path[​](https://engineering.toggl.com/docs/webhooks/subscriptions/#path-4)

| name | type | required | description |
| --- | --- | --- | --- |
| workspace\_id | integer | true | Numeric ID of the workspace |
| subscription\_id | integer | true | Numeric ID of the subscription |

#### Body[​](https://engineering.toggl.com/docs/webhooks/subscriptions/#body-2)

| Name | Type | Description |
| --- | --- | --- |
| enabled | boolean | Controls whether the subscription will be enabled or disabled |

### Response[​](https://engineering.toggl.com/docs/webhooks/subscriptions/#response-4)

#### 200[​](https://engineering.toggl.com/docs/webhooks/subscriptions/#200-4)

| Name | Type | Description |
| --- | --- | --- |
| created\_at | string | - |
| deleted\_at | string | - |
| description | string | - |
| enabled | boolean | - |
| event\_filters | Array of SubscriptionEventFilter | - |
| has\_pending\_events | boolean | - |
| secret | string | - |
| subscription\_id | integer | - |
| updated\_at | string | - |
| url\_callback | string | - |
| user\_id | integer | - |
| validated\_at | string | - |
| workspace\_id | integer | - |

#### 400[​](https://engineering.toggl.com/docs/webhooks/subscriptions/#400-2)

Possible error messages:

- URL endpoint {url\_callback} responded with status {HTTP status code} instead of 200
- URL endpoint {url\_callback} request failed with error: {HTTP error}
- User {user\_id} already reached the limit of {allowed limit} enabled subscriptions for workspace {workspace\_id}

#### 403[​](https://engineering.toggl.com/docs/webhooks/subscriptions/#403-4)

User not found/accessible for workspace

#### 404[​](https://engineering.toggl.com/docs/webhooks/subscriptions/#404-2)

subscription {subscription\_id} for workspace {workspace\_id} was not found

#### 500[​](https://engineering.toggl.com/docs/webhooks/subscriptions/#500-4)

Internal Server Error
