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

# Update subscription

> Updates an existing subscription. Requires authentication and admin privileges if organization ID is present.



## OpenAPI

````yaml specs/billing_api_docs.json patch /api/v1/subscriptions
openapi: 3.0.1
info:
  title: Billing API
  description: Billing service for managing subscriptions, payments, and entitlements
  contact: {}
  version: '1.0'
servers:
  - url: https://dev-billing-api.iqraa.ai/api/v1
security: []
tags:
  - name: Customers
    description: Customers related endpoints
  - name: Subscriptions
    description: Subscription related endpoints
  - name: Plans
    description: Plans related endpoints
  - name: Entitlements
    description: Entitlements related endpoints
  - name: Payments
    description: Payments related endpoints
  - name: Emails
    description: Email related endpoints
paths:
  /api/v1/subscriptions:
    patch:
      tags:
        - Subscriptions
      summary: Update subscription
      description: >-
        Updates an existing subscription. Requires authentication and admin
        privileges if organization ID is present.
      operationId: SubscriptionController_update
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSubscriptionDto'
      responses:
        '200':
          description: Subscription updated successfully
        '400':
          description: Bad request - Invalid input parameters
        '403':
          description: Forbidden - User not authorized to update subscription
        '404':
          description: Subscription not found
      security:
        - bearer: []
components:
  schemas:
    UpdateSubscriptionDto:
      type: object
      properties:
        planCode:
          type: string
          description: The code of the subscription plan
          example: PREMIUM_MONTHLY
        userEmail:
          type: string
          description: The email of the user
          example: john.doe@example.com
        userName:
          type: string
          description: The name of the user
          example: John Doe
      required:
        - planCode
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: opaque
      type: http

````