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

# Cancel Subscription



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json post /api/v1/subscriptions/{subscription_id}/cancel
openapi: 3.1.0
info:
  title: CATTIX API
  description: CATTIX Backend API
  version: 0.107.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://dev-api.cattix.com
    description: Development
  - url: https://staging-api.cattix.com
    description: Staging
  - url: https://api.cattix.com
    description: Production
security: []
paths:
  /api/v1/subscriptions/{subscription_id}/cancel:
    post:
      tags:
        - Subscriptions
      summary: Cancel Subscription
      operationId: cancel_subscription_api_v1_subscriptions__subscription_id__cancel_post
      parameters:
        - name: subscription_id
          in: path
          required: true
          schema:
            type: integer
            title: Subscription Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    SubscriptionSchema:
      properties:
        google_ads_customer_id:
          type: integer
          title: Google Ads Customer Id
        subscription_plan_id:
          type: integer
          title: Subscription Plan Id
        starts_at:
          type: string
          format: date-time
          title: Starts At
        expires_at:
          type: string
          format: date-time
          title: Expires At
        subscription_type:
          $ref: '#/components/schemas/SubscriptionType'
        id:
          type: integer
          title: Id
        cancelled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Cancelled At
        date_added:
          type: string
          format: date-time
          title: Date Added
        date_updated:
          type: string
          format: date-time
          title: Date Updated
      type: object
      required:
        - google_ads_customer_id
        - subscription_plan_id
        - starts_at
        - expires_at
        - subscription_type
        - id
        - date_added
        - date_updated
      title: SubscriptionSchema
      description: Schema for reading Subscription.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SubscriptionType:
      type: string
      enum:
        - auto_renew
        - one_time
      title: SubscriptionType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````