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

# Delete a feature privilege

> Removes a specific privilege from a feature definition. This is a destructive operation that affects all plans and subscriptions using this feature - the privilege and any values assigned to it will be permanently removed from all entitlements. Use this when a privilege is no longer needed or was created in error.



## OpenAPI

````yaml /api-reference/ubb_openapi_inline.json delete /features/{feature_code}/privileges/{privilege_code}
openapi: 3.0.1
info:
  title: Usage Based Billing API
  version: 1.0.0
  description: An Orchestrator for Usage Based Billing and Payments
servers:
  - url: https://api-m.sandbox.paypal.com/v1/commerce/billing
security:
  - BearerAuth:
      - read
      - write
tags:
  - name: Alerts
    description: API endpoints for managing subscription alerts
  - name: Events
    description: API endpoints for managing events
  - name: Metrics
    description: API endpoints for metrics and usage data
  - name: Merchant Activation
    description: API endpoint for merchant activation
  - name: Credit Notes
    description: API endpoints for credit notes management
  - name: Customers
    description: API endpoints for customer management
  - name: Invoices
    description: API endpoints for invoice management
  - name: Plans
    description: API endpoints for subscription plans
  - name: Subscriptions
    description: API endpoints for subscriptions
  - name: Wallets
    description: API endpoints for wallet management
  - name: Taxes
    description: API endpoints for tax management
  - name: Billing Entities
    description: API endpoints for billing entities
  - name: Features
    description: API endpoints for managing features and privileges
  - name: Entitlements
    description: API endpoints for managing plan and subscription entitlements
paths:
  /features/{feature_code}/privileges/{privilege_code}:
    delete:
      tags:
        - Features
      summary: Delete a feature privilege
      description: >-
        Removes a specific privilege from a feature definition. This is a
        destructive operation that affects all plans and subscriptions using
        this feature - the privilege and any values assigned to it will be
        permanently removed from all entitlements. Use this when a privilege is
        no longer needed or was created in error.
      operationId: DeleteFeaturePrivilege
      parameters:
        - name: feature_code
          in: path
          required: true
          description: >-
            The unique identifier code of the feature containing the privilege
            to be deleted
          schema:
            type: string
        - name: privilege_code
          in: path
          required: true
          description: >-
            The unique identifier code of the privilege to be removed from the
            feature. This must match an existing privilege code within the
            specified feature.
          schema:
            type: string
      responses:
        '204':
          description: >-
            Privilege was successfully removed from the feature and all
            associated entitlements
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    NotFound:
      description: Resource Not Found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        Conflict - The request could not be completed due to a conflict with the
        current state of the resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            name: UNPROCESSABLE_ENTITY
            message: >-
              The requested action could not be performed, semantically
              incorrect, or failed business validation.
            debug_id: 90957fca61718
            details:
              - field: transaction_id
                issue: RESOURCE_ALREADY_EXISTS
                description: The resource identified by `field` already exists.
    InternalServerError:
      description: Internal Server Error - An unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            name: INTERNAL_SERVER_ERROR
            message: An internal server error has occurred.
            debug_id: 90957fca61718
  schemas:
    Error:
      type: object
      properties:
        name:
          type: string
        debug_id:
          type: string
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
        value:
          type: string
        location:
          type: string
        issue:
          type: string
        description:
          type: string
  securitySchemes:
    BearerAuth:
      type: oauth2
      description: >-
        Use the /v1/oauth2/token endpoint to obtain an access token and pass it
        as a Bearer token in the Authorization header.
      flows:
        clientCredentials:
          tokenUrl: https://api-m.sandbox.paypal.com/v1/oauth2/token
          scopes:
            read: Read access
            write: Write access

````