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

# Update a plan

> Update a certain plan. <h3>OAuth</h3>Required scopes: <code>plans</code>



## OpenAPI

````yaml /assets/openapi.json patch /plans/v1/{planId}
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /plans/v1/{planId}:
    patch:
      tags:
        - Plans
      summary: Update a plan
      description: 'Update a certain plan. <h3>OAuth</h3>Required scopes: <code>plans</code>'
      operationId: updatePlan
      parameters:
        - in: path
          name: planId
          required: true
          description: The id of the plan.
          schema:
            type: string
            format: uuid
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
      requestBody:
        $ref: '#/components/requestBodies/updatePlan'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - plans
components:
  requestBodies:
    updatePlan:
      content:
        application/json:
          schema:
            type: object
            properties:
              plan:
                type: object
                properties:
                  access:
                    description: Third-party access integrations.
                    type: object
                    properties:
                      avigilonAltaGroupRef:
                        description: Avigilon Alta access group reference.
                        nullable: true
                        type: number
                      brivoGroupRef:
                        description: Brivo access group reference.
                        nullable: true
                        type: number
                      kisiGroupRef:
                        description: Kisi access group reference.
                        nullable: true
                        type: number
                      saltoksAccessGroupRef:
                        description: Salto KS access group reference.
                        nullable: true
                        type: string
                        format: uuid
                      tapkeyGroupRef:
                        description: Tapkey access group reference.
                        nullable: true
                        type: string
                        format: uuid
                  addons:
                    description: Addons included in the plan.
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                      required:
                        - id
                  commitmentCycles:
                    default: 0
                    description: Number of billing cycles the member is committed to.
                    type: integer
                    minimum: 0
                    maximum: 1000
                  credits:
                    default: 0
                    description: Credits included in the plan.
                    type: number
                    minimum: 0
                    maximum: 1000000000
                  customTax:
                    description: Custom tax settings.
                    type: object
                    properties:
                      enabled:
                        type: boolean
                        description: Whether custom tax is enabled.
                      rate:
                        type: number
                        minimum: 0
                        maximum: 100
                        description: Custom tax rate percentage.
                    required:
                      - enabled
                      - rate
                    additionalProperties: false
                  dayPasses:
                    default: 0
                    description: Number of day passes included in the plan.
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  description:
                    default: ''
                    description: Description of the plan.
                    type: string
                  discounts:
                    description: Percentage discounts by product type.
                    deprecated: true
                    type: object
                    properties:
                      creditPackages:
                        type: number
                        minimum: 0
                        maximum: 100
                        description: Discount percentage for credit packages.
                      desks:
                        type: number
                        minimum: 0
                        maximum: 100
                        description: Discount percentage for desk bookings.
                      equipment:
                        type: number
                        minimum: 0
                        maximum: 100
                        description: Discount percentage for equipment bookings.
                      events:
                        type: number
                        minimum: 0
                        maximum: 100
                        description: Discount percentage for event tickets.
                      rooms:
                        type: number
                        minimum: 0
                        maximum: 100
                        description: Discount percentage for room bookings.
                      shop:
                        type: number
                        minimum: 0
                        maximum: 100
                        description: Discount percentage for shop products.
                    required:
                      - creditPackages
                      - desks
                      - events
                      - rooms
                      - shop
                    additionalProperties: false
                  exclusiveAccess:
                    default:
                      resourceRefs: []
                    description: Resources exclusively available to members on this plan.
                    type: object
                    properties:
                      resourceRefs:
                        type: array
                        items:
                          type: string
                          format: uuid
                          description: ID of a resource with exclusive access.
                        description: Resource IDs with exclusive access for this plan.
                    required:
                      - resourceRefs
                  grantedDiscounts:
                    description: Coupons granted to members on this plan.
                    type: array
                    items:
                      type: object
                      properties:
                        coupon:
                          type: object
                          properties:
                            amountOff:
                              description: Fixed discount amount.
                              type: number
                            currencyCode:
                              description: Currency code for amountOff.
                              type: string
                            id:
                              type: string
                              format: uuid
                              description: Unique identifier of the coupon.
                            percentOff:
                              description: Percentage discount.
                              type: number
                            productTypes:
                              type: array
                              items:
                                type: string
                                enum:
                                  - roomBookings
                                  - eventSpaceBookings
                                  - conferenceRoomBookings
                                  - meetingRoomBookings
                                  - phoneBoothBookings
                                  - stationBookings
                                  - studioBookings
                                  - hotDeskBookings
                                  - dedicatedDeskBookings
                                  - parkingBookings
                                  - equipmentBookings
                                  - eventTickets
                                  - shopProducts
                                  - packages
                                  - subscriptionItems
                              description: Product types the coupon applies to.
                          required:
                            - id
                          description: Coupon to grant.
                      required:
                        - coupon
                  price:
                    type: number
                    minimum: 0
                    description: Price of the plan.
                  printing:
                    description: Printing integration settings.
                    type: object
                    properties:
                      ezeepBlueGroupRef:
                        description: Ezeep Blue printing group reference.
                        nullable: true
                        type: string
                        format: uuid
                  selfSignup:
                    description: Self sign-up settings.
                    type: object
                    properties:
                      enabled:
                        type: boolean
                        description: Whether members can self-sign up.
                      type:
                        type: string
                        enum:
                          - immediate
                          - request
                        description: Self sign-up flow type.
                    required:
                      - enabled
                      - type
                    additionalProperties: false
                  setupFee:
                    default: 0
                    description: One-time setup fee.
                    type: number
                    minimum: 0
                  title:
                    type: string
                    minLength: 1
                    description: Display name of the plan.
                description: Plan fields to update.
            required:
              - plan
      required: true
  schemas:
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    BasicAuth:
      type: http
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read contracts, credit notes, discounts and invoices
            invoices: Read and write contract, credit notes, discounts and invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````