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

# Delete a privilege. Deleting a privilege removes it from all plans and subscriptions.

> Delete privilege from feature. Deleting a privilege removes it from all plans and subscriptions.



## OpenAPI

````yaml /nozle-openapi.yaml delete /features/{code}/privileges/{privilege_code}
openapi: 3.1.0
info:
  title: Nozle Billing API
  description: >-
    Nozle Billing API allows your application to push customer information and
    metrics (events) from your application to the billing engine.
  version: 1.49.0
  license:
    name: AGPLv3
    url: https://github.com/nozle-dev/core/blob/main/LICENSE
  contact:
    email: support@nozle.app
servers:
  - url: https://core.nozle.app/api/v1
    description: Nozle Billing API
security:
  - bearerAuth: []
tags:
  - name: Activity Logs
    description: Everything about Activity logs
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Analytics
    description: Everything about Analytics
  - name: API Logs
    description: Everything about API logs
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Features
    description: Everything about Feature collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Entitlements
    description: Everything about Entitlement collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Billing Entities
    description: Everything about Billing Entities
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Customers
    description: Everything about Customer collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Plans
    description: Everything about Plan collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Subscriptions
    description: Everything about Subscription collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Events
    description: Everything about Event collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Organizations
    description: Everything about Organization collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Taxes
    description: Everything about Tax collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Coupons
    description: Everything about Coupon collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Add-ons
    description: Everything about Add-on collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Fees
    description: Everything about Fees
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Invoices
    description: Everything about Invoice collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Wallets
    description: Everything about Wallet collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Credit Notes
    description: Everything about Credit notes collection
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Webhooks
    description: Everything about Webhooks
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Webhook Endpoints
    description: Everything about Webhook Endpoints
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Payment Receipts
    description: Everything about Payment receipts
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Payment Requests
    description: Everything about PaymentRequests
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Payments
    description: Everything about Payments
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
  - name: Payment Methods
    description: Everything about Payment Methods
    externalDocs:
      description: Find out more
      url: https://docs.nozle.app/api-reference
externalDocs:
  description: Nozle Github
  url: https://github.com/nozle-dev
paths:
  /features/{code}/privileges/{privilege_code}:
    parameters:
      - name: code
        in: path
        description: Code of the existing feature.
        required: true
        schema:
          type: string
          example: seats
      - name: privilege_code
        in: path
        description: Code of the existing privilege.
        required: true
        schema:
          type: string
          example: max_admins
    delete:
      tags:
        - Features
      summary: >-
        Delete a privilege. Deleting a privilege removes it from all plans and
        subscriptions.
      description: >-
        Delete privilege from feature. Deleting a privilege removes it from all
        plans and subscriptions.
      operationId: deleteFeaturePrivilege
      responses:
        '200':
          description: Feature with deleted privilege.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Feature:
      type: object
      required:
        - feature
      properties:
        feature:
          $ref: '#/components/schemas/FeatureObject'
    FeatureObject:
      type: object
      required:
        - lago_id
        - code
        - name
        - feature_type
        - created_at
      properties:
        lago_id:
          type: string
          format: uuid
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
          description: Unique identifier of the Feature created by Nozle.
        code:
          type: string
          example: seats
          description: Immutable code used for entitlement checks and metered events.
        name:
          type: string
          example: Number of seats
          description: Name of the feature. Max 255 characters.
        description:
          type:
            - string
            - 'null'
          example: Number of users of the account
          description: Description of the feature. Max 600 characters.
        feature_type:
          type: string
          enum:
            - boolean
            - config
            - metered
          example: metered
          description: >-
            Determines which Feature configuration is active. Immutable after
            creation.
        privileges:
          type: array
          items:
            $ref: '#/components/schemas/FeaturePrivilegeObject'
          example:
            - code: max
              name: Maximum
              value_type: integer
              config: {}
            - code: max_admins
              name: Max Admins
              value_type: integer
              config: {}
            - code: root
              name: Allow root user
              value_type: boolean
              config: {}
            - code: provider
              name: SSO Provider
              value_type: select
              config:
                select_options:
                  - google
                  - okta
          description: >-
            Privileges for boolean and config Features. Config Features require
            at least one.
        aggregation_type:
          type:
            - string
            - 'null'
          enum:
            - count_agg
            - sum_agg
            - max_agg
            - unique_count_agg
            - weighted_sum_agg
            - latest_agg
            - custom_agg
            - null
          example: sum_agg
          description: Aggregation method for a metered Feature.
        consumable:
          type:
            - boolean
            - 'null'
          example: true
          description: >-
            Whether metered usage consumes an allowance or Credit System
            balance.
        recurring:
          type:
            - boolean
            - 'null'
          example: false
          description: Whether accumulated usage carries into the next billing period.
        field_name:
          type:
            - string
            - 'null'
          example: tokens
          description: Event property aggregated by the metered Feature.
        expression:
          type:
            - string
            - 'null'
          example: round((ended_at - started_at) * units)
        custom_aggregator:
          type:
            - string
            - 'null'
          description: >-
            Custom aggregation implementation when aggregation_type is
            custom_agg.
        weighted_interval:
          type:
            - string
            - 'null'
          enum:
            - seconds
            - null
        rounding_function:
          type:
            - string
            - 'null'
          enum:
            - ceil
            - floor
            - round
            - null
        rounding_precision:
          type:
            - integer
            - 'null'
          example: 2
        filters:
          type: array
          items:
            $ref: '#/components/schemas/FeatureFilterObject'
        created_at:
          type: string
          format: date-time
          example: '2025-07-17T12:34:35Z'
          description: Creation date of the feature.
    ApiErrorUnauthorized:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: integer
          format: int32
          example: 401
        error:
          type: string
          example: Unauthorized
    ApiErrorNotFound:
      type: object
      required:
        - status
        - error
        - code
      properties:
        status:
          type: integer
          format: int32
          example: 404
        error:
          type: string
          example: Not Found
        code:
          type: string
          example: object_not_found
    FeaturePrivilegeObject:
      type: object
      required:
        - code
        - name
        - value_type
        - config
      properties:
        code:
          type: string
          example: max
          description: Unique code for the privilege.
        name:
          type:
            - string
            - 'null'
          example: Maximum
          description: Display name for the privilege.
        value_type:
          type: string
          enum:
            - integer
            - boolean
            - string
            - select
          example: integer
          description: 'Data type of the privilege value. Default: string'
        config:
          type: object
          properties:
            select_options:
              type: array
              items:
                type: string
              example:
                - google
                - okta
              description: Array of string, required only when value_type is `select`.
    FeatureFilterObject:
      type: object
      description: Values used to segment metered Feature events.
      required:
        - key
        - values
      properties:
        key:
          type: string
          example: region
        values:
          type: array
          items:
            type: string
          example:
            - us-east-1
  responses:
    Unauthorized:
      description: Unauthorized error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorUnauthorized'
    NotFound:
      description: Not Found error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorNotFound'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````