> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeplo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# PUT Update Subscription

> Update or renew a subscription.

## Update subscription (superadmin)

`PUT /api/admin/subscriptions/:id`

**id** `integer` *required*

Subscription ID.

### Headers

**x-api-key** `string` *required*

Your API key

**x-api-secret** `string` *required*

Your API secret key

**x-channel-id** `string` *required*

WhatsApp channel ID

```json theme={null}
{
  "planId": 3,
  "autoRenew": true
}
```

***

## Renew subscription

`PUT /api/subscriptions/renew/:id`

**id** `integer` *required*

Subscription ID.

```bash cURL theme={null}
curl -X PUT https://zeplo.ai/api/subscriptions/renew/1 \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-api-secret: YOUR_API_SECRET" \
  -H "x-channel-id: YOUR_CHANNEL_ID"
```

***

## Toggle auto-renew

`PUT /api/subscriptions/toggle-autorenew/:id`

**id** `integer` *required*

Subscription ID.

```bash cURL theme={null}
curl -X PUT https://zeplo.ai/api/subscriptions/toggle-autorenew/1 \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-api-secret: YOUR_API_SECRET" \
  -H "x-channel-id: YOUR_CHANNEL_ID"
```

***

## Check expired subscriptions (superadmin)

`PUT /api/admin/subscriptions/expire`

Checks all subscriptions and marks expired ones.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.