# POST /admin/api/unstable/price_rules/{price_rule_id}/discount_codes.json

**Resource:** [discounts/discountcode](../resources/discounts-discountcode.md)
**Creates a discount code**
**Operation ID:** `deprecated_unstable_create_price_rules_param_price_rule_id_discount_codes`

https://shopify.dev/docs/admin-api/rest/reference/discounts/discountcode#create-unstable

## Parameters

| Name | In | Type | Required | Description |
|------|------|------|----------|-------------|
| `price_rule_id` | path | string | Yes | price_rule_id |

## Request Body

**Content Types:** `application/json`

## Responses

| Status | Description |
|--------|-------------|
| 200 |  |

