# List Project Plans - Get All Subscription Bot Pricing Tiers

> Get all subscription plans for your project. Returns pricing, duration, and configuration for each plan.

Source: https://docs.botsubscription.com/api/plans/list/

Fetch all subscription plans configured for your project. Each plan includes pricing details, billing duration, recurring payment settings, and the Telegram channels or Discord roles it grants access to. Use this to sync your pricing page or build custom checkout flows.

<ApiEndpoint method="GET" endpoint="/v2/projects/{project_id}/plans" />

<ApiAuthorization type="Bearer API Key" required={false} />

**API key scope:** `plans:read` (required for restricted keys).

Authentication is optional. Omit the header for the public view; a supplied invalid token is rejected. Authenticated restricted keys need `plans:read`.

Restricted keys receive the buyer-eligibility view of plans. Use an unrestricted key when your integration needs the complete management inventory.

<ApiSection title="Path Parameters">
  <ApiParameter name="project_id" type="string" required description="The unique identifier of the project." />
</ApiSection>

<ApiSection title="Query Parameters">
  <ApiParameter name="search" type="string" description="Literal, case-insensitive substring of the plan name. At most 100 UTF-16 code units before trimming; empty or whitespace-only means no filter." />
  <ApiParameter name="sort" type="string" defaultValue="priority" description="Sort by priority or name." />
  <ApiParameter name="order" type="string" description="Sort direction: asc or desc. Defaults to desc for priority sorting, or asc for name sorting." />
  <ApiParameter name="limit" type="integer" defaultValue="10" description="Number of items per page (1-100)." />
  <ApiParameter name="offset" type="integer" defaultValue="0" description="Number of items to skip; must be zero or greater." />
</ApiSection>

For example, `?search=Gold&sort=name&order=asc` searches for Gold and sorts matching plans by name. Omitting both sorting parameters uses priority descending. Ties use name ascending, then plan ID ascending. `total` counts matching plans visible to the caller before pagination. Invalid search, sort, order or pagination inputs return `422 VALIDATION_ERROR`.

<ApiSamplePane>

<ApiRequestSample title="Request">

```bash
curl -X GET "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/plans?limit=20&sort=name&order=asc" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```javascript
const project_id = 'YOUR_PROJECT_ID';
const response = await fetch(`https://api.botsubscription.com/v2/projects/${project_id}/plans?limit=20&sort=name&order=asc`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});
const data = await response.json();
```

```python
import requests

project_id = 'YOUR_PROJECT_ID'
response = requests.get(
    f'https://api.botsubscription.com/v2/projects/{project_id}/plans',
    params={'limit': 20, 'sort': 'name', 'order': 'asc'},
    headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
```

```php
$project_id = 'YOUR_PROJECT_ID';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.botsubscription.com/v2/projects/{$project_id}/plans?limit=20&sort=name&order=asc");
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
```

</ApiRequestSample>

<ApiResponseTabs>
  <ApiResponse status={200} description="Success">

```json
{
  "ok": true,
  "request_id": "11111111-1111-1111-1111-111111111111",
  "method": "GET",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/plans",
  "code": 200,
  "total": 3,
  "message": "Plans retrieved successfully",
  "data": [
    {
      "plan_name": "Bronze",
      "plan_price": "10",
      "plan_currency": "USD",
      "plan_duration": "1 hour",
      "plan_price_formatted": "$10.00",
      "plan_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
      "plan_data": {
        "plan_recurring": true,
        "plan_one_time": true
      },
      "plan_targets": [
        {
          "target_name": "Members",
          "platform": "discord",
          "kind": "role",
          "external_id": "123456789012345678",
          "is_enabled": true,
          "target_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
          "parent_target_id": null,
          "participant_count": 0
        }
      ],
      "is_universal": false,
      "membership_count": 3,
      "links": {
        "web": "https://example.com/subscribe?plan_id=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
        "telegram": "https://t.me/example_subscription_bot?start=plan_example"
      }
    },
    {
      "plan_name": "Gold",
      "plan_price": "100",
      "plan_currency": "USD",
      "plan_duration": "1 month",
      "plan_price_formatted": "$100.00",
      "plan_id": "eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee",
      "plan_data": {
        "plan_recurring": false,
        "plan_one_time": true
      },
      "plan_targets": [],
      "is_universal": false,
      "membership_count": 3,
      "links": {}
    },
    {
      "plan_name": "Silver",
      "plan_price": "20",
      "plan_currency": "USD",
      "plan_duration": "1 day",
      "plan_price_formatted": "$20.00",
      "plan_id": "dddddddd-dddd-dddd-dddd-dddddddddddd",
      "plan_data": {
        "plan_recurring": false,
        "plan_one_time": true
      },
      "plan_targets": [],
      "is_universal": false,
      "membership_count": 3,
      "links": {}
    }
  ]
}
```

  </ApiResponse>
  <ApiResponse status={422} description="Invalid page limit">

```json
{
  "ok": false,
  "request_id": "44444444-4444-4444-8444-444444444444",
  "method": "GET",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/plans",
  "code": 422,
  "errors": [
    {
      "message": "query: limit is too small; minimum allowed is 1",
      "error_code": "VALIDATION_ERROR"
    }
  ]
}
```

  </ApiResponse>
  <ApiResponse status={401} description="Invalid or expired API key">

```json
{
  "ok": false,
  "request_id": "44444444-4444-4444-8444-444444444444",
  "method": "GET",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/plans",
  "code": 401,
  "error": {
    "message": "Invalid or expired authentication token.",
    "error_code": "UNAUTHORIZED"
  }
}
```

  </ApiResponse>
</ApiResponseTabs>

</ApiSamplePane>
