# Create multiple plugin subscription plans

`POST /api/plugin-plans/bulk-create`

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

Schema: [CreateMultiplePluginPlansDTO](https://sourcey-gauzy.pages.dev/api-reference/models/createmultiplepluginplansdto/index.md)

- `plans` (required)
  Type: array
  
  Array of plugin subscription plans to create
  
  Items:
    Reference: [CreatePluginSubscriptionPlanDTO](https://sourcey-gauzy.pages.dev/api-reference/models/createpluginsubscriptionplandto/index.md); Type: object

Responses:

- 201: Plugin subscription plans created successfully

Content type: application/json

Type: array

Items:
  Reference: [PluginSubscriptionPlan_1](https://sourcey-gauzy.pages.dev/api-reference/models/pluginsubscriptionplan-1/index.md); Type: object

## Examples

### cURL

```bash
curl -X POST 'http://localhost:3000/api/plugin-plans/bulk-create' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "plans": [
    {
      "price": 0,
      "isPopular": true,
      "isRecommended": true,
      "trialDays": 0,
      "setupFee": 0,
      "discountPercentage": 0,
      "name": "string",
      "description": "string",
      "type": "free",
      "currency": "AFN",
      "billingPeriod": "daily",
      "features": [
        "string"
      ],
      "limitations": {},
      "isActive": true,
      "metadata": {},
      "sortOrder": 0,
      "pluginId": "string"
    }
  ]
}'
```

### JavaScript

```javascript
const body = `{
  "plans": [
    {
      "price": 0,
      "isPopular": true,
      "isRecommended": true,
      "trialDays": 0,
      "setupFee": 0,
      "discountPercentage": 0,
      "name": "string",
      "description": "string",
      "type": "free",
      "currency": "AFN",
      "billingPeriod": "daily",
      "features": [
        "string"
      ],
      "limitations": {},
      "isActive": true,
      "metadata": {},
      "sortOrder": 0,
      "pluginId": "string"
    }
  ]
}`;

const response = await fetch('http://localhost:3000/api/plugin-plans/bulk-create', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "plans": [
    {
      "price": 0,
      "isPopular": true,
      "isRecommended": true,
      "trialDays": 0,
      "setupFee": 0,
      "discountPercentage": 0,
      "name": "string",
      "description": "string",
      "type": "free",
      "currency": "AFN",
      "billingPeriod": "daily",
      "features": [
        "string"
      ],
      "limitations": {},
      "isActive": true,
      "metadata": {},
      "sortOrder": 0,
      "pluginId": "string"
    }
  ]
}'''

response = requests.post(
    'http://localhost:3000/api/plugin-plans/bulk-create',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
