# Delete a promotion

> Deactivates the promotion. New carts stop receiving the discount; subscriptions that already captured it keep their terms. A promotion still in draft is deleted outright.

Source: https://help.boltapp.com/api-reference/subscriptions/promotions-v1/deletepromotion

`DELETE /v1/subscriptions/products/{productId}/promotions/{promotionId}`

## OpenAPI definition

This endpoint as it appears in the OpenAPI document, with every schema it references included.

```json
{
  "openapi": "3.2.0",
  "info": {
    "title": "Subscriptions API",
    "version": "v1",
    "description": "API for managing subscriptions and products."
  },
  "servers": [
    {
      "url": "https://api.boltapp.com",
      "description": "The Production URL (Live Data)."
    },
    {
      "url": "https://api-sandbox.boltapp.com",
      "description": "The Sandbox URL (Test Data)."
    },
    {
      "url": "https://api-staging.boltapp.com",
      "description": "The Staging URL (Staged Data)."
    }
  ],
  "security": [
    {
      "X-API-Key": []
    },
    {
      "X-Publishable-Key": []
    }
  ],
  "paths": {
    "/v1/subscriptions/products/{productId}/promotions/{promotionId}": {
      "delete": {
        "operationId": "deletePromotion",
        "summary": "Delete a promotion",
        "description": "Deactivates the promotion. New carts stop receiving the discount; subscriptions that already captured it keep their terms. A promotion still in draft is deleted outright.",
        "tags": [
          "Promotions v1"
        ],
        "security": [
          {
            "X-API-Key": []
          },
          {
            "X-Publishable-Key": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "productId",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the product.",
            "examples": {
              "default": {
                "value": "sp_Tlj0Osm0N76T"
              }
            }
          },
          {
            "in": "path",
            "name": "promotionId",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the promotion to delete.",
            "examples": {
              "default": {
                "value": "bcp_V9y3q4Jw8kQe"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Promotion deactivated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Product or promotion not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Success": {
        "type": "object",
        "description": "A generic confirmation response.",
        "required": [
          "success"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "examples": [
              true
            ]
          }
        }
      },
      "ApiErrorResponse": {
        "type": "object",
        "description": "Standard error envelope returned by every non-2xx response.",
        "required": [
          "result",
          "errors"
        ],
        "properties": {
          "result": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Always `false` on an error.",
                "examples": [
                  false
                ]
              }
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        },
        "examples": [
          {
            "result": {
              "success": false
            },
            "errors": [
              {
                "code": 15,
                "message": "A valid value must be provided.",
                "field": "frequency"
              }
            ]
          }
        ]
      },
      "ApiError": {
        "type": "object",
        "description": "One error of a failed request.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "Bolt error code.",
            "examples": [
              15
            ]
          },
          "message": {
            "type": "string",
            "description": "What went wrong.",
            "examples": [
              "A valid value must be provided."
            ]
          },
          "field": {
            "type": "string",
            "description": "Path of the request field the error is about, such as `product.taxable` or `plans[1].sku`. Absent when the error is not about one field.",
            "examples": [
              "frequency"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "X-API-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Admins and Developers can obtain their Bolt API key from the Bolt Merchant Dashboard. Send it together with `X-Publishable-Key`."
      },
      "X-Publishable-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Publishable-Key",
        "description": "The publicly viewable identifier used to identify a merchant division. This key is found in the Developer > API section of the Bolt Merchant Dashboard. Required. Send it together with `X-API-Key`."
      }
    }
  }
}
```
