> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a promotion

> Create a promotion

### Request body

`CreatePromotionRequest`

<ParamField body="code" type="string,null" />

<ParamField body="description" type="string,null" />

<ParamField body="discount_value" type="string,null" />

<ParamField body="ends_at" type="string,null" />

<ParamField body="max_uses" type="integer,null (int32)" />

<ParamField body="name" type="string" required />

<ParamField body="promotion_type" type="string" required />

<ParamField body="starts_at" type="string,null" />

### Responses

<ResponseField name="201" type="PromotionResponse" />

<ResponseField name="400" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/promotions' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "code": null,
    "description": null,
    "discount_value": null,
    "ends_at": null,
    "max_uses": null,
    "name": "string",
    "promotion_type": "string",
    "starts_at": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "code": null,
    "created_at": "string",
    "discount_value": null,
    "id": "string",
    "name": "string",
    "promotion_type": "string",
    "status": "string"
  }
  ```
</ResponseExample>
