Pular para o conteúdo principal
POST
/
entitlements
JavaScript
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.create({
  integration_config: { permission: 'pull', target_id: 'target_id' },
  integration_type: 'discord',
  name: 'name',
});

console.log(entitlement.id);
{
  "business_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "integration_config": {
    "permission": "pull",
    "target_id": "<string>"
  },
  "integration_type": "discord",
  "is_active": true,
  "metadata": {},
  "name": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>"
}

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.

Autorizações

Authorization
string
header
obrigatório

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corpo

application/json
integration_config
Github Config · object
obrigatório

Platform-specific configuration (validated per integration_type)

integration_type
enum<string>
obrigatório

Which platform integration this entitlement uses

Opções disponíveis:
discord,
telegram,
github,
figma,
framer,
notion,
digital_files,
license_key
name
string
obrigatório

Display name for this entitlement

description
string | null

Optional description

metadata
object

Additional metadata for the entitlement

Resposta

Detailed view of a single entitlement: identity, integration type, integration-specific configuration, and metadata.

business_id
string
obrigatório

Identifier of the business that owns this entitlement.

created_at
string<date-time>
obrigatório

Timestamp when the entitlement was created.

id
string
obrigatório

Unique identifier of the entitlement.

integration_config
Github Config · object
obrigatório

Integration-specific configuration. For digital_files entitlements this includes presigned download URLs for each attached file.

integration_type
enum<string>
obrigatório

Platform integration this entitlement uses.

Opções disponíveis:
discord,
telegram,
github,
figma,
framer,
notion,
digital_files,
license_key
is_active
boolean
obrigatório

Always true for entitlements returned by the public API; soft-deleted entitlements are not returned.

metadata
object
obrigatório

Arbitrary key-value metadata supplied at creation or via PATCH.

name
string
obrigatório

Display name supplied at creation.

updated_at
string<date-time>
obrigatório

Timestamp when the entitlement was last modified.

description
string | null

Optional description supplied at creation.

Last modified on May 14, 2026