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

# Cancel Subscription

> Cancels a donor subscription by its Id.



## OpenAPI

````yaml https://server.stage.overflow.co/api/docs/openapi.json delete /api/v3/subscriptions/{donorId}/{subscriptionId}
openapi: 3.0.0
info:
  title: Overflow Open API
  description: |

    The documentation for the Overflow Open APIs.

    To access the OpenAPI spec in JSON/YAML format, navigate to:

    * `/api/docs/openapi.json`
    * `/api/docs/openapi.yaml`
  version: '3.0'
  contact: {}
servers:
  - url: https://server.stage.overflow.co
    description: API server
security: []
tags: []
paths:
  /api/v3/subscriptions/{donorId}/{subscriptionId}:
    delete:
      tags:
        - Subscriptions
      summary: Cancel Subscription
      description: Cancels a donor subscription by its Id.
      operationId: OpenApiSubscriptionsController_cancelSubscription
      parameters:
        - name: donorId
          required: true
          in: path
          description: The Id of the donor to cancel the subscription for.
          schema:
            example: 2ea1ae03ca521e437db76d76
            type: string
        - name: subscriptionId
          required: true
          in: path
          description: The Id of the subscription to cancel.
          schema:
            example: 2ea1ae03ca521e437db76d76
            type: string
      requestBody:
        required: true
        description: Subscription cancellation details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteSubscriptionRequest'
      responses:
        '200':
          description: Subscription cancelled successfully.
        '400':
          description: Invalid request parameters
        '404':
          description: Subscription not found
      security:
        - ClientId: []
          ApiKey: []
components:
  schemas:
    DeleteSubscriptionRequest:
      type: object
      properties:
        cancellationReason:
          type: string
          maxLength: 150
          minLength: 1
          description: The reason for cancelling the subscription.
          example: I no longer attend this organization.
  securitySchemes:
    ClientId:
      type: apiKey
      in: header
      name: x-client-id
      description: Client ID for API authentication
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key for API authentication

````