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

# Create an add-on



## OpenAPI

````yaml https://api.meteroid.com/api-docs/openapi.json post /api/v1/addons
openapi: 3.1.0
info:
  title: meteroid
  description: ''
  license:
    name: LicenseRef-Proprietary
    identifier: LicenseRef-Proprietary
  version: 0.1.0
servers: []
security: []
tags:
  - name: Meteroid
    description: Meteroid API
  - name: Add-ons
  - name: Batch Jobs
  - name: Checkout Sessions
  - name: Connect
    description: Manage connected accounts (Express & Standard)
  - name: Coupons
  - name: Credit Notes
  - name: Customers
  - name: Entitlements
  - name: Events
  - name: Features
  - name: Invoices
  - 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
paths:
  /api/v1/addons:
    post:
      tags:
        - Add-ons
      summary: Create an add-on
      operationId: create_addon
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAddOnRequest'
        required: true
      responses:
        '201':
          description: Add-on created
          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'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    CreateAddOnRequest:
      type: object
      required:
        - name
        - product_id
        - price_id
      properties:
        description:
          type:
            - string
            - 'null'
        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
    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:
            - type: 'null'
            - $ref: '#/components/schemas/ProductFeeTypeEnum'
        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
    ProductId:
      type: string
      format: MeteroidId
      examples:
        - prd_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
    AddOnId:
      type: string
      format: MeteroidId
      examples:
        - add_7n42DGM5Tflk9n8mt7Fhc7
    ErrorCode:
      type: string
      enum:
        - BAD_REQUEST
        - NOT_FOUND
        - CONFLICT
        - FORBIDDEN
        - UNAUTHORIZED
        - 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'
      discriminator:
        propertyName: type
        mapping:
          BOOLEAN:
            $ref: '#/components/schemas/BooleanEntitlementValue'
          METERED:
            $ref: '#/components/schemas/MeteredEntitlementValue'
    BooleanEntitlementValue:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
    MeteredEntitlementValue:
      type: object
      properties:
        enabled:
          type: boolean
          description: Per-entitlement kill switch. `false` means disabled.
        limit:
          type:
            - string
            - 'null'
          format: decimal
          description: Cap on usage. Null means unlimited.
        reset_period:
          $ref: '#/components/schemas/ResetPeriod'
    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:
            $ref: '#/components/schemas/BillingCycleResetPeriod'
          CALENDAR:
            $ref: '#/components/schemas/CalendarResetPeriod'
          FIXED_WINDOW:
            $ref: '#/components/schemas/FixedWindowResetPeriod'
          NEVER:
            $ref: '#/components/schemas/NeverResetPeriod'
          SLIDING_WINDOW:
            $ref: '#/components/schemas/SlidingWindowResetPeriod'
    BillingCycleResetPeriod:
      type: object
      description: >-
        Resets each time your subscription renews — anchored to your 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
      properties:
        interval:
          type: integer
          format: int32
          minimum: 0
        unit:
          $ref: '#/components/schemas/CalendarUnit'
    FixedWindowResetPeriod:
      type: object
      description: >-
        Resets at regular intervals — anchored to your subscription's exact
        activation time.
      required:
        - unit
        - interval
      properties:
        interval:
          type: integer
          format: int32
          minimum: 0
        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.
      required:
        - unit
        - interval
      properties:
        interval:
          type: integer
          format: int32
          minimum: 0
        unit:
          $ref: '#/components/schemas/CalendarUnit'
    NeverResetPeriod:
      type: object
      description: Never resets — counts all usage since the subscription was activated.
    CalendarUnit:
      type: string
      enum:
        - HOUR
        - DAY
        - WEEK
        - MONTH
        - YEAR
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````