> For the complete documentation index, see [llms.txt](https://requestmechanic.gitbook.io/request-mechanic-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://requestmechanic.gitbook.io/request-mechanic-api-documentation/user/create-a-coupon.md).

# Create a Coupon

The `POST /user/coupons/` endpoint allows users to create a new coupon.

**Parameters**

| **Field**             | **Type**           | **Description**                                              |
| --------------------- | ------------------ | ------------------------------------------------------------ |
| `data`                | Object (Body)      | The data object containing the coupon details.               |
| **`value`**           | String (Decimal)   | The value of the coupon. This is a required field.           |
| **`expiration_date`** | String (Date-Time) | The expiration date of the coupon. This is a required field. |

**Responses**

| **Code** | **Description**              |
| -------- | ---------------------------- |
| 201      | Coupon created successfully. |

**Example Response Body**

```json
{
  "id": 123,
  "code": "ABCD1234",
  "value": "50.00",
  "expiration_date": "2024-12-31T23:59:59Z"
}
```
