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

# Set Subscription Renew Enabled



## OpenAPI

````yaml https://api.truestate.io/openapi.json patch /billing/subscription/renew/
openapi: 3.1.0
info:
  title: TrueState Backend API
  summary: >-
    TrueState is an AI platform for business users to create high-impact AI
    solutions.
  description: >

    This **[TrueState](https://www.truestate.io/)** backend API allows our
    clients to automate and more powerfully retrieve and modify data from the
    TrueState platform.


    Example use cases include:


    - Accessing embeddings for a dataset.

    - Automating the process of dataset creation and model retraining as your
    data changes.

    - Much more.


    Our backend is built using the [FastAPI](https://fastapi.tiangolo.com/)
    framework in python

    using [Auth0](https://auth0.com/) and [Client API
    Keys](https://www.truestate.io/dawn/docs) for internal an external
    authentication, respectively.

    Our backend is designed to be secure, scalable, easy to use and well
    documented _(each router with its own linked docs page)_.

    Clients can only access data from their own organisation, as setup in Auth0
    our the Client API Keys. See how
    **[here](https://www.truestate.io/dawn/docs)**.


    **PS**: You can view this API documentation in either
    **[Swagger](swagger/docs)** or **[Redoc](redoc/)**, but only the swagger
    lets you test calls.
  contact:
    name: True State Support
    url: https://www.truestate.io/dawn/docs
    email: support@truestate.io
  license:
    name: Private
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 0.13.95
servers: []
security: []
paths:
  /billing/subscription/renew/:
    patch:
      tags:
        - billing
      summary: Set Subscription Renew Enabled
      operationId: set_subscription_renew_enabled_billing_subscription_renew__patch
      parameters:
        - name: enabled
          in: query
          required: true
          schema:
            type: boolean
            title: Enabled
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingAccountRead'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BillingAccountRead:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        email:
          type: string
          format: email
          title: Email
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        stripe_customer_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Stripe Customer Ref
        stripe_payment_method_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Stripe Payment Method Ref
        stripe_subscription_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Stripe Subscription Ref
        stripe_price_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Stripe Price Ref
        subscription_tier:
          anyOf:
            - $ref: '#/components/schemas/SubscriptionTier'
            - type: 'null'
        subscription_expired_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Subscription Expired At
        subscription_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Subscription Status
        current_period_start:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Current Period Start
        current_period_end:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Current Period End
        subscription_renew_enabled:
          type: boolean
          title: Subscription Renew Enabled
        cancel_at_period_end:
          type: boolean
          title: Cancel At Period End
        credit_checks_enabled:
          type: boolean
          title: Credit Checks Enabled
        has_plan:
          type: boolean
          title: Has Plan
        auto_recharge_enabled:
          type: boolean
          title: Auto Recharge Enabled
        auto_recharge_threshold_trigger_amount:
          type: integer
          title: Auto Recharge Threshold Trigger Amount
        auto_recharge_to_amount:
          type: integer
          title: Auto Recharge To Amount
        created_at:
          type: string
          format: date-time
          title: Created At
        open_invoice_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Open Invoice Url
      type: object
      required:
        - id
        - name
        - email
        - image_url
        - stripe_customer_ref
        - stripe_payment_method_ref
        - stripe_subscription_ref
        - stripe_price_ref
        - subscription_tier
        - subscription_expired_at
        - subscription_status
        - current_period_start
        - current_period_end
        - subscription_renew_enabled
        - cancel_at_period_end
        - credit_checks_enabled
        - has_plan
        - auto_recharge_enabled
        - auto_recharge_threshold_trigger_amount
        - auto_recharge_to_amount
        - created_at
      title: BillingAccountRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SubscriptionTier:
      type: string
      enum:
        - TRIAL
        - STARTER
        - PRO
        - SCALE
        - ENTERPRISE
      title: SubscriptionTier
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````