# List Coupons - View All Discount Codes for Your Bot

> Get all discount coupons for your project, filtered by status, with redemption statistics.

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

Get all discount codes configured for your subscription bot. Filter by status (active or archived), search by code, name, or description, or find coupons that apply to specific plans. Each coupon includes redemption statistics and configuration details.

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

<ApiAuthorization type="Bearer API Key" />

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

<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="limit" type="integer" description="Number of items per page (1-100). Default: 10" />
  <ApiParameter name="offset" type="integer" description="Number of items to skip. Default: 0" />
  <ApiParameter name="status" type="string" description="Filter by status: active or archived" />
  <ApiParameter name="auto_apply" type="boolean" description="Filter by auto-apply setting" />
  <ApiParameter name="search" type="string" description="Free-text match against code, name, and description" />
  <ApiParameter name="plan_id" type="string" description="Only return coupons whose plan_ids include this plan" />
  <ApiParameter name="order" type="string" description="Sort order by created_at: asc or desc" />
</ApiSection>

<Note>
Response examples use the [UTC ISO date format](https://docs.botsubscription.com/api/overview/#utc-iso-response-dates).
</Note>

Coupon decimal fields are returned as strings. Values such as `"1e-7"` are normalized to `"0.0000001"`, but higher-precision values such as `"5e-19"` can retain exponent notation. Read values are not rounded to the 18-fractional-digit input limit. Creating, updating or cloning a coupon must satisfy the [decimal input rules](https://docs.botsubscription.com/api/overview/#decimal-amounts).

<ApiSamplePane>

<ApiRequestSample title="Request">

```bash
curl -X GET "https://api.botsubscription.com/v2/projects/f47ac10b-58cc-4372-a567-0e02b2c3d479/coupons?limit=10&status=active" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```javascript
const project_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479';
const response = await fetch(`https://api.botsubscription.com/v2/projects/${project_id}/coupons?limit=10&status=active`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});
const data = await response.json();
```

```python
import requests

project_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479'
response = requests.get(
    f'https://api.botsubscription.com/v2/projects/{project_id}/coupons',
    params={'limit': 10, 'status': 'active'},
    headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
```

```php
$project_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.botsubscription.com/v2/projects/{$project_id}/coupons?limit=10&status=active");
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/coupons",
  "code": 200,
  "total": 2,
  "data": [
    {
      "coupon_id": "11111111-1111-1111-1111-111111111111",
      "code": "SUMMER2024",
      "display_name": "Summer Sale",
      "description": "Summer promotion discount",
      "coupon_type": "percentage",
      "percentage": "20",
      "auto_apply": false,
      "status": "active",
      "total_redemptions": 45,
      "total_reservations": 0,
      "invitee_mode": "all",
      "renewal_constraint": "any",
      "payment_count_comparator": "any",
      "lifetime_revenue_comparator": "any",
      "plan_scope": "all",
      "starts_at": "2024-06-01T00:00:00.000Z",
      "ends_at": "2024-08-31T23:59:59.000Z",
      "created_at": "2024-05-15T10:00:00.000Z",
      "metadata": {},
      "min_spend_amount": "1",
      "min_spend_currency": "USD",
      "max_spend_amount": "100",
      "max_spend_currency": "USD"
    },
    {
      "coupon_id": "22222222-2222-2222-2222-222222222222",
      "code": "WELCOME10",
      "display_name": "Welcome Discount",
      "description": "Welcome discount for new users",
      "coupon_type": "fixed",
      "amount": "10",
      "currency": "USD",
      "auto_apply": true,
      "status": "active",
      "total_redemptions": 230,
      "total_reservations": 0,
      "invitee_mode": "all",
      "renewal_constraint": "any",
      "payment_count_comparator": "any",
      "lifetime_revenue_comparator": "any",
      "plan_scope": "all",
      "created_at": "2024-01-01T00:00:00.000Z",
      "metadata": {},
      "min_spend_amount": "1",
      "min_spend_currency": "USD",
      "max_spend_amount": "100",
      "max_spend_currency": "USD"
    }
  ]
}
```

  </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/coupons",
  "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/coupons",
  "code": 401,
  "error": {
    "message": "Invalid or expired authentication token.",
    "error_code": "UNAUTHORIZED"
  }
}
```

  </ApiResponse>
<ApiResponse status={200} description="Fixed-amount coupon">

```json
{
  "ok": true,
  "request_id": "11111111-1111-1111-1111-111111111111",
  "method": "GET",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/coupons",
  "code": 200,
  "total": 1,
  "data": [
    {
      "coupon_id": "11111111-1111-1111-1111-111111111111",
      "code": "FIXED10",
      "display_name": "Ten dollar discount",
      "description": "Summer promotion discount",
      "coupon_type": "fixed",
      "auto_apply": false,
      "status": "active",
      "total_redemptions": 45,
      "total_reservations": 0,
      "invitee_mode": "all",
      "renewal_constraint": "any",
      "payment_count_comparator": "any",
      "lifetime_revenue_comparator": "any",
      "plan_scope": "all",
      "starts_at": "2024-06-01T00:00:00.000Z",
      "ends_at": "2024-08-31T23:59:59.000Z",
      "created_at": "2024-05-15T10:00:00.000Z",
      "metadata": {},
      "min_spend_amount": "1",
      "min_spend_currency": "USD",
      "max_spend_amount": "100",
      "max_spend_currency": "USD",
      "amount": "10",
      "currency": "USD"
    }
  ]
}
```

</ApiResponse>
</ApiResponseTabs>

</ApiSamplePane>
