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

# Delete Entitlement

> Soft-delete an entitlement. Existing grants on the entitlement are unaffected.

<Warning>
  Deleting an entitlement is a **soft-delete that hides existing grants from the customer portal**. It does not revoke platform-side access:

  * Grants linked to the entitlement remain in the database and keep their current `status`.
  * Discord roles, GitHub collaborator access, Notion access, Telegram membership, license keys, and digital file URLs stay valid.
  * No `entitlement_grant.revoked` webhook is emitted, and `revoked_at` / `revocation_reason` are not set.

  Customers stop seeing these grants in their customer portal, but their access on the underlying platform continues until the subscription/payment lifecycle revokes it (cancellation, refund) or you revoke each grant manually via [`DELETE /entitlements/{id}/grants/{grant_id}`](/api-reference/entitlements/revoke-grant).

  If you need to fully cut off access, revoke the grants first, then delete the entitlement.
</Warning>


## OpenAPI

````yaml delete /entitlements/{id}
openapi: 3.1.0
info:
  title: public
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.102.0
servers:
  - url: https://test.dodopayments.com/
    description: Test Mode Server Host
  - url: https://live.dodopayments.com/
    description: Live Mode Server Host
security: []
tags:
  - name: Products
  - name: Payments
  - name: Subscriptions
  - name: Addons
  - name: Customers
  - name: Refunds
  - name: Disputes
  - name: Events
  - name: License Keys
  - name: Entitlements
  - name: Licenses
  - name: Discounts
  - name: Meters
  - name: Credit Entitlements
  - name: Credit Entitlement Balances
  - name: Outgoing Webhooks
  - name: Checkout
  - name: Webhook Events
paths:
  /entitlements/{id}:
    delete:
      tags:
        - Entitlements
      summary: DELETE /entitlements/{id} (soft-delete)
      operationId: delete_entitlement_public_handler
      parameters:
        - name: id
          in: path
          description: Entitlement ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Entitlement deactivated
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '500':
          description: Something went wrong
      security:
        - API_KEY: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import DodoPayments from 'dodopayments';

            const client = new DodoPayments({
              bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
            });

            await client.entitlements.delete('id');
        - lang: Python
          source: |-
            import os
            from dodopayments import DodoPayments

            client = DodoPayments(
                bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"),  # This is the default and can be omitted
            )
            client.entitlements.delete(
                "id",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/dodopayments/dodopayments-go\"\n\t\"github.com/dodopayments/dodopayments-go/option\"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken(\"My Bearer Token\"),\n\t)\n\terr := client.Entitlements.Delete(context.TODO(), \"id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: Java
          source: >-
            package com.dodopayments.api.example;


            import com.dodopayments.api.client.DodoPaymentsClient;

            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;

            import
            com.dodopayments.api.models.entitlements.EntitlementDeleteParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

                    client.entitlements().delete("id");
                }
            }
        - lang: Kotlin
          source: >-
            package com.dodopayments.api.example


            import com.dodopayments.api.client.DodoPaymentsClient

            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient

            import
            com.dodopayments.api.models.entitlements.EntitlementDeleteParams


            fun main() {
                val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

                client.entitlements().delete("id")
            }
        - lang: Ruby
          source: |-
            require "dodopayments"

            dodo_payments = Dodopayments::Client.new(
              bearer_token: "My Bearer Token",
              environment: "test_mode" # defaults to "live_mode"
            )

            result = dodo_payments.entitlements.delete("id")

            puts(result)
        - lang: PHP
          source: |-
            <?php

            require_once dirname(__DIR__) . '/vendor/autoload.php';

            use Dodopayments\Client;
            use Dodopayments\Core\Exceptions\APIException;

            $client = new Client(
              bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
              environment: 'test_mode',
            );

            try {
              $result = $client->entitlements->delete('id');

              var_dump($result);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using DodoPayments.Client;
            using DodoPayments.Client.Models.Entitlements;

            DodoPaymentsClient client = new();

            EntitlementDeleteParams parameters = new() { ID = "id" };

            await client.Entitlements.Delete(parameters);
components:
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````