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

# List Entitlements

> List all entitlements for your business with optional filtering by integration type.



## OpenAPI

````yaml get /entitlements
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:
    get:
      tags:
        - Entitlements
      summary: GET /entitlements
      operationId: list_entitlements_public_handler
      parameters:
        - name: page_size
          in: query
          description: Page size (default 10, max 100)
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
          style: form
        - name: page_number
          in: query
          description: Page number (default 0)
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
          style: form
        - name: integration_type
          in: query
          description: Filter by integration type
          required: false
          schema:
            type: string
            enum:
              - discord
              - telegram
              - github
              - figma
              - framer
              - notion
              - digital_files
              - license_key
          style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEntitlementsResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Validation error
        '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
            });

            // Automatically fetches more pages as needed.
            for await (const entitlement of client.entitlements.list()) {
              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
            )
            page = client.entitlements.list()
            page = page.items[0]
            print(page.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\tpage, err := client.Entitlements.List(context.TODO(), dodopayments.EntitlementListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\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.EntitlementListPage;

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


            public final class Main {
                private Main() {}

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

                    EntitlementListPage page = client.entitlements().list();
                }
            }
        - 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.EntitlementListPage

            import
            com.dodopayments.api.models.entitlements.EntitlementListParams


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

                val page: EntitlementListPage = client.entitlements().list()
            }
        - lang: Ruby
          source: |-
            require "dodopayments"

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

            page = dodo_payments.entitlements.list

            puts(page)
        - 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 {
              $page = $client->entitlements->list(
                integrationType: 'discord', pageNumber: 0, pageSize: 0
              );

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

            DodoPaymentsClient client = new();

            EntitlementListParams parameters = new();

            var page = await client.Entitlements.List(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
components:
  schemas:
    ListEntitlementsResponse:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/EntitlementResponse'
    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.
    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: >-
                    Fulfillment mode:


                    `auto` (default) generate and delivery license keys to
                    customers automatically.

                    `manual` creates pending grants, actual key is provided via
                    the fulfillment

                    API and delivered to the customer when fulfilled.
      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
    Metadata:
      type: object
      additionalProperties:
        type: string
      propertyNames:
        type: string
    GithubPermission:
      type: string
      description: Repository permission to grant on a `github` entitlement.
      enum:
        - pull
        - push
        - admin
        - maintain
        - triage
    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.
    TimeInterval:
      type: string
      enum:
        - Day
        - Week
        - Month
        - Year
    FulfillmentMode:
      type: string
      description: How license keys for this entitlement are fulfilled.
      enum:
        - auto
        - manual
    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

````