> ## 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.

# GET Get Subscription

> Retrieve subscription details for a user.

## Get active subscription

`GET /api/subscriptions/active/:userId`

Retrieve subscription details for the current user or a specific user.

### 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

**userId** `integer` *required*

User ID.

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

```json Response theme={null}
{
  "success": true,
  "data": {
    "id": 1,
    "userId": 1,
    "planId": 2,
    "planName": "Professional",
    "status": "active",
    "startDate": "2026-01-01T00:00:00Z",
    "endDate": "2026-02-01T00:00:00Z",
    "autoRenew": true,
    "usage": {
      "contacts": { "used": 450, "limit": 5000 },
      "messages": { "used": 3200, "limit": 25000 },
      "channels": { "used": 2, "limit": 5 }
    },
    "createdAt": "2026-01-01T00:00:00Z"
  }
}
```

***

## Get subscription by ID

`GET /api/admin/subscriptions/:id`

**id** `integer` *required*

Subscription ID.

***

## Get subscriptions by user

`GET /api/subscriptions/user/:userId`

**userId** `integer` *required*

User ID.

***

## List all subscriptions (superadmin)

`GET /api/subscriptions`


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