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

# Update an add-on



## OpenAPI

````yaml https://api.meteroid.com/api-docs/openapi.json patch /api/v1/addons/{addon_id}
openapi: 3.1.0
info:
  title: meteroid
  description: ''
  license:
    name: LicenseRef-Meteroid-EE
    identifier: LicenseRef-Meteroid-EE
  version: 0.1.0
servers: []
security: []
tags:
  - name: Add-ons
  - name: Batch Jobs
  - name: Budgets
    description: >-
      Beta: may change before general availability. Spending limits on a
      customer's usage, or one subscription's, per currency, with alerts at
      percentages of the amount.
    x-beta: true
  - name: Checkout Sessions
  - name: Checks
    description: >-
      Beta: may change before general availability. Whether a customer may
      consume more of a feature right now.
    x-beta: true
  - name: Connect
    description: Manage connected accounts (Express & Standard)
  - name: Coupons
  - name: Credit Notes
  - name: Credit units
    description: >-
      Custom denominations, such as "credits", that usage can be priced in and
      credit granted or sold in, instead of money.
  - name: Credits
    description: >-
      Prepaid credit: a customer's wallets, credit grants, ledger and top-ups.
      Promotional credit applies before tax like a discount; paid credit applies
      after tax like a payment.
  - name: Custom Properties
  - name: Customers
  - name: Entitlements
  - name: Events
  - name: Features
  - name: Invoices
  - name: Licenses
    description: >-
      Licenses for your customers' self-hosted installations: signed tokens
      carrying their plan's entitlements, activated and refreshed by the
      installation over the public licensing endpoints.
  - name: Metrics
  - name: OAuth
    description: OAuth 2.0 token endpoints (public, client-credentials auth)
  - name: OAuth Apps
    description: Manage OAuth applications for Connect integrations
  - name: Plans
  - name: Product Families
  - name: Products
  - name: Subscriptions
  - name: Usage
  - name: Usage costs
    description: >-
      Beta: may change before general availability. A customer's or a
      subscription's usage events and usage over time, with what they cost.
    x-beta: true
  - name: Webhook Endpoints
    description: Manage outbound webhook endpoints and inspect their deliveries
