# PUT /api/v1/subscriptions/

> Update a detected recurring transaction

- **Tag:** subscriptions
- **Operation ID:** `update_subscription_api_v1_subscriptions__put`

## Description

Override the display name, monthly cost, frequency, or add notes to a detected recurring transaction.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Request body

Schema: `UpdateSubscriptionRequest`

- `counterparty_key` (string · required)
- `registry_id` (string)
- `custom_name` (string)
- `custom_amount_cents` (integer) — Override monthly cost in cents
- `custom_frequency` (string)
- `notes` (string)

## Responses

### 200 — Successful Response

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X PUT 'https://api.ondayzero.com/api/v1/subscriptions/' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "counterparty_key": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/subscriptions/', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "counterparty_key": "string"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "counterparty_key": "string"
}

response = httpx.put("https://api.ondayzero.com/api/v1/subscriptions/", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/subscriptions/update-subscription
- OpenAPI slice: https://www.ondayzero.com/docs/reference/subscriptions/update-subscription/openapi.json
- Other endpoints in **subscriptions**: https://www.ondayzero.com/docs/reference/subscriptions
