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

# Update Subscription

> Update a subscription for a connected account.



## OpenAPI

````yaml put /stripe/connect/accounts/{accountId}/subscriptions/{subscriptionId}
openapi: 3.0.1
info:
  title: ChatDash API Documentation
  description: API Documentation for the ChatDash Server
  version: 2.0.0
servers:
  - url: https://api.chat-dash.com/v1/public
security: []
paths:
  /stripe/connect/accounts/{accountId}/subscriptions/{subscriptionId}:
    put:
      tags:
        - Stripe Connect
      summary: Update Subscription
      description: Update a subscription for a connected account.
      parameters:
        - name: Authorization
          in: header
          required: true
          description: >-
            All requests to the ChatDash API must be validated with the agency
            API Key found on your agency profile
          schema:
            type: string
        - name: accountId
          in: path
          required: true
          description: The Stripe connected account ID
          schema:
            type: string
        - name: subscriptionId
          in: path
          required: true
          description: The Stripe subscription ID
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    productId:
                      type: string
                      description: >-
                        Required with startDate when updating a schedule
                        (subscriptionId includes sched).
                    startDate:
                      type: integer
                      description: >-
                        Unix timestamp (seconds). Required with productId when
                        updating a schedule.
                    taxSettings:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Whether to enable automatic tax collection
                          example: true
                        country:
                          type: string
                          description: >-
                            Two-letter ISO country code. Required when enabled
                            is true.
                          example: US
                        postalCode:
                          type: string
                          description: >-
                            Postal code for tax calculation. Required for most
                            countries when enabled is true.
                          example: '94102'
                    cancelAtPeriodEnd:
                      type: boolean
                      description: >-
                        Must be boolean. Not allowed for schedules; delete
                        instead.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: sub_1ABC123DEF456GHI
                  type:
                    type: string
                    example: subscription
                  status:
                    type: string
                    example: active
                  cancelAtPeriodEndDisplay:
                    type: string
                    nullable: true
                    example: null
                  customer:
                    type: object
                    example:
                      id: cus_ABC123XYZ
                      email: customer@example.com
                  current_period_start:
                    type: integer
                    nullable: true
                    example: 1700000000
                  current_period_end:
                    type: integer
                    nullable: true
                    example: 1702600000
                  created:
                    type: integer
                    example: 1700000000
                  collection_method:
                    type: string
                    example: charge_automatically
                  cancel_at_period_end:
                    type: boolean
                    example: false
                  canceled_at:
                    type: integer
                    nullable: true
                    example: null
                  product:
                    type: object
                    properties:
                      id:
                        type: string
                        example: prod_ABC123XYZ
                      name:
                        type: string
                        example: Pro Plan
                  automatic_tax:
                    type: boolean
                    example: false
                  coupon:
                    type: string
                    example: ''
                  agents:
                    type: string
                    example: Agent 1, Agent 2
                  priceIds:
                    type: array
                    items:
                      type: string
                    example:
                      - price_ABC123
                      - price_DEF456
                  startDate:
                    type: integer
                    nullable: true
                    example: 1700000000
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: An unexpected error occurred

````