> ## 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.

# Partially update a benefit

> Update the fields of a benefit that the request sets; omitted fields keep their current values. <h3>OAuth</h3>Required scopes: <code>benefits</code>



## OpenAPI

````yaml /assets/openapi.json patch /benefits/v1/{benefitId}
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:
  /benefits/v1/{benefitId}:
    patch:
      tags:
        - Benefits
      summary: Partially update a benefit
      description: >-
        Update the fields of a benefit that the request sets; omitted fields
        keep their current values. <h3>OAuth</h3>Required scopes:
        <code>benefits</code>
      operationId: patchBenefit
      parameters:
        - in: path
          name: benefitId
          description: The id of the benefit
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        $ref: '#/components/requestBodies/patchBenefit'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - benefits
components:
  requestBodies:
    patchBenefit:
      content:
        application/json:
          schema:
            type: object
            properties:
              benefit:
                type: object
                properties:
                  application:
                    description: >-
                      Application settings. Pass the whole object; the fields
                      inside it are not merged.
                    type: object
                    properties:
                      allowance:
                        type: string
                        enum:
                          - once
                          - unlimited
                        description: >-
                          How often a user can apply: 'once' limits to a single
                          use, 'unlimited' allows repeated use.
                      buttonLabel:
                        type: string
                        enum:
                          - apply
                          - buy
                          - contact
                          - get
                          - learnMore
                        description: Label on the call-to-action button.
                      confirmationEmail:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            description: >-
                              Whether a confirmation email is sent after
                              applying.
                          template:
                            type: string
                            description: HTML template for the confirmation email.
                        required:
                          - enabled
                          - template
                        description: Confirmation email settings for applications.
                      enabled:
                        type: boolean
                        description: >-
                          Whether the application flow is enabled for this
                          benefit.
                    required:
                      - allowance
                      - buttonLabel
                      - confirmationEmail
                      - enabled
                  categoryRef:
                    description: >-
                      ID of the benefit category this benefit belongs to. Send
                      null to remove the benefit from its category.
                    nullable: true
                    type: string
                    format: uuid
                  description:
                    type: string
                    description: Full description of the benefit.
                  featured:
                    type: boolean
                    description: Whether the benefit is highlighted in listings.
                  media:
                    description: >-
                      Media files to attach, replacing the current ones. The url
                      is generated server-side.
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                          description: >-
                            Storage key of the media file, as returned by the
                            media upload endpoint.
                      required:
                        - key
                  subtitle:
                    type: string
                    description: Short tagline displayed below the title.
                  title:
                    type: string
                    minLength: 1
                    description: Display name of the benefit.
                  visibility:
                    type: string
                    enum:
                      - public
                      - admins
                      - exclusiveMembers
                      - members
                      - networkMembers
                    description: >-
                      Who can see this benefit: 'public' (everyone), 'admins',
                      'exclusiveMembers', 'members', or 'networkMembers'.
                description: >-
                  Benefit fields to change. Omitted fields keep their current
                  values.
            required:
              - benefit
      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/developer/api/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/developer/api/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://oauth2.spacebring.com/api/oauth2/authorize
          tokenUrl: https://oauth2.spacebring.com/api/oauth2/token
          refreshUrl: https://oauth2.spacebring.com/api/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            checkIns.readonly: Read check-ins
            checkIns: Read and write check-ins
            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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.