paths:
  /api/v1/addons/{addon_id}:
    patch:
      tags:
        - Add-ons
      summary: Update an add-on
      operationId: update_addon
      parameters:
        - name: addon_id
          in: path
          description: Add-on ID
          required: true
          schema:
            $ref: '#/components/schemas/AddOnId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAddOnRequest'
        required: true
      responses:
        '200':
          description: Add-on updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddOn'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '404':
          description: Add-on not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    AddOnId:
      type: string
      format: MeteroidId
      examples:
        - add_7n42DGM5Tflk9n8mt7Fhc7
    UpdateAddOnRequest:
      type: object
      properties:
        description:
          type:
            - string
            - 'null'
        max_instances_per_subscription:
          type:
            - integer
            - 'null'
          format: int32
        name:
          type:
            - string
            - 'null'
        price_id:
          oneOf:
            - $ref: '#/components/schemas/PriceId'
            - type: 'null'
        self_serviceable:
          type:
            - boolean
            - 'null'
    AddOn:
      type: object
      required:
        - id
        - name
        - product_id
        - price_id
        - self_serviceable
        - created_at
      properties:
        archived_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        description:
          type:
            - string
            - 'null'
        entitlements:
          type: array
          items:
            $ref: '#/components/schemas/Entitlement'
        fee_type:
          oneOf:
            - $ref: '#/components/schemas/ProductFeeTypeEnum'
            - type: 'null'
        id:
          $ref: '#/components/schemas/AddOnId'
        max_instances_per_subscription:
          type:
            - integer
            - 'null'
          format: int32
        name:
          type: string
        price_id:
          $ref: '#/components/schemas/PriceId'
        product_id:
          $ref: '#/components/schemas/ProductId'
        self_serviceable:
          type: boolean
    RestErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
    PriceId:
      type: string
      format: MeteroidId
      examples:
        - pri_7n42DGM5Tflk9n8mt7Fhc7
    Entitlement:
      type: object
      description: >-
        A raw entitlement row attached to one entity (feature, plan version,
        add-on, or subscription).
      required:
        - id
        - feature_id
        - value
        - created_at
        - updated_at
      properties:
        created_at:
          type: string
          format: date-time
        feature_id:
          $ref: '#/components/schemas/FeatureId'
        id:
          $ref: '#/components/schemas/EntitlementId'
        updated_at:
          type: string
          format: date-time
        value:
          $ref: '#/components/schemas/EntitlementValue'
    ProductFeeTypeEnum:
      type: string
      enum:
        - RATE
        - SLOT
        - CAPACITY
        - USAGE
        - EXTRA_RECURRING
        - ONE_TIME
        - CREDIT
    ProductId:
      type: string
      format: MeteroidId
      examples:
        - prd_7n42DGM5Tflk9n8mt7Fhc7
    ErrorCode:
      type: string
      enum:
        - BAD_REQUEST
        - NOT_FOUND
        - CONFLICT
        - FORBIDDEN
        - UNAUTHORIZED
        - TOKEN_EXPIRED
        - TOO_MANY_REQUESTS
        - INTERNAL_SERVER_ERROR
    FeatureId:
      type: string
      format: MeteroidId
      examples:
        - feat_7n42DGM5Tflk9n8mt7Fhc7
    EntitlementId:
      type: string
      format: MeteroidId
      examples:
        - ent_7n42DGM5Tflk9n8mt7Fhc7
    EntitlementValue:
      oneOf:
        - $ref: '#/components/schemas/BooleanEntitlementValue'
        - $ref: '#/components/schemas/MeteredEntitlementValue'
        - $ref: '#/components/schemas/ConfigEntitlementValue'
      discriminator:
        propertyName: type
        mapping:
          BOOLEAN: '#/components/schemas/BooleanEntitlementValue'
          CONFIG: '#/components/schemas/ConfigEntitlementValue'
          METERED: '#/components/schemas/MeteredEntitlementValue'
    BooleanEntitlementValue:
      type: object
      required:
        - enabled
        - type
      properties:
        enabled:
          type: boolean
        type:
          type: string
          enum:
            - BOOLEAN
    MeteredEntitlementValue:
      type: object
      required:
        - type
      properties:
        enabled:
          type: boolean
          description: Per-entitlement kill switch. `false` means disabled.
        grace_pct:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            `BLOCK` only: usage allowed beyond the limit before it is refused,
            in percent of the

            limit (1 to 1000).
          minimum: 0
        group_by:
          type:
            - string
            - 'null'
          description: >-
            Event property the limit applies to separately, one limit per value
            (e.g. `user_id`).
        limit:
          type:
            - string
            - 'null'
          format: decimal
          description: Cap on usage. Null means unlimited.
        overage_behavior:
          oneOf:
            - $ref: '#/components/schemas/EntitlementOverageBehavior'
              description: >-
                What happens at the limit; requires a limit.


                The limit terms (`overage_behavior`, `grace_pct`, `thresholds`,
                `group_by`) follow one

                rule: omitted, a term keeps its current value on update (its
                default on create); `null`

                sets it to its default (`BLOCK`, no grace, no thresholds, no
                grouping). An omitted term

                that no longer applies (no limit, or a sliding window for the
                thresholds) falls back to its

                default; one sent explicitly is refused with 400.
            - type: 'null'
        reset_period:
          $ref: '#/components/schemas/ResetPeriod'
        thresholds:
          type:
            - array
            - 'null'
          items:
            type: integer
            format: int32
            minimum: 0
          description: >-
            Percents of the limit (1 to 100, at most 10) at which an alert is
            sent, once per period:

            `entitlement.usage_threshold_reached`, or
            `entitlement.limit_reached` at 100. Requires a

            limit and a window that is not sliding.
        type:
          type: string
          enum:
            - METERED
        warning_threshold_pct:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Deprecated: use `thresholds`. A single alert threshold, read only
            when `thresholds` is

            omitted; returned as the lowest of `thresholds`.
          minimum: 0
    ConfigEntitlementValue:
      type: object
      required:
        - value
        - type
      properties:
        type:
          type: string
          enum:
            - CONFIG
        value:
          $ref: '#/components/schemas/ConfigValue'
    EntitlementOverageBehavior:
      type: string
      description: What happens once usage reaches the limit.
      enum:
        - BLOCK
        - ALLOW
    ResetPeriod:
      oneOf:
        - $ref: '#/components/schemas/BillingCycleResetPeriod'
          description: >-
            Resets each time your subscription renews — anchored to your billing
            cycle.
        - $ref: '#/components/schemas/CalendarResetPeriod'
          description: >-
            Resets on calendar boundaries (e.g. the 1st of every month) — not
            tied to subscription start date.
        - $ref: '#/components/schemas/FixedWindowResetPeriod'
          description: >-
            Resets at regular intervals — anchored to your subscription's exact
            activation time.
        - $ref: '#/components/schemas/SlidingWindowResetPeriod'
          description: >-
            Always ends at now — e.g. 30 days means the last 30 days, old usage
            drops off automatically.
        - $ref: '#/components/schemas/NeverResetPeriod'
          description: >-
            Never resets — counts all usage since the subscription was
            activated.
      discriminator:
        propertyName: type
        mapping:
          BILLING_CYCLE: '#/components/schemas/BillingCycleResetPeriod'
          CALENDAR: '#/components/schemas/CalendarResetPeriod'
          FIXED_WINDOW: '#/components/schemas/FixedWindowResetPeriod'
          NEVER: '#/components/schemas/NeverResetPeriod'
          SLIDING_WINDOW: '#/components/schemas/SlidingWindowResetPeriod'
    ConfigValue:
      oneOf:
        - $ref: '#/components/schemas/NumberConfigValue'
        - $ref: '#/components/schemas/BooleanConfigValue'
        - $ref: '#/components/schemas/TextConfigValue'
        - $ref: '#/components/schemas/JsonConfigValue'
      description: >-
        A static, typed configuration value carried by a Config entitlement.
        Resolved synchronously

        through the entitlement hierarchy — no metric, no usage counter.
      discriminator:
        propertyName: kind
        mapping:
          BOOLEAN: '#/components/schemas/BooleanConfigValue'
          JSON: '#/components/schemas/JsonConfigValue'
          NUMBER: '#/components/schemas/NumberConfigValue'
          TEXT: '#/components/schemas/TextConfigValue'
    BillingCycleResetPeriod:
      type: object
      description: >-
        Resets each time your subscription renews — anchored to your billing
        cycle.
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - BILLING_CYCLE
    CalendarResetPeriod:
      type: object
      description: >-
        Resets on calendar boundaries (e.g. the 1st of every month) — not tied
        to subscription start date.
      required:
        - unit
        - interval
        - type
      properties:
        interval:
          type: integer
          format: int32
          minimum: 0
        type:
          type: string
          enum:
            - CALENDAR
        unit:
          $ref: '#/components/schemas/CalendarUnit'
    FixedWindowResetPeriod:
      type: object
      description: >-
        Resets at regular intervals — anchored to your subscription's exact
        activation time.
      required:
        - unit
        - interval
        - type
      properties:
        interval:
          type: integer
          format: int32
          minimum: 0
        type:
          type: string
          enum:
            - FIXED_WINDOW
        unit:
          $ref: '#/components/schemas/CalendarUnit'
    SlidingWindowResetPeriod:
      type: object
      description: >-
        Always ends at now — e.g. 30 days means the last 30 days, old usage
        drops off automatically.

        A sliding window has no reset moment (`reset_at` is absent) and sends no
        threshold or

        limit-reached webhooks; it is enforced by the entitlement check.
      required:
        - unit
        - interval
        - type
      properties:
        interval:
          type: integer
          format: int32
          minimum: 0
        type:
          type: string
          enum:
            - SLIDING_WINDOW
        unit:
          $ref: '#/components/schemas/CalendarUnit'
    NeverResetPeriod:
      type: object
      description: Never resets — counts all usage since the subscription was activated.
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - NEVER
    NumberConfigValue:
      type: object
      description: A number config value (decimal, encoded as a string).
      required:
        - value
        - kind
      properties:
        kind:
          type: string
          enum:
            - NUMBER
        value:
          type: string
          format: decimal
    BooleanConfigValue:
      type: object
      description: A boolean config value.
      required:
        - value
        - kind
      properties:
        kind:
          type: string
          enum:
            - BOOLEAN
        value:
          type: boolean
    TextConfigValue:
      type: object
      description: A text config value.
      required:
        - value
        - kind
      properties:
        kind:
          type: string
          enum:
            - TEXT
        value:
          type: string
    JsonConfigValue:
      type: object
      description: >-
        A structured (JSON) config value — the "metadata" case, several fields
        in one entitlement.
      required:
        - value
        - kind
      properties:
        kind:
          type: string
          enum:
            - JSON
        value: {}
    CalendarUnit:
      type: string
      enum:
        - HOUR
        - DAY
        - WEEK
        - MONTH
        - YEAR
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````

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