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

# Delete Subscription

> Cancels (deletes) a subscription by `subscriptionId` and returns the updated subscription record.



## OpenAPI

````yaml api-reference/openapi.json delete /subscriptions
openapi: 3.0.3
info:
  title: AscendOTT Aggregator Plans API
  description: API description for aggregators to interact with AscendOTT Sites
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: '{scheme}://{domain}/api/v1/aggregator'
    variables:
      scheme:
        enum:
          - https
          - http
        default: https
        description: Protocol
      domain:
        default: api.example.com
        description: Client API host (e.g., api.client.com)
security:
  - ApiKeyAuth: []
tags:
  - name: Plans
  - name: Subscriptions
  - name: Catalogs
paths:
  /subscriptions:
    delete:
      tags:
        - Subscriptions
      summary: Delete Subscription
      description: >-
        Cancels (deletes) a subscription by `subscriptionId` and returns the
        updated subscription record.
      parameters:
        - name: subscriptionId
          in: query
          required: true
          description: The subscriptionId to cancel.
          schema:
            type: string
      responses:
        '200':
          description: Deleted (cancelled) successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
              examples:
                success:
                  value:
                    subscriptionId: 68bbe3343faf938adbc22ba8
                    externalUserId: abcd123
                    planCode: 68b74fd80e51671c21e46913
                    startDate: '2025-09-06T07:31:00.000Z'
                    endDate: '2025-10-06T07:31:00.000Z'
                    status: cancelled
        '400':
          description: Bad Request — subscriptionId missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing:
                  value:
                    error: subscriptionId is required
        '403':
          description: Forbidden — missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing:
                  value:
                    error: x-api-key missing
                incorrect:
                  value:
                    error: x-api-key is incorrect
        '404':
          description: Not Found — subscriptionId not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                notFound:
                  value:
                    error: subscriptionId not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                error:
                  value:
                    error: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Subscription:
      type: object
      required:
        - subscriptionId
        - externalUserId
        - planCode
        - startDate
        - endDate
        - status
      properties:
        subscriptionId:
          type: string
        externalUserId:
          type: string
        planCode:
          type: string
        startDate:
          type: string
          format: date-time
        endDate:
          type: string
          format: date-time
        device:
          type: string
          enum:
            - web_browser
            - android_phone
            - ios_phone
            - android_tablet
            - ios_tablet
            - android_tv
            - smart_tv
            - roku
            - fire_tv
            - apple_tv
            - jio_stb
            - other
        status:
          type: string
          enum:
            - completed
            - pending
            - cancelled
            - expired
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````