Skip to main content
POST
/
tokens
/
embed
/
referrals
Python
from dub import Dub


with Dub(
    token="DUB_API_KEY",
) as d_client:

    res = d_client.embed_tokens.referrals(request={
        "partner": {
            "email": "Letha_Wuckert2@yahoo.com",
            "link_props": {
                "external_id": "123456",
                "tag_ids": [
                    "clux0rgak00011...",
                ],
                "test_variants": [
                    {
                        "url": "https://example.com/variant-1",
                        "percentage": 50,
                    },
                    {
                        "url": "https://example.com/variant-2",
                        "percentage": 50,
                    },
                ],
            },
        },
    })

    # Handle response
    print(res)
{
  "publicToken": "<string>",
  "expires": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://dub-partner-network.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Referrals embed token endpoint require an Advanced plan subscription or higher.

Authorizations

Authorization
string
header
required

Default authentication mechanism

Body

application/json
partnerId
string
tenantId
string
partner
object

Response

The created public embed token.

publicToken
string
required
expires
string
required