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

# Update Entitlement

> Update an entitlement's name, description, integration configuration, or metadata.



## OpenAPI

````yaml patch /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.105.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}:
    patch:
      tags:
        - Entitlements
      summary: PATCH /entitlements/{id}
      operationId: patch_entitlement_public_handler
      parameters:
        - name: id
          in: path
          description: Entitlement ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchEntitlementRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntitlementResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '422':
          description: Invalid request
        '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
            });

            const entitlement = await client.entitlements.update('id');

            console.log(entitlement.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
            )
            entitlement = client.entitlements.update(
                id="id",
            )
            print(entitlement.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\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\tentitlement, err := client.Entitlements.Update(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tdodopayments.EntitlementUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", entitlement.ID)\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.Entitlement;

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


            public final class Main {
                private Main() {}

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

                    Entitlement entitlement = client.entitlements().update("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.Entitlement

            import
            com.dodopayments.api.models.entitlements.EntitlementUpdateParams


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

                val entitlement: Entitlement = client.entitlements().update("id")
            }
        - lang: Ruby
          source: |-
            require "dodopayments"

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

            entitlement = dodo_payments.entitlements.update("id")

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

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

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

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

            try {
              $entitlement = $client->entitlements->update(
                'id',
                description: 'description',
                integrationConfig: [
                  'permission' => GitHubPermission::PULL, 'targetID' => 'target_id'
                ],
                metadata: ['foo' => 'string'],
                name: 'name',
              );

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

            DodoPaymentsClient client = new();

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

            var entitlement = await client.Entitlements.Update(parameters);

            Console.WriteLine(entitlement);
components:
  schemas:
    PatchEntitlementRequest:
      type: object
      properties:
        description:
          type:
            - string
            - 'null'
        integration_config:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/IntegrationConfig'
        metadata:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Metadata'
        name:
          type:
            - string
            - 'null'
    EntitlementResponse:
      type: object
      description: |-
        Detailed view of a single entitlement: identity, integration type,
        integration-specific configuration, and metadata.
      required:
        - id
        - business_id
        - integration_type
        - name
        - integration_config
        - is_active
        - metadata
        - created_at
        - updated_at
      properties:
        business_id:
          type: string
          description: Identifier of the business that owns this entitlement.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the entitlement was created.
        description:
          type:
            - string
            - 'null'
          description: Optional description supplied at creation.
        id:
          type: string
          description: Unique identifier of the entitlement.
        integration_config:
          $ref: '#/components/schemas/IntegrationConfigResponse'
          description: |-
            Integration-specific configuration. For `digital_files` entitlements
            this includes presigned download URLs for each attached file.
        integration_type:
          $ref: '#/components/schemas/EntitlementIntegrationType'
          description: Platform integration this entitlement uses.
        is_active:
          type: boolean
          description: |-
            Always `true` for entitlements returned by the public API;
            soft-deleted entitlements are not returned.
        metadata:
          $ref: '#/components/schemas/Metadata'
          description: Arbitrary key-value metadata supplied at creation or via PATCH.
        name:
          type: string
          description: Display name supplied at creation.
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the entitlement was last modified.
    IntegrationConfig:
      oneOf:
        - type: object
          title: Github Config
          required:
            - target_id
            - permission
          properties:
            permission:
              $ref: '#/components/schemas/GithubPermission'
              description: Permission to grant on the repository.
            target_id:
              type: string
              description: Repository or organisation slug to grant access to.
        - type: object
          title: Discord Config
          required:
            - guild_id
          properties:
            guild_id:
              type: string
              description: Discord guild (server) ID.
            role_id:
              type:
                - string
                - 'null'
              description: Optional Discord role to assign within the guild.
        - type: object
          title: Telegram Config
          required:
            - chat_id
          properties:
            chat_id:
              type: string
              description: >-
                Telegram chat ID. For groups this is typically a negative
                integer.
        - type: object
          title: Figma Config
          required:
            - figma_file_id
          properties:
            figma_file_id:
              type: string
              description: Figma file identifier to grant access to.
        - type: object
          title: Framer Config
          required:
            - framer_template_id
          properties:
            framer_template_id:
              type: string
              description: Framer template identifier to grant access to.
        - type: object
          title: Notion Config
          required:
            - notion_template_id
          properties:
            notion_template_id:
              type: string
              description: Notion template identifier to grant access to.
        - type: object
          title: Digital Files Config
          required:
            - digital_file_ids
          properties:
            digital_file_ids:
              type: array
              items:
                type: string
              description: |-
                Files attached to this entitlement. Add files via
                `POST /entitlements/{id}/files` and remove them via
                `DELETE /entitlements/{id}/files/{file_id}`.
            external_url:
              type:
                - string
                - 'null'
              description: Optional external URL shown to the customer alongside the files.
            instructions:
              type:
                - string
                - 'null'
              description: >-
                Optional human-readable delivery instructions shown to the
                customer

                alongside the files.
            legacy_file_ids:
              type:
                - array
                - 'null'
              items:
                type: string
              description: |-
                Three-way patchable list of legacy file identifiers:

                * omitted → preserve the current value
                * `null`  → clear
                * `[...]` → replace

                On create, an omitted field, an explicit `null`, or an empty
                array all result in no legacy files attached.
        - type: object
          title: License Key Config
          properties:
            activation_message:
              type:
                - string
                - 'null'
              description: |-
                Optional message displayed when a customer activates the license
                key (≤ 2500 characters).
            activations_limit:
              type:
                - integer
                - 'null'
              format: int32
              description: >-
                Maximum activations allowed per issued license key. Omit for
                unlimited.
            duration_count:
              type:
                - integer
                - 'null'
              format: int32
              description: |-
                Validity duration of issued license keys. Provide both
                `duration_count` and `duration_interval` together for a fixed
                duration; omit both for non-expiring keys.
            duration_interval:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/TimeInterval'
                  description: Unit of `duration_count`.
            fulfillment_mode:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/FulfillmentMode'
                  description: >-
                    How license keys are fulfilled. `auto` (default) generates
                    and delivers

                    keys to customers automatically; `manual` creates pending
                    grants that you

                    fulfill with the supplied key via `POST
                    /grants/{grant_id}/license-key`.
      description: |-
        Integration-specific configuration supplied when creating or updating
        an entitlement. The shape required matches the entitlement's
        `integration_type`.
    Metadata:
      type: object
      additionalProperties:
        type: string
      propertyNames:
        type: string
    IntegrationConfigResponse:
      oneOf:
        - type: object
          title: Github Config
          required:
            - target_id
            - permission
          properties:
            permission:
              $ref: '#/components/schemas/GithubPermission'
              description: Permission to grant on the repository.
            target_id:
              type: string
              description: Repository or organisation slug to grant access to.
        - type: object
          title: Discord Config
          required:
            - guild_id
          properties:
            guild_id:
              type: string
              description: Discord guild (server) ID.
            role_id:
              type:
                - string
                - 'null'
              description: Optional Discord role to assign within the guild.
        - type: object
          title: Telegram Config
          required:
            - chat_id
          properties:
            chat_id:
              type: string
              description: >-
                Telegram chat ID. For groups this is typically a negative
                integer.
        - type: object
          title: Figma Config
          required:
            - figma_file_id
          properties:
            figma_file_id:
              type: string
              description: Figma file identifier to grant access to.
        - type: object
          title: Framer Config
          required:
            - framer_template_id
          properties:
            framer_template_id:
              type: string
              description: Framer template identifier to grant access to.
        - type: object
          title: Notion Config
          required:
            - notion_template_id
          properties:
            notion_template_id:
              type: string
              description: Notion template identifier to grant access to.
        - type: object
          title: Digital Files Config
          required:
            - digital_files
          properties:
            digital_files:
              $ref: '#/components/schemas/ResolvedDigitalFiles'
              description: |-
                Populated digital-files payload with each file's metadata and a
                short-lived presigned download URL.
        - type: object
          title: License Key Config
          properties:
            activation_message:
              type:
                - string
                - 'null'
              description: |-
                Optional message displayed when a customer activates the license
                key (≤ 2500 characters).
            activations_limit:
              type:
                - integer
                - 'null'
              format: int32
              description: >-
                Maximum activations allowed per issued license key. Omit for
                unlimited.
            duration_count:
              type:
                - integer
                - 'null'
              format: int32
              description: |-
                Validity duration of issued license keys. Provide both
                `duration_count` and `duration_interval` together for a fixed
                duration; omit both for non-expiring keys.
            duration_interval:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/TimeInterval'
                  description: Unit of `duration_count`.
            fulfillment_mode:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/FulfillmentMode'
                  description: >-
                    How license keys are fulfilled. `auto` (default) generates
                    and delivers

                    keys to customers automatically; `manual` creates pending
                    grants that you

                    fulfill with the supplied key via `POST
                    /grants/{grant_id}/license-key`.
      description: |-
        Integration-specific configuration on an entitlement read response.

        For `digital_files` entitlements the response includes presigned
        download URLs for each attached file; other integrations match the
        shape supplied at creation.
    EntitlementIntegrationType:
      type: string
      enum:
        - discord
        - telegram
        - github
        - figma
        - framer
        - notion
        - digital_files
        - license_key
    GithubPermission:
      type: string
      description: Repository permission to grant on a `github` entitlement.
      enum:
        - pull
        - push
        - admin
        - maintain
        - triage
    TimeInterval:
      type: string
      enum:
        - Day
        - Week
        - Month
        - Year
    FulfillmentMode:
      type: string
      description: How license keys for this entitlement are fulfilled.
      enum:
        - auto
        - manual
    ResolvedDigitalFiles:
      type: object
      description: |-
        Populated digital-files payload on entitlement read responses. Each file
        carries a short-lived presigned download URL.
      required:
        - files
      properties:
        external_url:
          type:
            - string
            - 'null'
          description: |-
            Optional external URL, passed through from the entitlement
            configuration.
        files:
          type: array
          items:
            $ref: '#/components/schemas/ResolvedDigitalFile'
          description: One entry per attached file.
        instructions:
          type:
            - string
            - 'null'
          description: |-
            Optional human-readable delivery instructions, passed through from
            the entitlement configuration.
    ResolvedDigitalFile:
      type: object
      description: One file in a resolved digital-files payload.
      required:
        - file_id
        - download_url
        - filename
        - expires_in
      properties:
        content_type:
          type:
            - string
            - 'null'
          description: Optional content-type declared at upload.
        download_url:
          type: string
          description: Short-lived presigned URL for downloading the file.
        expires_in:
          type: integer
          format: int64
          description: Seconds until `download_url` expires.
        file_id:
          type: string
          description: Identifier of the attached file.
        file_size:
          type:
            - integer
            - 'null'
          format: int64
          description: Optional size of the file in bytes.
        filename:
          type: string
          description: Original filename of the attached file.
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````