An open source Dub MCP server and shared CLI with 61 tools and exact reviewed link workflows.
Key takeaways
This free Dub MCP server and CLI gives your AI real access to current short links, eligible analytics, conversion and partner workflows. Manage only requested workspace work, review exact ordered link tasks and save requested private QR/embed output.
It's one install with 2 ways in. Claude, Codex, Cursor or any other MCP app calls its 61 tools for you, and the same tools work as a CLI that agents like Claude Code, Codex and OpenCode run, or that you type yourself.
Here's what the Dub MCP server and CLI is, how to set it up in each app, and every tool it has.
What is the Dub MCP server & CLI?
The Dub MCP server & CLI is a free, open source program that lets AI agents read and change requested Dub link and partner data with explicit approval for you, in 2 ways. The MCP server is what an AI app like Claude, Codex or Cursor connects to, through MCP (Model Context Protocol), the open standard AI apps use to call outside tools.
You ask in plain language. Your AI picks the right tool, and the server makes the call to the fixed Dub REST API origin using the selected private workspace key.
The CLI is the same program as commands. dub-cli list-links runs the same code your AI runs when you deliberately read the intended workspace page, whether an agent like Claude Code runs it or you do.
What can you ask it?
Once it's set up, you ask the way you'd ask an assistant. These are real prompts it handles:
Try askingFind these workspace links and inspect one exact ID.
Create only the slug/destination I approve.
Review this ordered link/tag work and show its exact approval hash.
Submit only that matching approved batch.
Read the requested partner application and eligible analytics.
Save this QR or temporary embed credential into a new private file.
Dub already offers official hosted Links/Partners MCPs, an official task CLI, native bulk operations and scoped/read-only workspace keys. This owned companion adds verified shared local policy, exact ordered request review and private generated-credential delivery; current alternatives are compared below.
How to install the Dub MCP server
Choose the shared task CLI, local stdio MCP or versioned desktop bundle in the existing controls. Codex comes first, with full client/OS setup below.
Watch out: Installation does not grant provider access. Never change links, register domains or financial records merely to test setup.
Set up Dub access
Private workspace access
- Sign into the intended Dub workspace. Open Settings → API Keys / tokens. Verify the workspace before copying a key.
- Create only the needed all-access, read-only or restricted link/analytics/domain/tag permissions. REST keys are workspace-specific; native read-only and workspace isolation already exist in Dub.
- Store the key outside repositories as DUB_API_KEY in private user settings or DUB_TOKEN_FILE pointing to an absolute token-only file. On macOS/Linux use a private 0700 directory and 0600 regular non-symlink file, at most 64 KiB. On Windows restrict ACLs to yourself; POSIX mode checks do not verify ACLs.
- Run dub-cli doctor for local settings. Deliberately run doctor --network for one GET /links?pageSize=1; it reports the returned count without echoing the link. This proves that read, not workspace ownership or every permission.
- Discover actual link IDs and fields, review the requested change, and approve only that operation or matching reviewed batch. Do not delete links, register domains, track sales or change financial records just to test installation.
REST keys are sent only to https://api.dub.co as Authorization: Bearer. The official hosted MCP accepts OAuth or the documented Mcp-Dub-Token header; do not substitute that header for REST Bearer. Official dub CLI OAuth uses its own private session and scopes. This wrapper never imports those sessions, starts OAuth, loads .env, purchases access or saves a key through login. login prints private setup instructions only.
DUB_ACCOUNTS is a private array of unique {name,api_key,token_file} profiles. A token file overrides only that selected profile's key and caches until process restart. Profiles never fall back to DUB_API_KEY or another account when credentials are missing. Labels do not verify provider ownership. A tenantId filter is customer segmentation within a workspace, not another workspace's authentication.
Plans, quotas and provider effects
The AGPL wrapper is free. Dub subscription limits, partner-program eligibility, domain-registration charges, conversions and financial actions remain provider costs and permissions. Check current plans and API limits.
Documented standard per-key limits are Free 60/minute, Pro 600/minute, Business 1200/minute and Advanced 3000/minute; Enterprise is custom. Analytics/events additionally list Free unavailable, Pro two requests/second, Business four/second and Advanced eight/second. Successful installation does not unlock paid analytics. The default 1100 ms process-wide request-start spacing is conservative for one Free key; other processes/apps share its quota. It is not a guaranteed limiter for all plans or concurrent clients.
No request automatically retries, including 429, redirects, timeouts or 5xx. Respect Retry-After before deliberately repeating a read. Inspect actual provider state before repeating an unknown mutation. Requests are capped at 1 MiB and responses at 5 MiB. Each explicit list call reads one native page: links/customers/commissions support mutually exclusive startingAfter/endingBefore cursors; other families use their documented page/pageSize or limit. Deprecated page parameters remain marked, cannot be mixed with cursors, and require positive integers. There is no invented all_pages option or complete-backup claim.
Native bulk link creation/update/deletion already supports up to 100 items. Bulk create omits custom previews and webhook events, and HTTP 200 can mix successful links with per-link errors. The local reviewed batch is a separate ordered one-to-twenty link/tag/folder workflow, with all payloads checked and exact approval hash before first request. A bulk task can still affect up to 100 records; twenty tasks is not a twenty-record budget.
Domain deletion is irreversible and deletes its links. Partner ban cancels commissions and deletes links; financial changes and customer deletion need explicit user intent. create_commission can return HTTP 202 with a task receipt: acceptance is not completed financial work. Tracking events can affect analytics and commissions. No payout execution endpoint is invented.
Rotation and revocation
Revoke the intended key in the correct workspace, replace private settings/files and restart every process. Native key/user role changes apply at the provider; machine-user keys share their owner's permissions and deleting a machine user revokes its keys. Do not create a machine user merely to test this package. Revoke official OAuth integrations separately. Removing npm/client entries does not revoke keys, undo links/events/commissions, refund a registered domain or remove saved private output files.
Check that it works
Start with local discovery/settings, then deliberately opt into one links read.
dub-cli --version
dub-cli doctor
dub-cli list-accounts --agent
dub-cli doctor --networkdub-cli --version
dub-cli tools
dub-cli list-accounts --agent
dub-cli doctor
dub-cli doctor --network
dub-cli list-links --page-size 1 --account work --agentLocal doctor reports profile count/default/policy without loading credentials or claiming authentication. --network opts into exactly one read, with count only. Actual account role/ownership, analytics plan, every endpoint and writes remain separate checks. Never use a destructive or paid call as an install test.
Use the Dub CLI
The CLI is the same 61 tools as commands. AI agents that run commands, like Claude Code, Codex and OpenCode, use it on their own, and you can type the same commands in a terminal or a script.
Every tool name becomes a command with dashes, so list_links runs as dub-cli list-links.
dub-cli tools
dub-cli list-links --help
dub-cli schema create-link
dub-cli list-links --page-size 5 --account work --agent
dub-cli get-link --link-id YOUR_LINK_ID --account work --agentThe bare dub-cli lists every command, and dub-cli <command> --help shows what a command takes. All 39 mutations/private-output writes require --confirm. --agent/--yes never approve work. Repeat --tasks with individual JSON objects; native array bodies can use an absolute private payload_file.
These flags work on every command:
| Flag | What it does |
|---|---|
| --agent | Compact JSON; never approval |
| --select a,b.c | Local result field selection |
| --confirm | Only the requested mutation/file write |
| --account NAME | Exact private workspace profile |
| --payload-file PATH | Complete native JSON body, regular non-symlink file up to 1 MiB |
| --tasks JSON | Repeat once per ordered task object |
| --review-sha256 SHA256 | Matching local batch review hash |
| --output-file PATH | Required new exclusive private QR/embed file |
A script can branch on the exit code:
| Exit code | What it means |
|---|---|
| 0 | It worked |
| 2 | The command was typed wrong, or a write needed --confirm |
| 3 | It wasn't found |
| 4 | Dub rejected the credentials |
| 5 | Dub's API failed |
| 7 | You hit a rate limit, so wait and try again |
| 10 | Nothing is set up yet |
MCP server or CLI: which one?
Both surfaces call the same tools. Codex can connect to the local MCP server or run the CLI directly. Neither requires Claude Code.
MCP provides structured tool discovery; the CLI supports scripts, compact JSON, field selection and command/schema discovery. Official hosted MCP connection and local CLI authentication have different setup requirements.
Codex-specific token measurements are pending. Record the actual client/model versions, discovery configuration, input/output usage, caching, latency and equivalent successful outcomes. Standing definitions and full task cost are separate measurements; CLI commands, selected help, results and reasoning still consume tokens.
No efficiency percentage or Claude-derived figure is presented as a Codex result. Other-client benchmarks can be added separately.
Link and partner workflows
Inspect and approve the intended link
Use list_links and get_link with a real link_id, external_id or domain plus key. API external-ID queries require the documented ext_ prefix. Existing get_link_stats now reaches the current analytics endpoint, with event/group/filter/date fields; it does not imply analytics is on the Free plan. Use schema/help to inspect native UTM, conversion tracking, expiration, tags/folders, A/B variants and platform redirect fields before submitting.
create_link/upsert_link require url; update_link must include an actual change. PATCH semantics follow the provider, not a recursive merge invented by this package. A/B/native nested constraints come from the pinned current schema. Native bulk create accepts an array, bulk update a data object, and bulk delete comma-separated linkIds. No bulk custom previews or webhook events are invented.
Partners, applications and financial work
Current list_program_applications/approve_program_application/reject_program_application use /program-applications. The older published SDK snapshot uses /partners/applications; do not assume aliases. Read the requested application/partner before approving or rejecting. Ban/delete actions can cancel commissions or remove links; confirmation must match the user's intended scope.
create_commission accepts the documented discriminated custom/lead/sale bodies and may return an asynchronous task receipt. bulk_update_commissions only accepts its native pending/refunded/duplicate/canceled/fraud statuses; do not fabricate an approved/paid status. list_payouts reads provider records; no payout transfer endpoint exists here. Events/conversions can affect business metrics and affiliate commissions, so they require the same explicit guard as other POSTs. No polling, financial completion, refunds or unrelated messages occur implicitly.
Requested private QR and embed output
dub-cli get-qr-code --url https://example.com/requested --output-file /absolute/private/requested.png --confirm --agent
dub-cli create-referrals-embed-token --payload '{"partnerId":"YOUR_PARTNER_ID"}' --output-file /absolute/private/referral-token.json --confirm --agentReserve a new exclusive private file before the provider request; existing files refuse without a request. QR requires the PNG signature/content type. Embed JSON contains publicToken and expires only in that file; a publicToken is still an access credential despite its name. No PNG base64/key appears in model output and no automatic upload/browser preview occurs. Keep its parent directory private and restrict Windows ACLs. Invalid/error responses remove only this newly reserved file; provider token creation can still have an unknown outcome.
Exact reviewed batches and pagination
Review an exact ordered batch
dub-cli preview-link-batch --tasks '{"tool":"create_link","arguments":{"payload":{"url":"https://example.com/a","key":"approved-a"}}}' --tasks '{"tool":"create_tag","arguments":{"name":"Approved campaign"}}' --account work --agent
dub-cli submit-link-batch --tasks '{"tool":"create_link","arguments":{"payload":{"url":"https://example.com/a","key":"approved-a"}}}' --tasks '{"tool":"create_tag","arguments":{"name":"Approved campaign"}}' --account work --review-sha256 YOUR_REVIEW_SHA256 --confirm --agentPreview validates all one-to-twenty link/tag/folder operations locally without loading a key or contacting Dub. SHA-256 binds canonical native requests, ordered tasks, selected profile label and sanitized schema snapshot. Changed task/order/profile/schema refuses before the first mutation. Canonical key order does not change the hash. Nested account/confirm/file overrides are refused; batch bodies are inline, so mutable payload files cannot change after review.
The hash does not prove the key's owner, bind a key replaced behind the same label, lock changing provider state, reserve quota or certify human approval. No automatic reads or provider-state comparisons are added. Execution sends sequentially, stops on first HTTP/network/validation failure or native bulk-create per-link errors, and returns known receipts, failed index and unattempted indices. A native partial bulk receipt can include both successes and errors at the failed index. No rollback, replay, automatic continuation or implicit cleanup occurs. Native bulk remains up to 100 records per task.
Native pagination is explicit
list_links/list_customers/list_commissions use starting_after or ending_before with page_size; other list operations expose their own page/page_size or limit controls. Preserve original filters/date/sort and exact native cursor from the provider when deliberately continuing. Mutually exclusive cursors and cursor/page mixing refuse. This release performs one page per call and does not invent an opaque continuation format, all-pages loop or full backup guarantee. Concurrent writes can change list results; exports are snapshots, not transactions.
Every Dub tool
Actual discovery exposes 61 tools: 22 reads/helpers and 39 confirmed operations. Fifty-seven current native routes and four local workflow helpers share handlers. Every native input/argument follows below. Eleven legacy names remain; unsupported get_workspace is removed.
Links
create_link- What it does
- Create a link for the authenticated workspace.
- Kind
- Confirmed operation
list_links- What it does
- Retrieve a paginated list of links for the authenticated workspace.
- Kind
- Read/helper
get_links_count- What it does
- Retrieve the number of links for the authenticated workspace.
- Kind
- Read/helper
get_link- What it does
- Retrieve the info for a link.
- Kind
- Read/helper
update_link- What it does
- Update a link for the authenticated workspace.
- Kind
- Confirmed operation
delete_link- What it does
- Delete a link for the authenticated workspace.
- Kind
- Confirmed operation
bulk_create_links- What it does
- Bulk create up to 100 links for the authenticated workspace.
- Kind
- Confirmed operation
bulk_update_links- What it does
- Bulk update up to 100 links with the same data for the authenticated workspace.
- Kind
- Confirmed operation
bulk_delete_links- What it does
- Bulk delete up to 100 links for the authenticated workspace.
- Kind
- Confirmed operation
upsert_link- What it does
- Upsert a link for the authenticated workspace by its URL.
- Kind
- Confirmed operation
Analytics
get_link_stats- What it does
- Retrieve analytics for a link, a domain, or the authenticated workspace.
- Kind
- Read/helper
Events
list_events- What it does
- Retrieve a paginated list of events for the authenticated workspace.
- Kind
- Read/helper
Tags
create_tag- What it does
- Create a tag for the authenticated workspace.
- Kind
- Confirmed operation
list_tags- What it does
- Retrieve a paginated list of tags for the authenticated workspace.
- Kind
- Read/helper
update_tag- What it does
- Update a tag in the workspace.
- Kind
- Confirmed operation
delete_tag- What it does
- Delete a tag from the workspace.
- Kind
- Confirmed operation
Folders
create_folder- What it does
- Create a folder for the authenticated workspace.
- Kind
- Confirmed operation
list_folders- What it does
- Retrieve a paginated list of folders for the authenticated workspace.
- Kind
- Read/helper
update_folder- What it does
- Update a folder in the workspace.
- Kind
- Confirmed operation
delete_folder- What it does
- Delete a folder from the workspace.
- Kind
- Confirmed operation
Domains
create_domain- What it does
- Create a domain for the authenticated workspace.
- Kind
- Confirmed operation
list_domains- What it does
- Retrieve a paginated list of domains for the authenticated workspace.
- Kind
- Read/helper
update_domain- What it does
- Update a domain for the authenticated workspace.
- Kind
- Confirmed operation
delete_domain- What it does
- Delete a domain from a workspace.
- Kind
- Confirmed operation
register_domain- What it does
- Register a domain for the authenticated workspace.
- Kind
- Confirmed operation
check_domain_status- What it does
- Check if a domain name is available for purchase.
- Kind
- Read/helper
Track
track_lead- What it does
- Track a lead for a short link.
- Kind
- Confirmed operation
track_sale- What it does
- Track a sale for a short link.
- Kind
- Confirmed operation
track_open- What it does
- This endpoint is used to track when a user opens your app via a Dub-powered deep link (for both iOS and Android).
- Kind
- Confirmed operation
Customers
list_customers- What it does
- Retrieve a paginated list of customers for the authenticated workspace.
- Kind
- Read/helper
get_customer- What it does
- Retrieve a customer by ID for the authenticated workspace.
- Kind
- Read/helper
update_customer- What it does
- Update a customer for the authenticated workspace.
- Kind
- Confirmed operation
delete_customer- What it does
- Delete a customer from a workspace.
- Kind
- Confirmed operation
Partners
create_partner- What it does
- Creates or updates a partner record (upsert behavior).
- Kind
- Confirmed operation
list_partners- What it does
- List all partners for a partner program.
- Kind
- Read/helper
create_partner_link- What it does
- Create a link for a partner that is enrolled in your program.
- Kind
- Confirmed operation
retrieve_partner_links- What it does
- Retrieve a partner's links by their partner ID or tenant ID.
- Kind
- Read/helper
upsert_partner_link- What it does
- Upsert a link for a partner that is enrolled in your program.
- Kind
- Confirmed operation
retrieve_partner_analytics- What it does
- Retrieve analytics for a partner within a program.
- Kind
- Read/helper
ban_partner- What it does
- Ban a partner from your program.
- Kind
- Confirmed operation
deactivate_partner- What it does
- This will deactivate the partner from your program and disable all their active links.
- Kind
- Confirmed operation
Program Applications
list_program_applications- What it does
- Retrieve a paginated list of applications for your partner program.
- Kind
- Read/helper
approve_program_application- What it does
- Approve a pending partner application to your program.
- Kind
- Confirmed operation
reject_program_application- What it does
- Reject a pending partner application to your program.
- Kind
- Confirmed operation
Discount Codes
list_discount_codes- What it does
- Retrieve a paginated list of discount codes in a program or filtered by partner, discount, or code.
- Kind
- Read/helper
create_discount_code- What it does
- Create a discount code for a partner.
- Kind
- Confirmed operation
delete_discount_code- What it does
- Delete a discount code for a partner by its unique ID or alphanumeric code.
- Kind
- Confirmed operation
Commissions
create_commission- What it does
- Create one or more commissions (custom, lead or sale) for a partner.
- Kind
- Confirmed operation
list_commissions- What it does
- Retrieve a paginated list of commissions for your partner program.
- Kind
- Read/helper
update_commission- What it does
- Update an existing commission amount.
- Kind
- Confirmed operation
bulk_update_commissions- What it does
- Bulk update up to 100 commissions with the same status.
- Kind
- Confirmed operation
Payouts
list_payouts- What it does
- Retrieve a paginated list of payouts for your partner program.
- Kind
- Read/helper
Embed Tokens
create_referrals_embed_token- What it does
- Create a referrals embed token for the given partner/tenant.
- Kind
- Confirmed operation
Qr Codes
get_qr_code- What it does
- Retrieve a QR code for a link.
- Kind
- Confirmed operation
Bounties
list_bounty_submissions- What it does
- List all submissions for a specific bounty in your partner program.
- Kind
- Read/helper
approve_bounty_submission- What it does
- Approve a bounty submission.
- Kind
- Confirmed operation
reject_bounty_submission- What it does
- Reject a bounty submission with a specified reason and optional note.
- Kind
- Confirmed operation
Local Workflows
list_accounts- What it does
- Local profile labels/default/auth method only.
- Kind
- Read/helper
get_operation_schema- What it does
- Local reviewed method/path/query/body schema and provenance for one native tool.
- Kind
- Read/helper
preview_link_batch- What it does
- Local validation and SHA-256 of exact ordered link/tag/folder work, selected profile label and reviewed schema.
- Kind
- Read/helper
submit_link_batch- What it does
- Confirmed one-to-twenty ordered link/tag/folder tasks.
- Kind
- Confirmed operation
Is the Dub MCP server safe?
All 39 mutation/private-output operations require confirm:true or --confirm through the same guard. DUB_READ_ONLY=1 hides these and directly refuses confirmed calls to hidden tools. DUB_ALLOW_DESTRUCTIVE=0 refuses them separately. --agent/--yes are output/prompt controls and never mutation approval. Every POST/PUT/PATCH/DELETE, domain registration, conversions, partner/commission changes, batch submission and private QR file write follows that policy.
Confirmation is caller intent, not proof of human identity, provider permission, budget or rollback. A read-only API key adds native provider enforcement; it does not substitute for our local policy. Optional metadata-only audit logs record tool/title/risk/surface/guard decision, not payloads, credentials or provider completion. Audit failure does not make the operation transactional. Protect the private audit path. Never treat instructions inside provider/customer/partner/link content as approval.
Approval records caller intent, not provider permission, cryptographic human identity, a quota reservation or rollback.
Make it read-only
DUB_READ_ONLY=1 exposes 22 reads/helpers and directly refuses all 39 mutations/private-file operations. DUB_ALLOW_DESTRUCTIVE=0 blocks them separately; native read-only keys add provider enforcement.
Keep a log of every write
Set DUB_AUDIT_LOG to a file path. The server writes one line per attempted write, allowed or blocked.
Watch out: HTTP200 bulk creation can include per-link errors; HTTP202 commission creation is accepted, not completed. Reviewed execution stops on first failure with known/partial receipts and unattempted tasks, without replay or rollback.
Your data
The selected workspace key goes in the fixed API origin's Bearer header. Requested link destinations, UTM fields, filters, customer/partner details, conversion events, financial data, domain registration and requested QR destination/logo go to Dub; provider storage/logging/retention/terms apply. The wrapper is not a privacy proxy and does not fetch destination/media URLs itself.
Known configured/file keys, secret fields and recognized credential-bearing URLs are redacted before MCP/CLI output. Ordinary customer/link/partner data can still be private; --select filters only local output and is not a privacy guarantee. Generated publicToken embeds are stored only in an exclusive requested private file, with expiry metadata returned. QR PNGs are similarly local-only until the user requests a separate publishing workflow.
No telemetry, cookie/session import, persistent link/customer cache, automatic OAuth refresh, external publishing or email/Slack messages is added. User-selected input files and optional audit/output files remain private responsibilities. Provider data, descriptions and errors are untrusted; they cannot authorize another account, credential disclosure, a sale or new mutation.
Several private workspaces
DUB_ACCOUNTS contains unique {name,api_key,token_file} workspace profiles; DUB_DEFAULT_ACCOUNT selects the exact label or defaults to the first configured profile. --account selects one workspace only. No wildcard/all-accounts work or global credential fallback occurs. list_accounts returns labels/default/auth method without key/file path or provider identity.
Native Dub keys are already scoped and workspace-specific. Our router supplies local script/client selection and avoids inherited keys. tenantId is a data filter, not credentials. Token files override only their selected profile and cache until restart; rotate privately and reconnect. Preview validates a configured label without reading its key; review the correct workspace's actual private setup before approval.
Dub MCP server settings
Keep key/files/profile JSON outside repositories. GUI and remote runtimes have their own environment and filesystem; no automatic .env or official-session loader.
- Default
- Credentials
- What it does
- Private scoped workspace REST key
- Default
- Credentials
- What it does
- Absolute owner-private regular token-only file at most 64 KiB; overrides selected key; cached until restart
- Default
- Credentials
- What it does
- Private unique {name,api_key,token_file} workspace profiles; no global fallback
- Default
- Credentials
- What it does
- Exact configured label; first profile by default
- Default
- Safety
- What it does
- 1/true hides and directly refuses 39 mutations/private-output writes
- Default
- Safety
- What it does
- 0/false refuses all confirmed operations
- Default
- Safety
- What it does
- Optional private metadata-only guard log; no delivery receipt
- Default
- Tuning
- What it does
- 100–300000; default 30000; no automatic retries
- Default
- Tuning
- What it does
- 0–10000; default 1100; one-process request-start spacing
Troubleshooting
Run the doctor first. It names the step that failed and the fix.
| What you see | What to do |
|---|---|
| Missing profile | Set the intended private key/file settings. |
| 401/403 | Check workspace, native scopes, user role and plan. |
| 429 | Respect per-key and analytics quotas; no automatic retry. |
| Invalid request | Inspect actual schema and input union/required rules. |
| Partial bulk result | Read every per-link outcome; do not replay known successes. |
| Review mismatch | Review exact profile/tasks/order/schema again. |
| Existing output file | Choose a new private path; no overwrite. |
| HTTP202 commission | Accepted receipt is not completed financial work. |
| Old SDK applications route | Use current program-application tasks. |
| One list page | Deliberately continue using that route’s native cursor/page controls. |
If the server doesn't show up in your app at all, run the command your app runs, in a terminal, and read the error.
Every tool argument and native input
create_link- CLI command
dub-cli create-link- Native route / mode
- POST /links; confirmation required
list_links- CLI command
dub-cli list-links- Native route / mode
- GET /links; read/helper
get_links_count- CLI command
dub-cli get-links-count- Native route / mode
- GET /links/count; read/helper
get_link- CLI command
dub-cli get-link- Native route / mode
- GET /links/info; read/helper
update_link- CLI command
dub-cli update-link- Native route / mode
- PATCH /links/{linkId}; confirmation required
delete_link- CLI command
dub-cli delete-link- Native route / mode
- DELETE /links/{linkId}; confirmation required
bulk_create_links- CLI command
dub-cli bulk-create-links- Native route / mode
- POST /links/bulk; confirmation required
bulk_update_links- CLI command
dub-cli bulk-update-links- Native route / mode
- PATCH /links/bulk; confirmation required
bulk_delete_links- CLI command
dub-cli bulk-delete-links- Native route / mode
- DELETE /links/bulk; confirmation required
upsert_link- CLI command
dub-cli upsert-link- Native route / mode
- PUT /links/upsert; confirmation required
get_link_stats- CLI command
dub-cli get-link-stats- Native route / mode
- GET /analytics; read/helper
list_events- CLI command
dub-cli list-events- Native route / mode
- GET /events; read/helper
create_tag- CLI command
dub-cli create-tag- Native route / mode
- POST /tags; confirmation required
list_tags- CLI command
dub-cli list-tags- Native route / mode
- GET /tags; read/helper
update_tag- CLI command
dub-cli update-tag- Native route / mode
- PATCH /tags/{id}; confirmation required
delete_tag- CLI command
dub-cli delete-tag- Native route / mode
- DELETE /tags/{id}; confirmation required
create_folder- CLI command
dub-cli create-folder- Native route / mode
- POST /folders; confirmation required
list_folders- CLI command
dub-cli list-folders- Native route / mode
- GET /folders; read/helper
update_folder- CLI command
dub-cli update-folder- Native route / mode
- PATCH /folders/{id}; confirmation required
delete_folder- CLI command
dub-cli delete-folder- Native route / mode
- DELETE /folders/{id}; confirmation required
create_domain- CLI command
dub-cli create-domain- Native route / mode
- POST /domains; confirmation required
list_domains- CLI command
dub-cli list-domains- Native route / mode
- GET /domains; read/helper
update_domain- CLI command
dub-cli update-domain- Native route / mode
- PATCH /domains/{slug}; confirmation required
delete_domain- CLI command
dub-cli delete-domain- Native route / mode
- DELETE /domains/{slug}; confirmation required
register_domain- CLI command
dub-cli register-domain- Native route / mode
- POST /domains/register; confirmation required
check_domain_status- CLI command
dub-cli check-domain-status- Native route / mode
- GET /domains/status; read/helper
track_lead- CLI command
dub-cli track-lead- Native route / mode
- POST /track/lead; confirmation required
track_sale- CLI command
dub-cli track-sale- Native route / mode
- POST /track/sale; confirmation required
track_open- CLI command
dub-cli track-open- Native route / mode
- POST /track/open; confirmation required
list_customers- CLI command
dub-cli list-customers- Native route / mode
- GET /customers; read/helper
get_customer- CLI command
dub-cli get-customer- Native route / mode
- GET /customers/{id}; read/helper
update_customer- CLI command
dub-cli update-customer- Native route / mode
- PATCH /customers/{id}; confirmation required
delete_customer- CLI command
dub-cli delete-customer- Native route / mode
- DELETE /customers/{id}; confirmation required
create_partner- CLI command
dub-cli create-partner- Native route / mode
- POST /partners; confirmation required
list_partners- CLI command
dub-cli list-partners- Native route / mode
- GET /partners; read/helper
create_partner_link- CLI command
dub-cli create-partner-link- Native route / mode
- POST /partners/links; confirmation required
retrieve_partner_links- CLI command
dub-cli retrieve-partner-links- Native route / mode
- GET /partners/links; read/helper
upsert_partner_link- CLI command
dub-cli upsert-partner-link- Native route / mode
- PUT /partners/links/upsert; confirmation required
retrieve_partner_analytics- CLI command
dub-cli retrieve-partner-analytics- Native route / mode
- GET /partners/analytics; read/helper
ban_partner- CLI command
dub-cli ban-partner- Native route / mode
- POST /partners/ban; confirmation required
deactivate_partner- CLI command
dub-cli deactivate-partner- Native route / mode
- POST /partners/deactivate; confirmation required
list_program_applications- CLI command
dub-cli list-program-applications- Native route / mode
- GET /program-applications; read/helper
approve_program_application- CLI command
dub-cli approve-program-application- Native route / mode
- POST /program-applications/approve; confirmation required
reject_program_application- CLI command
dub-cli reject-program-application- Native route / mode
- POST /program-applications/reject; confirmation required
list_discount_codes- CLI command
dub-cli list-discount-codes- Native route / mode
- GET /discount-codes; read/helper
create_discount_code- CLI command
dub-cli create-discount-code- Native route / mode
- POST /discount-codes; confirmation required
delete_discount_code- CLI command
dub-cli delete-discount-code- Native route / mode
- DELETE /discount-codes/{idOrCode}; confirmation required
create_commission- CLI command
dub-cli create-commission- Native route / mode
- POST /commissions; confirmation required
list_commissions- CLI command
dub-cli list-commissions- Native route / mode
- GET /commissions; read/helper
update_commission- CLI command
dub-cli update-commission- Native route / mode
- PATCH /commissions/{id}; confirmation required
bulk_update_commissions- CLI command
dub-cli bulk-update-commissions- Native route / mode
- PATCH /commissions/bulk; confirmation required
list_payouts- CLI command
dub-cli list-payouts- Native route / mode
- GET /payouts; read/helper
create_referrals_embed_token- CLI command
dub-cli create-referrals-embed-token- Native route / mode
- POST /tokens/embed/referrals; confirmation required
get_qr_code- CLI command
dub-cli get-qr-code- Native route / mode
- GET /qr; confirmation required
list_bounty_submissions- CLI command
dub-cli list-bounty-submissions- Native route / mode
- GET /bounties/{bountyId}/submissions; read/helper
approve_bounty_submission- CLI command
dub-cli approve-bounty-submission- Native route / mode
- POST /bounties/{bountyId}/submissions/{submissionId}/approve; confirmation required
reject_bounty_submission- CLI command
dub-cli reject-bounty-submission- Native route / mode
- POST /bounties/{bountyId}/submissions/{submissionId}/reject; confirmation required
list_accounts- CLI command
dub-cli list-accounts- Native route / mode
- Local workflow; read/helper
get_operation_schema- CLI command
dub-cli get-operation-schema- Native route / mode
- Local workflow; read/helper
preview_link_batch- CLI command
dub-cli preview-link-batch- Native route / mode
- Local workflow; read/helper
submit_link_batch- CLI command
dub-cli submit-link-batch- Native route / mode
- Local workflow; confirmation required
create_link
dub-cli create-link
Create a link for the authenticated workspace.
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or
dub.shif the workspace has no domains). maxLength:190.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
keyLength- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The length of the short link slug. Defaults to 7 if not provided. When used with
prefix, the total length of the key will beprefix.length + keyLength. minimum:3. maximum:190.
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The prefix of the short link slug for randomly-generated keys (e.g. if prefix is
/c/, generated keys will be in the/c/:keyformat). Will be ignored ifkeyis provided.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Geo targeting information for the short link in JSON format
{[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.tagIds
input.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagIds anyOf branch 2
input.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.tagNames
input.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagNames anyOf branch 2
input.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.testVariants
input.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.webhookIds
input.webhookIds[]
Native JSON value; inspect the full schema for validation.
input.payload
url- Required
- Yes
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or
dub.shif the workspace has no domains). maxLength:190.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
keyLength- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The length of the short link slug. Defaults to 7 if not provided. When used with
prefix, the total length of the key will beprefix.length + keyLength. minimum:3. maximum:190.
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The prefix of the short link slug for randomly-generated keys (e.g. if prefix is
/c/, generated keys will be in the/c/:keyformat). Will be ignored ifkeyis provided.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Geo targeting information for the short link in JSON format
{[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
input.payload.tagIds
input.payload.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.tagIds anyOf branch 2
input.payload.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.tagNames
input.payload.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.tagNames anyOf branch 2
input.payload.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.testVariants
input.payload.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.payload.webhookIds
input.payload.webhookIds[]
Native JSON value; inspect the full schema for validation.
list_links
dub-cli list-links
Retrieve a paginated list of links for the authenticated workspace.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain to filter the links by. E.g.
ac.me. If not provided, all links for the workspace will be returned.
tag_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: Use
tagIdsinstead. The tag ID to filter the links by. Deprecated native compatibility field.
tag_ids- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The tag IDs to filter the links by.
tag_names- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folder_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The folder ID to filter the links by.
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
user_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The user ID to filter the links by.
tenant_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant.
show_archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include archived links in the response. Defaults to
falseif not provided. default:false.
with_tags- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- DEPRECATED. Filter for links that have at least one tag assigned to them. default:
false. Deprecated native compatibility field.
ending_before- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results before this cursor. Mutually exclusive with
startingAfter.
starting_after- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results after this cursor. Mutually exclusive with
endingBefore.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- DEPRECATED. Use
startingAfterinstead. maximum:9007199254740991. exclusiveMinimum:0. Deprecated native compatibility field.
page_size- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
input.tag_ids
input.tag_ids anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tag_ids anyOf branch 2
input.tag_ids.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.tag_names
input.tag_names anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tag_names anyOf branch 2
input.tag_names.anyOf2[]
Native JSON value; inspect the full schema for validation.
get_links_count
dub-cli get-links-count
Retrieve the number of links for the authenticated workspace.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain to filter the links by. E.g.
ac.me. If not provided, all links for the workspace will be returned.
tag_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: Use
tagIdsinstead. The tag ID to filter the links by. Deprecated native compatibility field.
tag_ids- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The tag IDs to filter the links by.
tag_names- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folder_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The folder ID to filter the links by.
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
user_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The user ID to filter the links by.
tenant_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant.
show_archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include archived links in the response. Defaults to
falseif not provided. default:false.
with_tags- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- DEPRECATED. Filter for links that have at least one tag assigned to them. default:
false. Deprecated native compatibility field.
group_by- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The field to group the links by.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
input.tag_ids
input.tag_ids anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tag_ids anyOf branch 2
input.tag_ids.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.tag_names
input.tag_names anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tag_names anyOf branch 2
input.tag_names.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.group_by
input.group_by anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.group_by anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.group_by anyOf branch 3
Native JSON value; inspect the full schema for validation.
input.group_by anyOf branch 4
Native JSON value; inspect the full schema for validation.
get_link
dub-cli get-link
Retrieve the info for a link.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the link to retrieve. E.g. for
d.to/github, the domain isd.to. minLength:1.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The key of the link to retrieve. E.g. for
d.to/github, the key isgithub. minLength:1.
link_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The unique ID of the short link.
external_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- This is the ID of the link in the your database.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
update_link
dub-cli update-link
Update a link for the authenticated workspace. If there's no change, returns it as it is.
link_id- Required
- Yes
- Type
- string
- Details
- The id of the link to update. You may use either
linkId(obtained via/links/infoendpoint) orexternalIdprefixed withext_.
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or
dub.shif the workspace has no domains). maxLength:190.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.tagIds
input.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagIds anyOf branch 2
input.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.tagNames
input.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagNames anyOf branch 2
input.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.image
input.image anyOf branch 1
input.image.anyOf1 anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.image.anyOf1 anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.image anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.geo
input.geo allOf branch 1
Geo targeting information for the short link in JSON format {[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
input.testVariants
input.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.webhookIds
input.webhookIds[]
Native JSON value; inspect the full schema for validation.
input.payload
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or
dub.shif the workspace has no domains). maxLength:190.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
input.payload.tagIds
input.payload.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.tagIds anyOf branch 2
input.payload.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.tagNames
input.payload.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.tagNames anyOf branch 2
input.payload.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.image
input.payload.image anyOf branch 1
input.payload.image.anyOf1 anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.image.anyOf1 anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.payload.image anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.payload.geo
input.payload.geo allOf branch 1
Geo targeting information for the short link in JSON format {[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
input.payload.testVariants
input.payload.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.payload.webhookIds
input.payload.webhookIds[]
Native JSON value; inspect the full schema for validation.
delete_link
dub-cli delete-link
Delete a link for the authenticated workspace.
link_id- Required
- Yes
- Type
- string
- Details
- The id of the link to delete. You may use either
linkId(obtained via/links/infoendpoint) orexternalIdprefixed withext_.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
bulk_create_links
dub-cli bulk-create-links
Bulk create up to 100 links for the authenticated workspace.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- array
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
input.payload[]
url- Required
- Yes
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or
dub.shif the workspace has no domains). maxLength:190.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
keyLength- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The length of the short link slug. Defaults to 7 if not provided. When used with
prefix, the total length of the key will beprefix.length + keyLength. minimum:3. maximum:190.
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The prefix of the short link slug for randomly-generated keys (e.g. if prefix is
/c/, generated keys will be in the/c/:keyformat). Will be ignored ifkeyis provided.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Geo targeting information for the short link in JSON format
{[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
input.payload[].tagIds
input.payload[].tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload[].tagIds anyOf branch 2
input.payload[].tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload[].tagNames
input.payload[].tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload[].tagNames anyOf branch 2
input.payload[].tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload[].testVariants
input.payload[].testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.payload[].webhookIds
input.payload[].webhookIds[]
Native JSON value; inspect the full schema for validation.
bulk_update_links
dub-cli bulk-update-links
Bulk update up to 100 links with the same data for the authenticated workspace.
linkIds- Required
- No; body/guard requirements still apply
- Type
- array
- Details
- The IDs of the links to update. Takes precedence over
externalIds. maxItems:100. default:[].
externalIds- Required
- No; body/guard requirements still apply
- Type
- array
- Details
- The external IDs of the links to update as stored in your database. maxItems:
100. default:[].
data- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Native field; use the reviewed provider reference.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.linkIds
input.linkIds[]
Native JSON value; inspect the full schema for validation.
input.externalIds
input.externalIds[]
Native JSON value; inspect the full schema for validation.
input.data
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Geo targeting information for the short link in JSON format
{[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
input.data.tagIds
input.data.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.data.tagIds anyOf branch 2
input.data.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.data.tagNames
input.data.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.data.tagNames anyOf branch 2
input.data.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.data.testVariants
input.data.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.data.webhookIds
input.data.webhookIds[]
Native JSON value; inspect the full schema for validation.
input.payload
linkIds- Required
- No; body/guard requirements still apply
- Type
- array
- Details
- The IDs of the links to update. Takes precedence over
externalIds. maxItems:100. default:[].
externalIds- Required
- No; body/guard requirements still apply
- Type
- array
- Details
- The external IDs of the links to update as stored in your database. maxItems:
100. default:[].
data- Required
- Yes
- Type
- object
- Details
- Native field; use the reviewed provider reference.
input.payload.linkIds
input.payload.linkIds[]
Native JSON value; inspect the full schema for validation.
input.payload.externalIds
input.payload.externalIds[]
Native JSON value; inspect the full schema for validation.
input.payload.data
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Geo targeting information for the short link in JSON format
{[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
input.payload.data.tagIds
input.payload.data.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.data.tagIds anyOf branch 2
input.payload.data.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.data.tagNames
input.payload.data.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.data.tagNames anyOf branch 2
input.payload.data.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.data.testVariants
input.payload.data.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.payload.data.webhookIds
input.payload.data.webhookIds[]
Native JSON value; inspect the full schema for validation.
bulk_delete_links
dub-cli bulk-delete-links
Bulk delete up to 100 links for the authenticated workspace.
link_ids- Required
- Yes
- Type
- array
- Details
- Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
input.link_ids
input.link_ids[]
Native JSON value; inspect the full schema for validation.
upsert_link
dub-cli upsert-link
Upsert a link for the authenticated workspace by its URL. If a link with the same URL already exists, return it (or update it if there are any changes). Otherwise, a new link will be created.
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or
dub.shif the workspace has no domains). maxLength:190.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
keyLength- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The length of the short link slug. Defaults to 7 if not provided. When used with
prefix, the total length of the key will beprefix.length + keyLength. minimum:3. maximum:190.
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The prefix of the short link slug for randomly-generated keys (e.g. if prefix is
/c/, generated keys will be in the/c/:keyformat). Will be ignored ifkeyis provided.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Geo targeting information for the short link in JSON format
{[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.tagIds
input.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagIds anyOf branch 2
input.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.tagNames
input.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagNames anyOf branch 2
input.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.testVariants
input.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.webhookIds
input.webhookIds[]
Native JSON value; inspect the full schema for validation.
input.payload
url- Required
- Yes
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or
dub.shif the workspace has no domains). maxLength:190.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
keyLength- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The length of the short link slug. Defaults to 7 if not provided. When used with
prefix, the total length of the key will beprefix.length + keyLength. minimum:3. maximum:190.
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The prefix of the short link slug for randomly-generated keys (e.g. if prefix is
/c/, generated keys will be in the/c/:keyformat). Will be ignored ifkeyis provided.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Geo targeting information for the short link in JSON format
{[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
input.payload.tagIds
input.payload.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.tagIds anyOf branch 2
input.payload.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.tagNames
input.payload.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.tagNames anyOf branch 2
input.payload.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.testVariants
input.payload.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.payload.webhookIds
input.payload.webhookIds[]
Native JSON value; inspect the full schema for validation.
get_link_stats
dub-cli get-link-stats
Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the event and type query parameters.
event- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The type of event to retrieve analytics for. Defaults to
clicks. enum:["clicks", "leads", "sales", "composite"]. default:"clicks".
group_by- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The parameter to group the analytics data points by. Defaults to
countif undefined. enum:["count", "timeseries", "continents", "regions", "countries", "cities", "devices", "browsers", "os", "trigger", "triggers", "event_names", "referers", "referer_urls", "top_folders", "top_link_tags", "top_domains", "top_links", "top_urls", "top_base_urls", "top_partners", "top_groups", "top_partner_tags", "utm_sources", "utm_mediums", "utm_campaigns", "utm_terms", "utm_contents"]. default:"count".
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain to filter analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:dub.co,dub.co,google.com,-spam.com.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The slug of the short link to retrieve analytics for. Must be used along with the corresponding
domainof the short link to fetch analytics for a specific short link.
link_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The unique ID of the link to retrieve analytics for.Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:link_123,link_123,link_456,-link_789.
external_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.
tenant_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the tenant that created the link inside your system. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:tenant_123,tenant_123,tenant_456,-tenant_789.
tag_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The tag ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:tag_123,tag_123,tag_456,-tag_789.
folder_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The folder ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:folder_123,folder_123,folder_456,-folder_789. If not provided, return analytics for all links.
partner_tag_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The partner tag ID(s) to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:ptag_123,ptag_123,ptag_456,-ptag_789.
group_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The group ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:grp_123,grp_123,grp_456,-grp_789.
partner_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:pn_123,pn_123,pn_456,-pn_789.
customer_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the customer to retrieve analytics for.
interval- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The interval to retrieve analytics for. If undefined, defaults to 24h. enum:
["24h", "7d", "30d", "90d", "1y", "mtd", "qtd", "ytd", "all"].
start- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The start date and time when to retrieve analytics from. If set, takes precedence over
interval.
end- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with
start, takes precedence overinterval.
timezone- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. default:
"UTC".
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code (see https://d.to/geo). Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:US,US,BR,FR,-US.
city- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The city to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:New York,New York,London,-New York.
region- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ISO 3166-2 region code to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:NY,NY,CA,-NY.
continent- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The continent to retrieve analytics for. Valid values: AF, AN, AS, EU, NA, OC, SA. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:NA,NA,EU,-AS.
device- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The device to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Desktop,Mobile,Tablet,-Mobile.
browser- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The browser to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Chrome,Chrome,Firefox,Safari,-IE.
os- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The OS to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Windows,Mac,Windows,Linux,-Windows.
trigger- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The trigger to retrieve analytics for. Valid values: qr, link, pageview. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:qr,qr,link,-qr. If undefined, returns all trigger types.
event_name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The conversion event name to retrieve analytics for. Only available for lead and sale events. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Sign up,Sign up,Purchase,-Sign up.
referer- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The referer hostname to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:google.com,google.com,twitter.com,-facebook.com.
referer_url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The full referer URL to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:https://google.com,https://google.com,https://twitter.com,-https://spam.com.
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:https://example.com,https://example.com,https://other.com,-https://spam.com.
utm_source- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM source to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:google,google,twitter,-spam.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM medium to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:cpc,cpc,social,-email.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM campaign to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:summer_sale,summer_sale,winter_sale,-old_campaign.
utm_term- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM term to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-).
utm_content- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM content to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-).
root- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.
sale_type- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both. enum:
["new", "recurring"].
query- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Search the events by a custom metadata value. Only available for lead and sale events. Examples:
metadata['key']:'value'maxLength:10000.
program_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: This is automatically inferred from your workspace's defaultProgramId. The ID of the program to retrieve analytics for. Deprecated native compatibility field.
tag_ids- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: Use
tagIdinstead. The tag IDs to retrieve analytics for. Deprecated native compatibility field.
qr- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use the
triggerfield instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. Deprecated native compatibility field.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
list_events
dub-cli list-events
Retrieve a paginated list of events for the authenticated workspace.
event- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The type of event to retrieve analytics for. Defaults to 'clicks'. enum:
["clicks", "leads", "sales"]. default:"clicks".
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain to filter analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:dub.co,dub.co,google.com,-spam.com.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The slug of the short link to retrieve analytics for. Must be used along with the corresponding
domainof the short link to fetch analytics for a specific short link.
link_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The unique ID of the link to retrieve analytics for.Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:link_123,link_123,link_456,-link_789.
external_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.
tenant_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the tenant that created the link inside your system. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:tenant_123,tenant_123,tenant_456,-tenant_789.
tag_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The tag ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:tag_123,tag_123,tag_456,-tag_789.
folder_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The folder ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:folder_123,folder_123,folder_456,-folder_789. If not provided, return analytics for all links.
partner_tag_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The partner tag ID(s) to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:ptag_123,ptag_123,ptag_456,-ptag_789.
group_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The group ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:grp_123,grp_123,grp_456,-grp_789.
partner_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:pn_123,pn_123,pn_456,-pn_789.
customer_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the customer to retrieve analytics for.
interval- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The interval to retrieve analytics for. If undefined, defaults to 24h. enum:
["24h", "7d", "30d", "90d", "1y", "mtd", "qtd", "ytd", "all"].
start- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The start date and time when to retrieve analytics from. If set, takes precedence over
interval.
end- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with
start, takes precedence overinterval.
timezone- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. default:
"UTC".
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code (see https://d.to/geo). Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:US,US,BR,FR,-US.
city- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The city to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:New York,New York,London,-New York.
region- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ISO 3166-2 region code to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:NY,NY,CA,-NY.
continent- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The continent to retrieve analytics for. Valid values: AF, AN, AS, EU, NA, OC, SA. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:NA,NA,EU,-AS.
device- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The device to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Desktop,Mobile,Tablet,-Mobile.
browser- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The browser to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Chrome,Chrome,Firefox,Safari,-IE.
os- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The OS to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Windows,Mac,Windows,Linux,-Windows.
trigger- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The trigger to retrieve analytics for. Valid values: qr, link, pageview. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:qr,qr,link,-qr. If undefined, returns all trigger types.
event_name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The conversion event name to retrieve analytics for. Only available for lead and sale events. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Sign up,Sign up,Purchase,-Sign up.
referer- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The referer hostname to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:google.com,google.com,twitter.com,-facebook.com.
referer_url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The full referer URL to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:https://google.com,https://google.com,https://twitter.com,-https://spam.com.
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:https://example.com,https://example.com,https://other.com,-https://spam.com.
utm_source- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM source to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:google,google,twitter,-spam.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM medium to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:cpc,cpc,social,-email.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM campaign to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:summer_sale,summer_sale,winter_sale,-old_campaign.
utm_term- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM term to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-).
utm_content- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM content to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-).
root- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.
sale_type- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both. enum:
["new", "recurring"].
query- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Search the events by a custom metadata value. Only available for lead and sale events. Examples:
metadata['key']:'value'maxLength:10000.
program_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: This is automatically inferred from your workspace's defaultProgramId. The ID of the program to retrieve analytics for. Deprecated native compatibility field.
tag_ids- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: Use
tagIdinstead. The tag IDs to retrieve analytics for. Deprecated native compatibility field.
qr- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use the
triggerfield instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. Deprecated native compatibility field.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0. default:1.
limit- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
1000. exclusiveMinimum:0. default:100.
sort_order- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order. The default is
desc. enum:["asc", "desc"]. default:"desc".
sort_by- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the events by. The default is
timestamp. enum:["timestamp"]. default:"timestamp".
order- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- DEPRECATED. Use
sortOrderinstead. enum:["asc", "desc"]. default:"desc". Deprecated native compatibility field.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
create_tag
dub-cli create-tag
Create a tag for the authenticated workspace.
name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190.
color- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, brown, gray. enum:
["red", "yellow", "green", "blue", "purple", "brown", "gray", "pink"].
tag- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190. Deprecated native compatibility field.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190.
color- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, brown, gray. enum:
["red", "yellow", "green", "blue", "purple", "brown", "gray", "pink"].
tag- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190. Deprecated native compatibility field.
list_tags
dub-cli list-tags
Retrieve a paginated list of tags for the authenticated workspace.
sort_by- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the tags by. enum:
["name", "createdAt"]. default:"name".
sort_order- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The order to sort the tags by. enum:
["asc", "desc"]. default:"asc".
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The search term to filter the tags by.
ids- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- IDs of tags to filter by.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
page_size- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
input.ids
input.ids anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.ids anyOf branch 2
input.ids.anyOf2[]
Native JSON value; inspect the full schema for validation.
update_tag
dub-cli update-tag
Update a tag in the workspace.
id- Required
- Yes
- Type
- string
- Details
- The ID of the tag to update.
name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190.
color- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, brown, gray. enum:
["red", "yellow", "green", "blue", "purple", "brown", "gray", "pink"].
tag- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190. Deprecated native compatibility field.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190.
color- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, brown, gray. enum:
["red", "yellow", "green", "blue", "purple", "brown", "gray", "pink"].
tag- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190. Deprecated native compatibility field.
delete_tag
dub-cli delete-tag
Delete a tag from the workspace. All existing links will still work, but they will no longer be associated with this tag.
id- Required
- Yes
- Type
- string
- Details
- The ID of the tag to delete.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
create_folder
dub-cli create-folder
Create a folder for the authenticated workspace.
name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the folder. maxLength:
190.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The description of the folder. maxLength:
500.
accessLevel- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The workspace-level access level settings for the folder. Default is
writewhich allows full access to the folder for all team members. The other options areread(view-only access) andnull(no access) and are only available on Business plans and above. enum:["write", "read", null]. default:"write".
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
name- Required
- Yes
- Type
- string
- Details
- The name of the folder. maxLength:
190.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The description of the folder. maxLength:
500.
accessLevel- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The workspace-level access level settings for the folder. Default is
writewhich allows full access to the folder for all team members. The other options areread(view-only access) andnull(no access) and are only available on Business plans and above. enum:["write", "read", null]. default:"write".
list_folders
dub-cli list-folders
Retrieve a paginated list of folders for the authenticated workspace.
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The search term to filter the folders by.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
page_size- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
50. exclusiveMinimum:0. default:50.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
update_folder
dub-cli update-folder
Update a folder in the workspace.
id- Required
- Yes
- Type
- string
- Details
- The ID of the folder to update.
name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the folder. maxLength:
190.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The description of the folder. maxLength:
500.
accessLevel- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The access level of the folder within the workspace. enum:
["write", "read", null].
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the folder. maxLength:
190.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The description of the folder. maxLength:
500.
accessLevel- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The access level of the folder within the workspace. enum:
["write", "read", null].
delete_folder
dub-cli delete-folder
Delete a folder from the workspace. All existing links will still work, but they will no longer be associated with this folder.
id- Required
- Yes
- Type
- string
- Details
- The ID of the folder to delete.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
create_domain
dub-cli create-domain
Create a domain for the authenticated workspace.
slug- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Name of the domain. minLength:
1. maxLength:190.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when any link under this domain has expired. maxLength:
32000.
notFoundUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when a link under this domain doesn't exist. maxLength:
32000.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to archive this domain.
falsewill unarchive a previously archived domain. default:false.
placeholder- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. maxLength:
100.
logo- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
assetLinks- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- assetLinks.json configuration file (for deep link support on Android).
appleAppSiteAssociation- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- apple-app-site-association configuration file (for deep link support on iOS).
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.logo
input.logo anyOf branch 1
input.logo.anyOf1 anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.logo.anyOf1 anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.logo.anyOf1 anyOf branch 3
Native JSON value; inspect the full schema for validation.
input.logo anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.payload
slug- Required
- Yes
- Type
- string
- Details
- Name of the domain. minLength:
1. maxLength:190.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when any link under this domain has expired. maxLength:
32000.
notFoundUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when a link under this domain doesn't exist. maxLength:
32000.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to archive this domain.
falsewill unarchive a previously archived domain. default:false.
placeholder- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. maxLength:
100.
logo- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
assetLinks- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- assetLinks.json configuration file (for deep link support on Android).
appleAppSiteAssociation- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- apple-app-site-association configuration file (for deep link support on iOS).
input.payload.logo
input.payload.logo anyOf branch 1
input.payload.logo.anyOf1 anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.logo.anyOf1 anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.payload.logo.anyOf1 anyOf branch 3
Native JSON value; inspect the full schema for validation.
input.payload.logo anyOf branch 2
Native JSON value; inspect the full schema for validation.
list_domains
dub-cli list-domains
Retrieve a paginated list of domains for the authenticated workspace.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include archived domains in the response. Defaults to
falseif not provided. default:false.
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The search term to filter the domains by.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
page_size- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
50. exclusiveMinimum:0. default:50.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
update_domain
dub-cli update-domain
Update a domain for the authenticated workspace.
slug- Required
- Yes
- Type
- string
- Details
- Name of the domain. minLength:
1. maxLength:190.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when any link under this domain has expired. maxLength:
32000.
notFoundUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when a link under this domain doesn't exist. maxLength:
32000.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to archive this domain.
falsewill unarchive a previously archived domain. default:false.
placeholder- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. maxLength:
100.
logo- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
assetLinks- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- assetLinks.json configuration file (for deep link support on Android).
appleAppSiteAssociation- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- apple-app-site-association configuration file (for deep link support on iOS).
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.logo
input.logo anyOf branch 1
input.logo.anyOf1 anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.logo.anyOf1 anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.logo.anyOf1 anyOf branch 3
Native JSON value; inspect the full schema for validation.
input.logo anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.payload
slug- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Name of the domain. minLength:
1. maxLength:190.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when any link under this domain has expired. maxLength:
32000.
notFoundUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when a link under this domain doesn't exist. maxLength:
32000.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to archive this domain.
falsewill unarchive a previously archived domain. default:false.
placeholder- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. maxLength:
100.
logo- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
assetLinks- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- assetLinks.json configuration file (for deep link support on Android).
appleAppSiteAssociation- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- apple-app-site-association configuration file (for deep link support on iOS).
input.payload.logo
input.payload.logo anyOf branch 1
input.payload.logo.anyOf1 anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.logo.anyOf1 anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.payload.logo.anyOf1 anyOf branch 3
Native JSON value; inspect the full schema for validation.
input.payload.logo anyOf branch 2
Native JSON value; inspect the full schema for validation.
delete_domain
dub-cli delete-domain
Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
slug- Required
- Yes
- Type
- string
- Details
- The domain name.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
register_domain
dub-cli register-domain
Register a domain for the authenticated workspace. Only available for Enterprise Plans.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain to claim. We only support .link domains for now. minLength:
1. pattern:".*\\.link$".
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
domain- Required
- Yes
- Type
- string
- Details
- The domain to claim. We only support .link domains for now. minLength:
1. pattern:".*\\.link$".
check_domain_status
dub-cli check-domain-status
Check if a domain name is available for purchase. You can check multiple domains at once.
domains- Required
- Yes
- Type
- JSON
- Details
- The domains to search. We only support .link domains for now.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
input.domains
input.domains anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.domains anyOf branch 2
input.domains.anyOf2[]
Native JSON value; inspect the full schema for validation.
track_lead
dub-cli track-lead
Track a lead for a short link.
clickId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The unique ID of the click that the lead conversion event is attributed to. You can read this value from
dub_idcookie. [For deferred lead tracking]: If an empty string is provided, Dub will try to find an existing customer with the providedcustomerExternalIdand use theclickIdfrom the customer if found.
eventName- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the lead event to track. Can also be used as a unique identifier to associate a given lead event for a customer for a subsequent sale event (via the
leadEventNameprop in/track/sale). minLength:1. maxLength:255.
customerExternalId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer. minLength:
1. maxLength:100.
customerName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”). maxLength:
100. default:null.
customerEmail- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The email address of the customer. maxLength:
100. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". default:null. format:"email".
customerAvatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The avatar URL of the customer. default:
null.
mode- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The mode to use for tracking the lead event.
asyncwill not block the request;waitwill block the request until the lead event is fully recorded in Dub;deferredwill defer the lead event creation to a subsequent request. enum:["async", "wait", "deferred"]. default:"async".
eventQuantity- Required
- No; body/guard requirements still apply
- Type
- ['integer', 'null']
- Details
- The numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times. maximum:
100. exclusiveMinimum:0.
metadata- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Additional metadata to be stored with the lead event. Max 10,000 characters. default:
null.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
clickId- Required
- Yes
- Type
- string
- Details
- The unique ID of the click that the lead conversion event is attributed to. You can read this value from
dub_idcookie. [For deferred lead tracking]: If an empty string is provided, Dub will try to find an existing customer with the providedcustomerExternalIdand use theclickIdfrom the customer if found.
eventName- Required
- Yes
- Type
- string
- Details
- The name of the lead event to track. Can also be used as a unique identifier to associate a given lead event for a customer for a subsequent sale event (via the
leadEventNameprop in/track/sale). minLength:1. maxLength:255.
customerExternalId- Required
- Yes
- Type
- string
- Details
- The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer. minLength:
1. maxLength:100.
customerName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”). maxLength:
100. default:null.
customerEmail- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The email address of the customer. maxLength:
100. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". default:null. format:"email".
customerAvatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The avatar URL of the customer. default:
null.
mode- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The mode to use for tracking the lead event.
asyncwill not block the request;waitwill block the request until the lead event is fully recorded in Dub;deferredwill defer the lead event creation to a subsequent request. enum:["async", "wait", "deferred"]. default:"async".
eventQuantity- Required
- No; body/guard requirements still apply
- Type
- ['integer', 'null']
- Details
- The numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times. maximum:
100. exclusiveMinimum:0.
metadata- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Additional metadata to be stored with the lead event. Max 10,000 characters. default:
null.
track_sale
dub-cli track-sale
Track a sale for a short link.
customerExternalId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer. minLength:
1. maxLength:100.
amount- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g.
1580JPY). Learn more: https://d.to/currency minimum:0. maximum:9007199254740991.
currency- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The currency of the sale. Accepts ISO 4217 currency codes. Sales will be automatically converted and stored as USD at the latest exchange rates. Learn more: https://d.to/currency default:
"usd".
eventName- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the sale event. Recommended format:
Invoice paidorSubscription created. maxLength:255. default:"Purchase".
paymentProcessor- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The payment processor via which the sale was made. enum:
["stripe", "shopify", "polar", "paddle", "apple", "revenuecat", "lemonsqueezy", "dub", "custom"]. default:"custom".
invoiceId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID. default:
null.
metadata- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Additional metadata to be stored with the sale event. Max 10,000 characters when stringified. default:
null.
leadEventName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event for a link-customer combination, which is the default behavior). For direct sale tracking, this field can also be used to specify the lead event name. default:
null.
clickId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The unique ID of the click that the sale conversion event is attributed to. You can read this value from
dub_idcookie.
customerName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”). maxLength:
100. default:null.
customerEmail- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The email address of the customer. maxLength:
100. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". default:null. format:"email".
customerAvatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The avatar URL of the customer. default:
null.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
customerExternalId- Required
- Yes
- Type
- string
- Details
- The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer. minLength:
1. maxLength:100.
amount- Required
- Yes
- Type
- integer
- Details
- The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g.
1580JPY). Learn more: https://d.to/currency minimum:0. maximum:9007199254740991.
currency- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The currency of the sale. Accepts ISO 4217 currency codes. Sales will be automatically converted and stored as USD at the latest exchange rates. Learn more: https://d.to/currency default:
"usd".
eventName- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the sale event. Recommended format:
Invoice paidorSubscription created. maxLength:255. default:"Purchase".
paymentProcessor- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The payment processor via which the sale was made. enum:
["stripe", "shopify", "polar", "paddle", "apple", "revenuecat", "lemonsqueezy", "dub", "custom"]. default:"custom".
invoiceId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID. default:
null.
metadata- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Additional metadata to be stored with the sale event. Max 10,000 characters when stringified. default:
null.
leadEventName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event for a link-customer combination, which is the default behavior). For direct sale tracking, this field can also be used to specify the lead event name. default:
null.
clickId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The unique ID of the click that the sale conversion event is attributed to. You can read this value from
dub_idcookie.
customerName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”). maxLength:
100. default:null.
customerEmail- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The email address of the customer. maxLength:
100. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". default:null. format:"email".
customerAvatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The avatar URL of the customer. default:
null.
track_open
dub-cli track-open
This endpoint is used to track when a user opens your app via a Dub-powered deep link (for both iOS and Android).
deepLink- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The deep link that brought the user to the app. If left blank, Dub will fallback to probabilistic tracking by using the
dubDomainparameter to check if there is an associated click event for the user's IP address. Learn more: https://d.to/ddl maxLength:32000.
dubDomain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Your deep link custom domain on Dub (e.g.
acme.link). This is used in probabilistic tracking to check if there is an associated click event for the user's IP address. Learn more: https://d.to/ddl
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
deepLink- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The deep link that brought the user to the app. If left blank, Dub will fallback to probabilistic tracking by using the
dubDomainparameter to check if there is an associated click event for the user's IP address. Learn more: https://d.to/ddl maxLength:32000.
dubDomain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Your deep link custom domain on Dub (e.g.
acme.link). This is used in probabilistic tracking to check if there is an associated click event for the user's IP address. Learn more: https://d.to/ddl
list_customers
dub-cli list-customers
Retrieve a paginated list of customers for the authenticated workspace.
email- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A case-sensitive filter on the list based on the customer's
emailfield. The value must be a string. Takes precedence overexternalId.
external_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A case-sensitive filter on the list based on the customer's
externalIdfield. The value must be a string. Takes precedence oversearch.
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A search query to filter customers by email, name, or customer ID (
cus_...). IfemailorexternalIdis provided, this will be ignored.
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the customer's
countryfield.
link_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the customer's
linkIdfield (the referral link ID).
program_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Program ID to filter by.
partner_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Partner ID to filter by.
include_expanded_fields- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include expanded fields on the customer (
link,partner,discount).
sort_by- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the customers by. The default is
createdAt. enum:["createdAt", "saleAmount", "firstSaleAt", "subscriptionCanceledAt"]. default:"createdAt".
sort_order- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order. The default is
desc. enum:["asc", "desc"]. default:"desc".
ending_before- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results before this cursor. Mutually exclusive with
startingAfter.
starting_after- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results after this cursor. Mutually exclusive with
endingBefore.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- DEPRECATED. Use
startingAfterinstead. maximum:9007199254740991. exclusiveMinimum:0. Deprecated native compatibility field.
page_size- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
get_customer
dub-cli get-customer
Retrieve a customer by ID for the authenticated workspace. To retrieve a customer by external ID, prefix the ID with ext_.
id- Required
- Yes
- Type
- string
- Details
- The unique ID of the customer. You may use either the customer's
idon Dub (obtained via/customersendpoint) or theirexternalId(unique ID within your system, prefixed withext_, e.g.ext_123).
include_expanded_fields- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include expanded fields on the customer (
link,partner,discount).
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
update_customer
dub-cli update-customer
Update a customer for the authenticated workspace.
id- Required
- Yes
- Type
- string
- Details
- The unique ID of the customer. You may use either the customer's
idon Dub (obtained via/customersendpoint) or theirexternalId(unique ID within your system, prefixed withext_, e.g.ext_123).
include_expanded_fields- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include expanded fields on the customer (
link,partner,discount).
email- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's email address. pattern:
"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's name. If not provided, the email address will be used, and if email is not provided, a random name will be generated.
avatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's avatar URL. If not provided, a random avatar will be generated. format:
"uri".
externalId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The customer's unique identifier your database. This is useful for associating subsequent conversion events from Dub's API to your internal systems.
stripeCustomerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events).
subscriptionCanceledAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date the customer canceled their subscription. Set to a timestamp to mark the subscription as canceled, or
nullto clear it (e.g. if they resubscribe).
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
email- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's email address. pattern:
"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's name. If not provided, the email address will be used, and if email is not provided, a random name will be generated.
avatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's avatar URL. If not provided, a random avatar will be generated. format:
"uri".
externalId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The customer's unique identifier your database. This is useful for associating subsequent conversion events from Dub's API to your internal systems.
stripeCustomerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events).
subscriptionCanceledAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date the customer canceled their subscription. Set to a timestamp to mark the subscription as canceled, or
nullto clear it (e.g. if they resubscribe).
delete_customer
dub-cli delete-customer
Delete a customer from a workspace.
id- Required
- Yes
- Type
- string
- Details
- The unique ID of the customer. You may use either the customer's
idon Dub (obtained via/customersendpoint) or theirexternalId(unique ID within your system, prefixed withext_, e.g.ext_123).
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
create_partner
dub-cli create-partner
Creates or updates a partner record (upsert behavior). If a partner with the same email already exists, their program enrollment will be updated with the provided tenantId. If no existing partner is found, a new partner will be created using the supplied information.
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g.
john@acme.com) maxLength:100.
email- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The partner's email address. Partners will be able to claim their profile by signing up at
partners.dub.cowith this email. maxLength:190. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
username- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email. maxLength:
100.
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's avatar image. If not provided, a default avatar will be used.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner.
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The group ID to add the partner to. If not provided, the partner will be added to the default group.
country- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- A brief description of the partner and their background. Max 5,000 characters. maxLength:
5000.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.linkProps.tagIds
input.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagIds anyOf branch 2
input.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames
input.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames anyOf branch 2
input.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.testVariants
input.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.payload
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g.
john@acme.com) maxLength:100.
email- Required
- Yes
- Type
- string
- Details
- The partner's email address. Partners will be able to claim their profile by signing up at
partners.dub.cowith this email. maxLength:190. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
username- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email. maxLength:
100.
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's avatar image. If not provided, a default avatar will be used.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner.
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The group ID to add the partner to. If not provided, the partner will be added to the default group.
country- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- A brief description of the partner and their background. Max 5,000 characters. maxLength:
5000.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
input.payload.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.payload.linkProps.tagIds
input.payload.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.tagIds anyOf branch 2
input.payload.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.tagNames
input.payload.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.tagNames anyOf branch 2
input.payload.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.testVariants
input.payload.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
list_partners
dub-cli list-partners
List all partners for a partner program.
group_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the partner's
groupIdfield.
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the partner's
statusfield. enum:["pending", "approved", "rejected", "invited", "declined", "deactivated", "banned", "archived"].
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the partner's
countryfield.
sort_by- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the partners by. The default is
totalSaleAmount. enum:["createdAt", "totalClicks", "totalLeads", "totalConversions", "totalSaleAmount", "totalCommissions", "netRevenue", "earningsPerClick", "averageLifetimeValue", "clickToLeadRate", "clickToConversionRate", "leadToConversionRate", "returnOnAdSpend"]. default:"totalSaleAmount".
sort_order- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order. The default is
desc. enum:["asc", "desc"]. default:"desc".
email- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the partner list based on the partner's
email. The value must be a string. Takes precedence oversearch.
tenant_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the partner list based on the partner's
tenantId. The value must be a string. Combines with the other filters.
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A search query to filter partners by ID, name, email, company name, description, social platforms, or referral links. Partial matches are supported.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
page_size- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
create_partner_link
dub-cli create-partner-link
Create a link for a partner that is enrolled in your program.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
url- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to shorten (if not provided, the program's default URL will be used). maxLength:
32000.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.linkProps.tagIds
input.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagIds anyOf branch 2
input.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames
input.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames anyOf branch 2
input.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.testVariants
input.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.payload
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
url- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to shorten (if not provided, the program's default URL will be used). maxLength:
32000.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
input.payload.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.payload.linkProps.tagIds
input.payload.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.tagIds anyOf branch 2
input.payload.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.tagNames
input.payload.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.tagNames anyOf branch 2
input.payload.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.testVariants
input.payload.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
retrieve_partner_links
dub-cli retrieve-partner-links
Retrieve a partner's links by their partner ID or tenant ID.
partner_id- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenant_id- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
upsert_partner_link
dub-cli upsert-partner-link
Upsert a link for a partner that is enrolled in your program. If a link with the same URL already exists, return it (or update it if there are any changes). Otherwise, a new link will be created.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The URL to upsert for. maxLength:
32000.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.linkProps.tagIds
input.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagIds anyOf branch 2
input.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames
input.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames anyOf branch 2
input.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.testVariants
input.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.payload
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
url- Required
- Yes
- Type
- string
- Details
- The URL to upsert for. maxLength:
32000.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
input.payload.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.payload.linkProps.tagIds
input.payload.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.tagIds anyOf branch 2
input.payload.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.tagNames
input.payload.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.tagNames anyOf branch 2
input.payload.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.linkProps.testVariants
input.payload.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
retrieve_partner_analytics
dub-cli retrieve-partner-analytics
Retrieve analytics for a partner within a program. The response type vary based on the groupBy query parameter.
partner_id- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenant_id- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
interval- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The interval to retrieve analytics for. If undefined, defaults to 24h. enum:
["24h", "7d", "30d", "90d", "1y", "mtd", "qtd", "ytd", "all"].
start- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The start date and time when to retrieve analytics from. If set, takes precedence over
interval.
end- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with
start, takes precedence overinterval.
timezone- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. default:
"UTC".
query- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Search the events by a custom metadata value. Only available for lead and sale events. Examples:
metadata['key']:'value'maxLength:10000.
group_by- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The parameter to group the analytics data points by. Defaults to
countif undefined. enum:["top_links", "timeseries", "count"]. default:"count".
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
ban_partner
dub-cli ban-partner
Ban a partner from your program. This will disable all links and mark all commissions as canceled.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
reason- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The reason for banning the partner. enum:
["tos_violation", "inappropriate_content", "fake_traffic", "fraud", "spam", "brand_abuse"].
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
reason- Required
- Yes
- Type
- string
- Details
- The reason for banning the partner. enum:
["tos_violation", "inappropriate_content", "fake_traffic", "fraud", "spam", "brand_abuse"].
deactivate_partner
dub-cli deactivate-partner
This will deactivate the partner from your program and disable all their active links. Their commissions and payouts will remain intact. You can reactivate them later if needed.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
list_program_applications
dub-cli list-program-applications
Retrieve a paginated list of applications for your partner program. Filter by status to list pending, approved, or rejected applications.
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the partner's
countryfield.
group_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the partner's
groupIdfield.
sort_order- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order. The default is
desc. enum:["asc", "desc"]. default:"desc".
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter applications by name, email, or company name. Partial matches are supported. An exact partner ID is also matched.
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter applications by status. One of
pending,approved, orrejected. Defaults topending. enum:["pending", "approved", "rejected"]. default:"pending".
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
page_size- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
approve_program_application
dub-cli approve-program-application
Approve a pending partner application to your program. The partner will be enrolled in the specified group and notified of the approval.
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner to approve.
groupId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the group to assign the partner to. If not provided, the partner will be assigned to the group they applied to, or the program's default group if no application group is set.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to approve.
groupId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the group to assign the partner to. If not provided, the partner will be assigned to the group they applied to, or the program's default group if no application group is set.
reject_program_application
dub-cli reject-program-application
Reject a pending partner application to your program. The partner will be notified via email that their application was not approved.
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner to reject.
rejectionReason- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The reason for rejecting the partner application. This will be shared with the partner via email. enum:
["needsMoreDetail", "doesNotMeetRequirements", "notTheRightFit", "other"].
rejectionNote- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Additional details about the rejection. This will be shared with the partner via email. maxLength:
500.
reapplicationTimeframe- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The mode for reapplying for the program.
instant: The partner can reapply immediately.standard: The partner can reapply after 30 days.never: The partner can never reapply for the program. Defaults tostandardif undefined. enum:["instant", "standard", "never"]. default:"standard".
flagForFraud- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to flag the partner for fraud review by the Dub team. Cannot be combined with
reapplicationTimeframe: instant.
flagForFraudReason- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The reason for flagging the partner for fraud. Required when flagForFraud is true. maxLength:
2000.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to reject.
rejectionReason- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The reason for rejecting the partner application. This will be shared with the partner via email. enum:
["needsMoreDetail", "doesNotMeetRequirements", "notTheRightFit", "other"].
rejectionNote- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Additional details about the rejection. This will be shared with the partner via email. maxLength:
500.
reapplicationTimeframe- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The mode for reapplying for the program.
instant: The partner can reapply immediately.standard: The partner can reapply after 30 days.never: The partner can never reapply for the program. Defaults tostandardif undefined. enum:["instant", "standard", "never"]. default:"standard".
flagForFraud- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to flag the partner for fraud review by the Dub team. Cannot be combined with
reapplicationTimeframe: instant.
flagForFraudReason- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The reason for flagging the partner for fraud. Required when flagForFraud is true. maxLength:
2000.
list_discount_codes
dub-cli list-discount-codes
Retrieve a paginated list of discount codes in a program or filtered by partner, discount, or code.
partner_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner to retrieve discount codes for. If omitted, returns discount codes for the whole program.
discount_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter discount codes by discount ID.
code- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter discount codes by the alphanumeric code (e.g.
PARTNER10OFF).
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
page_size- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
create_discount_code
dub-cli create-discount-code
Create a discount code for a partner. The partner's group must already have a discount assigned to it, and the discount code must be associated with a link that is not already linked with another discount code.
code- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The discount code to create. If omitted, a unique code will be generated automatically from the partner's name. Stripe and Shopify codes can only contain letters, numbers, dashes, and underscores. Custom provider codes can contain any characters. maxLength:
100.
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner to create a discount code for.
linkId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner's referral link to associate this discount code with. Each link can only have one discount code.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
code- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The discount code to create. If omitted, a unique code will be generated automatically from the partner's name. Stripe and Shopify codes can only contain letters, numbers, dashes, and underscores. Custom provider codes can contain any characters. maxLength:
100.
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to create a discount code for.
linkId- Required
- Yes
- Type
- string
- Details
- The ID of the partner's referral link to associate this discount code with. Each link can only have one discount code.
delete_discount_code
dub-cli delete-discount-code
Delete a discount code for a partner by its unique ID or alphanumeric code. This will also disable the code in your connected discount provider (Stripe, Shopify, or custom via disccount.deleted webhook).
id_or_code- Required
- Yes
- Type
- string
- Details
- The unique ID (e.g.
dcode_...) or alphanumeric code (e.g.ABC123) of the discount code to delete.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
create_commission
dub-cli create-commission
Create one or more commissions (custom, lead or sale) for a partner. Custom commissions accept a negative amount to create a clawback. Commission creation is processed asynchronously – use the GET /commissions endpoint or webhooks to be notified when the commission is created.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
input.payload oneOf branch 1
type- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference. enum:
["custom"].
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to create the commission for.
amount- Required
- Yes
- Type
- number
- Details
- The commission earnings amount in cents. Use a negative amount to create a clawback.
date- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- If not provided, the current date will be used.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The description of the commission. Required for clawbacks (negative
amount). May be a known clawback reason (order_canceled,fraud,terms_violation,tracking_error,payment_failed,ineligible_partner,duplicate_commission) or an arbitrary string (max 190 characters). maxLength:190.
input.payload oneOf branch 2
type- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference. enum:
["lead"].
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to create the commission for.
customerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer ID to associate the commission with. Useful if the customer was already created in a prior operation and you want to associate the commission with it.
customer- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- The full customer object to associate the commission with. Useful for creating the customer on demand.
linkId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner link ID to associate the commission with. If not provided, default to the link with the most revenue.
date- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time of the lead event. If not provided, defaults to the current date and time.
lead- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- The lead event object to associate the commission with.
leadEventDate- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
dateinstead. The date and time of the lead event. If not provided, defaults to the current date and time. Deprecated native compatibility field.
leadEventName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
lead.eventNameinstead. The name of the lead event. If not provided, defaults to 'Sign up'. default:"Sign up". Deprecated native compatibility field.
input.payload.oneOf2.customer
email- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's email address. pattern:
"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's name. If not provided, the email address will be used, and if email is not provided, a random name will be generated.
avatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's avatar URL. If not provided, a random avatar will be generated. format:
"uri".
externalId- Required
- Yes
- Type
- string
- Details
- The customer's unique identifier your database. This is useful for associating subsequent conversion events from Dub's API to your internal systems.
stripeCustomerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
country- Required
- Yes
- Type
- string
- Details
- The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events).
input.payload.oneOf2.lead
eventName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The name of the lead event to track. If not provided, defaults to 'Sign up'. minLength:
1. maxLength:255.
metadata- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Additional metadata to be stored with the lead event. Max 10,000 characters. default:
null.
input.payload oneOf branch 3
type- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference. enum:
["sale"].
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to create the commission for.
customerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer ID to associate the commission with. Useful if the customer was already created in a prior operation and you want to associate the commission with it.
customer- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- The full customer object to associate the commission with. Useful for creating the customer on demand.
linkId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner link ID to associate the commission with. If neither
linkIdnordiscountCodeis provided, default to the link with the most revenue.
discountCode- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner discount code to resolve the associated link. Use this when the link ID is unknown. Cannot be provided together with
linkId. minLength:1.
importStripeInvoices- Required
- No; body/guard requirements still apply
- Type
- ['boolean', 'null']
- Details
- When
true, import all unimported paid Stripe invoices for the customer and create a commission for each. Whenfalse, create a single manual sale event usingsale.amount(or deprecatedsaleAmount). default:false.
date- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Only used when
importStripeInvoicesisfalse. The date of the manual sale event. Defaults to the current date and time if not provided.
sale- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- The sale event object to associate the commission with.
saleEventDate- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
dateinstead. Deprecated native compatibility field.
saleAmount- Required
- No; body/guard requirements still apply
- Type
- ['number', 'null']
- Details
- Deprecated: Use
sale.amountinstead. Deprecated native compatibility field.
invoiceId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
sale.invoiceIdinstead. Deprecated native compatibility field.
productId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
sale.metadata.productIdinstead. Deprecated native compatibility field.
input.payload.oneOf3.customer
email- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's email address. pattern:
"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's name. If not provided, the email address will be used, and if email is not provided, a random name will be generated.
avatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's avatar URL. If not provided, a random avatar will be generated. format:
"uri".
externalId- Required
- Yes
- Type
- string
- Details
- The customer's unique identifier your database. This is useful for associating subsequent conversion events from Dub's API to your internal systems.
stripeCustomerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
country- Required
- Yes
- Type
- string
- Details
- The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events).
input.payload.oneOf3.sale
amount- Required
- No; body/guard requirements still apply
- Type
- ['number', 'null']
- Details
- The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g.
1580JPY). Learn more: https://d.to/currency
currency- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The currency of the sale. Accepts ISO 4217 currency codes. Sales will be automatically converted and stored as USD at the latest exchange rates. Learn more: https://d.to/currency default:
"usd".
eventName- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the sale event. Recommended format:
Invoice paidorSubscription created. maxLength:255. default:"Purchase".
paymentProcessor- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The payment processor via which the sale was made. enum:
["stripe", "shopify", "polar", "paddle", "apple", "revenuecat", "lemonsqueezy", "dub", "custom"]. default:"custom".
invoiceId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID. default:
null.
metadata- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Additional metadata to be stored with the sale event. Max 10,000 characters when stringified. default:
null.
list_commissions
dub-cli list-commissions
Retrieve a paginated list of commissions for your partner program.
type- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by type. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples: - "sale" - "sale,lead" - "-click" enum:["click", "lead", "sale", "referral", "custom"].
customer_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated customer.
payout_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated payout.
bounty_submission_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated bounty submission.
partner_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated partner. When specified, takes precedence over
tenantId. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with-). Examples: - "partner_abc" - "partner_abc,partner_xyz" - "-partner_abc"
tenant_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated partner's
tenantId(their unique ID within your database).
group_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated partner group. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples: - "group_abc" - "group_abc,group_xyz" - "-group_abc"
partner_tag_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated partner tag. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples: - "ptag_abc" - "ptag_abc,ptag_xyz" - "-ptag_abc"
invoice_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated invoice. Since invoiceId is unique on a per-program basis, this will only return one commission per invoice.
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by their corresponding status. enum:
["pending", "processed", "paid", "refunded", "duplicate", "fraud", "canceled", "hold"].
sort_by- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the list of commissions by. enum:
["createdAt", "amount"]. default:"createdAt".
sort_order- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order for the list of commissions. enum:
["asc", "desc"]. default:"desc".
interval- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The interval to retrieve commissions for. enum:
["24h", "7d", "30d", "90d", "1y", "mtd", "qtd", "ytd", "all"]. default:"all".
start- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The start date of the date range to filter the commissions by.
end- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The end date of the date range to filter the commissions by.
timezone- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Native field; use the reviewed provider reference.
query- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter by lead or sale event metadata. Top-level keys only. Compares string values only : numeric and boolean metadata values are not matched. Examples: - "metadata['key']='value'" - "metadata['key']!='value'" maxLength:
10000.
ending_before- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results before this cursor. Mutually exclusive with
startingAfter.
starting_after- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results after this cursor. Mutually exclusive with
endingBefore.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- DEPRECATED. Use
startingAfterinstead. maximum:9007199254740991. exclusiveMinimum:0. Deprecated native compatibility field.
page_size- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
update_commission
dub-cli update-commission
Update an existing commission amount. This is useful for handling refunds (partial or full) or fraudulent sales.
id- Required
- Yes
- Type
- string
- Details
- The commission's unique ID on Dub.
earnings- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The new earnings amount for the commission. Paid commissions cannot be updated. If provided, will override the earnings calculated based on the sale amount and currency. minimum:
0.
saleAmount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The new absolute amount for the sale. Paid commissions cannot be updated. minimum:
0.
modifySaleAmount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- Modify the current sale amount: use positive values to increase the amount, negative values to decrease it. Takes precedence over
saleAmount. Paid commissions cannot be updated.
currency- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The currency of the sale amount to update. Accepts ISO 4217 currency codes. default:
"usd".
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Useful for marking a commission as pending, refunded, duplicate, canceled, or fraudulent. Takes precedence over
saleAmountandmodifySaleAmount. When a commission is marked as pending, refunded, duplicate, canceled, or fraudulent, it will be omitted from the payout, and the payout amount will be recalculated accordingly. Paid commissions cannot be updated. enum:["pending", "refunded", "duplicate", "canceled", "fraud"].
amount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- Deprecated. Use
saleAmountinstead. minimum:0. Deprecated native compatibility field.
modifyAmount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- Deprecated. Use
modifySaleAmountinstead. Deprecated native compatibility field.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
earnings- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The new earnings amount for the commission. Paid commissions cannot be updated. If provided, will override the earnings calculated based on the sale amount and currency. minimum:
0.
saleAmount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The new absolute amount for the sale. Paid commissions cannot be updated. minimum:
0.
modifySaleAmount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- Modify the current sale amount: use positive values to increase the amount, negative values to decrease it. Takes precedence over
saleAmount. Paid commissions cannot be updated.
currency- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The currency of the sale amount to update. Accepts ISO 4217 currency codes. default:
"usd".
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Useful for marking a commission as pending, refunded, duplicate, canceled, or fraudulent. Takes precedence over
saleAmountandmodifySaleAmount. When a commission is marked as pending, refunded, duplicate, canceled, or fraudulent, it will be omitted from the payout, and the payout amount will be recalculated accordingly. Paid commissions cannot be updated. enum:["pending", "refunded", "duplicate", "canceled", "fraud"].
amount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- Deprecated. Use
saleAmountinstead. minimum:0. Deprecated native compatibility field.
modifyAmount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- Deprecated. Use
modifySaleAmountinstead. Deprecated native compatibility field.
bulk_update_commissions
dub-cli bulk-update-commissions
Bulk update up to 100 commissions with the same status.
commissionIds- Required
- No; body/guard requirements still apply
- Type
- array
- Details
- Native field; use the reviewed provider reference. minItems:
1. maxItems:100.
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The status to apply to every commission in the batch. enum:
["pending", "refunded", "duplicate", "canceled", "fraud"].
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.commissionIds
input.commissionIds[]
Native JSON value; inspect the full schema for validation.
input.payload
commissionIds- Required
- Yes
- Type
- array
- Details
- Native field; use the reviewed provider reference. minItems:
1. maxItems:100.
status- Required
- Yes
- Type
- string
- Details
- The status to apply to every commission in the batch. enum:
["pending", "refunded", "duplicate", "canceled", "fraud"].
input.payload.commissionIds
input.payload.commissionIds[]
Native JSON value; inspect the full schema for validation.
list_payouts
dub-cli list-payouts
Retrieve a paginated list of payouts for your partner program.
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of payouts by their corresponding status. enum:
["pending", "processing", "processed", "sent", "completed", "failed", "canceled"].
partner_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of payouts by the associated partner. When specified, takes precedence over
tenantId.
tenant_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of payouts by the associated partner's
tenantId(their unique ID within your database).
invoice_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of payouts by invoice ID (the unique ID of the invoice you receive for each batch payout you process on Dub). Pending payouts will not have an invoice ID.
group_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of payouts by the associated partner group. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:group_abc,group_abc,group_xyz,-group_abc.
sort_by- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the list of payouts by. enum:
["amount", "initiatedAt", "paidAt"]. default:"amount".
sort_order- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order for the list of payouts. enum:
["asc", "desc"]. default:"desc".
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
page_size- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
create_referrals_embed_token
dub-cli create-referrals-embed-token
Create a referrals embed token for the given partner/tenant. The endpoint first attempts to locate an existing enrollment using the provided tenantId. If no enrollment is found, it resolves the partner by email and creates a new enrollment as needed. This results in an upsert-style flow that guarantees a valid enrollment and returns a usable embed token.
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Native field; use the reviewed provider reference.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Native field; use the reviewed provider reference.
partner- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Native field; use the reviewed provider reference.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
output_file- Required
- Yes
- Type
- string
- Details
- Required absolute new private file. Exclusive 0600 creation; never overwrites or echoes PNG/embed credentials. minLength:
1.
input.partner
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g.
john@acme.com) maxLength:100.
email- Required
- Yes
- Type
- string
- Details
- The partner's email address. Partners will be able to claim their profile by signing up at
partners.dub.cowith this email. maxLength:190. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
username- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email. maxLength:
100.
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's avatar image. If not provided, a default avatar will be used.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner.
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The group ID to add the partner to. If not provided, the partner will be added to the default group.
country- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- A brief description of the partner and their background. Max 5,000 characters. maxLength:
5000.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
input.partner.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.partner.linkProps.tagIds
input.partner.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.partner.linkProps.tagIds anyOf branch 2
input.partner.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.partner.linkProps.tagNames
input.partner.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.partner.linkProps.tagNames anyOf branch 2
input.partner.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.partner.linkProps.testVariants
input.partner.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.payload
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Native field; use the reviewed provider reference.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Native field; use the reviewed provider reference.
partner- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Native field; use the reviewed provider reference.
input.payload.partner
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g.
john@acme.com) maxLength:100.
email- Required
- Yes
- Type
- string
- Details
- The partner's email address. Partners will be able to claim their profile by signing up at
partners.dub.cowith this email. maxLength:190. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
username- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email. maxLength:
100.
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's avatar image. If not provided, a default avatar will be used.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner.
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The group ID to add the partner to. If not provided, the partner will be added to the default group.
country- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- A brief description of the partner and their background. Max 5,000 characters. maxLength:
5000.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
input.payload.partner.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.payload.partner.linkProps.tagIds
input.payload.partner.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.partner.linkProps.tagIds anyOf branch 2
input.payload.partner.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.partner.linkProps.tagNames
input.payload.partner.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.payload.partner.linkProps.tagNames anyOf branch 2
input.payload.partner.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.payload.partner.linkProps.testVariants
input.payload.partner.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
get_qr_code
dub-cli get-qr-code
Retrieve a QR code for a link.
url- Required
- Yes
- Type
- string
- Details
- The URL to generate a QR code for. maxLength:
32000.
logo- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The logo to include in the QR code. Can only be used with a paid plan on Dub.
size- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The size of the QR code in pixels. Defaults to
600if not provided. default:600.
level- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The level of error correction to use for the QR code. Defaults to
Lif not provided. enum:["L", "M", "Q", "H"]. default:"L".
fg_color- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The foreground color of the QR code in hex format. Defaults to
#000000if not provided. default:"#000000".
bg_color- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The background color of the QR code in hex format. Defaults to
#ffffffif not provided. default:"#FFFFFF".
hide_logo- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to hide the logo in the QR code. Can only be used with a paid plan on Dub. default:
false.
margin- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The size of the margin around the QR code. Defaults to 2 if not provided. default:
2.
include_margin- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- DEPRECATED: Margin is included by default. Use the
marginprop to customize the margin size. default:true. Deprecated native compatibility field.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
output_file- Required
- Yes
- Type
- string
- Details
- Required absolute new private file. Exclusive 0600 creation; never overwrites or echoes PNG/embed credentials. minLength:
1.
list_bounty_submissions
dub-cli list-bounty-submissions
List all submissions for a specific bounty in your partner program.
bounty_id- Required
- Yes
- Type
- string
- Details
- The unique ID of the bounty on Dub. Can be found in the URL of the bounty page, prefixed with
bnty_.
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The status of the submissions to list. enum:
["draft", "submitted", "approved", "rejected"].
group_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the group to list submissions for.
partner_id- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner to list submissions for.
sort_by- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the submissions by. enum:
["completedAt", "performanceCount", "socialMetricCount"]. default:"completedAt".
sort_order- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The order to sort the submissions by. enum:
["asc", "desc"]. default:"asc".
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
page_size- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
approve_bounty_submission
dub-cli approve-bounty-submission
Approve a bounty submission. Optionally specify a custom reward amount.
bounty_id- Required
- Yes
- Type
- string
- Details
- The ID of the bounty
submission_id- Required
- Yes
- Type
- string
- Details
- The ID of the bounty submission
rewardAmount- Required
- No; body/guard requirements still apply
- Type
- ['number', 'null']
- Details
- The reward amount for the performance-based bounty. Applicable if the bounty reward amount is not set.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
rewardAmount- Required
- No; body/guard requirements still apply
- Type
- ['number', 'null']
- Details
- The reward amount for the performance-based bounty. Applicable if the bounty reward amount is not set.
reject_bounty_submission
dub-cli reject-bounty-submission
Reject a bounty submission with a specified reason and optional note.
bounty_id- Required
- Yes
- Type
- string
- Details
- The ID of the bounty
submission_id- Required
- Yes
- Type
- string
- Details
- The ID of the bounty submission
rejectionReason- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The reason for rejecting the submission. enum:
["invalidProof", "duplicateSubmission", "outOfTimeWindow", "didNotMeetCriteria", "other"].
rejectionNote- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The note for rejecting the submission. maxLength:
5000.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact configured private workspace profile label; not a tenant or provider account ID.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Must be true for the requested mutation or exclusive private output file.
payload- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
payload_file- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. minLength:
1.
input.payload
rejectionReason- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The reason for rejecting the submission. enum:
["invalidProof", "duplicateSubmission", "outOfTimeWindow", "didNotMeetCriteria", "other"].
rejectionNote- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The note for rejecting the submission. maxLength:
5000.
list_accounts
dub-cli list-accounts
Local profile labels/default/auth method only. No keys, token paths, provider identity or network request.
Native JSON value; inspect the full schema for validation.
get_operation_schema
dub-cli get-operation-schema
Local reviewed method/path/query/body schema and provenance for one native tool. No credentials or provider request.
operation- Required
- Yes
- Type
- string
- Details
- Exact native tool name, e.g. create_link or approve_program_application. enum:
["create_link", "list_links", "get_links_count", "get_link", "update_link", "delete_link", "bulk_create_links", "bulk_update_links", "bulk_delete_links", "upsert_link", "get_link_stats", "list_events", "create_tag", "list_tags", "update_tag", "delete_tag", "create_folder", "list_folders", "update_folder", "delete_folder", "create_domain", "list_domains", "update_domain", "delete_domain", "register_domain", "check_domain_status", "track_lead", "track_sale", "track_open", "list_customers", "get_customer", "update_customer", "delete_customer", "create_partner", "list_partners", "create_partner_link", "retrieve_partner_links", "upsert_partner_link", "retrieve_partner_analytics", "ban_partner", "deactivate_partner", "list_program_applications", "approve_program_application", "reject_program_application", "list_discount_codes", "create_discount_code", "delete_discount_code", "create_commission", "list_commissions", "update_commission", "bulk_update_commissions", "list_payouts", "create_referrals_embed_token", "get_qr_code", "list_bounty_submissions", "approve_bounty_submission", "reject_bounty_submission"].
preview_link_batch
dub-cli preview-link-batch
Local validation and SHA-256 of exact ordered link/tag/folder work, selected profile label and reviewed schema. No provider reads, key load, identity check, price or rollback guarantee.
tasks- Required
- Yes
- Type
- array
- Details
- One to twenty ordered link/tag/folder operations. CLI repeats --tasks with individual JSON objects; native bulk work still counts all affected records. minItems:
1. maxItems:20.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact selected private workspace profile; binds label, not key ownership.
input.tasks
input.tasks[]
tool- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference. enum:
["create_link", "update_link", "delete_link", "bulk_create_links", "bulk_update_links", "bulk_delete_links", "upsert_link", "create_tag", "update_tag", "delete_tag", "create_folder", "update_folder", "delete_folder"].
arguments- Required
- Yes
- Type
- object
- Details
- Native tool arguments only; no account, confirm or payload_file. Use inline complete payload/native fields.
submit_link_batch
dub-cli submit-link-batch
Confirmed one-to-twenty ordered link/tag/folder tasks. Prevalidate all and verify exact hash before first request. Stop on first failure with known results/failed index/unattempted indices; no retries, rollback or implicit continuation.
tasks- Required
- Yes
- Type
- array
- Details
- One to twenty ordered link/tag/folder operations. CLI repeats --tasks with individual JSON objects; native bulk work still counts all affected records. minItems:
1. maxItems:20.
account- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Exact selected private workspace profile; binds label, not key ownership.
confirm- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Explicit approval for this exact requested ordered batch.
review_sha256- Required
- Yes
- Type
- string
- Details
- Exact preview_link_batch hash for identical requests, profile label, schema and order. pattern:
"^[a-f0-9]{64}$".
input.tasks
input.tasks[]
tool- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference. enum:
["create_link", "update_link", "delete_link", "bulk_create_links", "bulk_update_links", "bulk_delete_links", "upsert_link", "create_tag", "update_tag", "delete_tag", "create_folder", "update_folder", "delete_folder"].
arguments- Required
- Yes
- Type
- object
- Details
- Native tool arguments only; no account, confirm or payload_file. Use inline complete payload/native fields.
Native request contracts
The reviewed snapshot contains every current native route. Query/path flags map back to their native names below; body JSON retains native keys. Body requirements apply to either body flags or payload/file. Response union/plan/provider rules are not overridden by local schema acceptance.
##### createLink
POST /links
Native JSON value; inspect the full schema for validation.
url- Required
- Yes
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or
dub.shif the workspace has no domains). maxLength:190.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
keyLength- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The length of the short link slug. Defaults to 7 if not provided. When used with
prefix, the total length of the key will beprefix.length + keyLength. minimum:3. maximum:190.
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The prefix of the short link slug for randomly-generated keys (e.g. if prefix is
/c/, generated keys will be in the/c/:keyformat). Will be ignored ifkeyis provided.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Geo targeting information for the short link in JSON format
{[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
input.tagIds
input.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagIds anyOf branch 2
input.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.tagNames
input.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagNames anyOf branch 2
input.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.testVariants
input.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.webhookIds
input.webhookIds[]
Native JSON value; inspect the full schema for validation.
##### getLinks
GET /links
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain to filter the links by. E.g.
ac.me. If not provided, all links for the workspace will be returned.
tagId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: Use
tagIdsinstead. The tag ID to filter the links by. Deprecated native compatibility field.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The tag IDs to filter the links by.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The folder ID to filter the links by.
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
userId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The user ID to filter the links by.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant.
showArchived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include archived links in the response. Defaults to
falseif not provided. default:false.
withTags- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- DEPRECATED. Filter for links that have at least one tag assigned to them. default:
false. Deprecated native compatibility field.
endingBefore- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results before this cursor. Mutually exclusive with
startingAfter.
startingAfter- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results after this cursor. Mutually exclusive with
endingBefore.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- DEPRECATED. Use
startingAfterinstead. maximum:9007199254740991. exclusiveMinimum:0. Deprecated native compatibility field.
pageSize- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
input.tagIds
input.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagIds anyOf branch 2
input.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.tagNames
input.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagNames anyOf branch 2
input.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
No native JSON request body.
##### getLinksCount
GET /links/count
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain to filter the links by. E.g.
ac.me. If not provided, all links for the workspace will be returned.
tagId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: Use
tagIdsinstead. The tag ID to filter the links by. Deprecated native compatibility field.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The tag IDs to filter the links by.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The folder ID to filter the links by.
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
userId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The user ID to filter the links by.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant.
showArchived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include archived links in the response. Defaults to
falseif not provided. default:false.
withTags- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- DEPRECATED. Filter for links that have at least one tag assigned to them. default:
false. Deprecated native compatibility field.
groupBy- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The field to group the links by.
input.tagIds
input.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagIds anyOf branch 2
input.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.tagNames
input.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagNames anyOf branch 2
input.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.groupBy
input.groupBy anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.groupBy anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.groupBy anyOf branch 3
Native JSON value; inspect the full schema for validation.
input.groupBy anyOf branch 4
Native JSON value; inspect the full schema for validation.
No native JSON request body.
##### getLinkInfo
GET /links/info
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the link to retrieve. E.g. for
d.to/github, the domain isd.to. minLength:1.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The key of the link to retrieve. E.g. for
d.to/github, the key isgithub. minLength:1.
linkId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The unique ID of the short link.
externalId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- This is the ID of the link in the your database.
No native JSON request body.
##### updateLink
PATCH /links/{linkId}
linkId- Required
- Yes
- Type
- string
- Details
- The id of the link to update. You may use either
linkId(obtained via/links/infoendpoint) orexternalIdprefixed withext_.
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or
dub.shif the workspace has no domains). maxLength:190.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
input.tagIds
input.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagIds anyOf branch 2
input.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.tagNames
input.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagNames anyOf branch 2
input.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.image
input.image anyOf branch 1
input.image.anyOf1 anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.image.anyOf1 anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.image anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.geo
input.geo allOf branch 1
Geo targeting information for the short link in JSON format {[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
input.testVariants
input.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.webhookIds
input.webhookIds[]
Native JSON value; inspect the full schema for validation.
##### deleteLink
DELETE /links/{linkId}
linkId- Required
- Yes
- Type
- string
- Details
- The id of the link to delete. You may use either
linkId(obtained via/links/infoendpoint) orexternalIdprefixed withext_.
No native JSON request body.
##### bulkCreateLinks
POST /links/bulk
Native JSON value; inspect the full schema for validation.
input[]
url- Required
- Yes
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or
dub.shif the workspace has no domains). maxLength:190.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
keyLength- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The length of the short link slug. Defaults to 7 if not provided. When used with
prefix, the total length of the key will beprefix.length + keyLength. minimum:3. maximum:190.
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The prefix of the short link slug for randomly-generated keys (e.g. if prefix is
/c/, generated keys will be in the/c/:keyformat). Will be ignored ifkeyis provided.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Geo targeting information for the short link in JSON format
{[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
input[].tagIds
input[].tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input[].tagIds anyOf branch 2
input[].tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input[].tagNames
input[].tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input[].tagNames anyOf branch 2
input[].tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input[].testVariants
input[].testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input[].webhookIds
input[].webhookIds[]
Native JSON value; inspect the full schema for validation.
##### bulkUpdateLinks
PATCH /links/bulk
Native JSON value; inspect the full schema for validation.
linkIds- Required
- No; body/guard requirements still apply
- Type
- array
- Details
- The IDs of the links to update. Takes precedence over
externalIds. maxItems:100. default:[].
externalIds- Required
- No; body/guard requirements still apply
- Type
- array
- Details
- The external IDs of the links to update as stored in your database. maxItems:
100. default:[].
data- Required
- Yes
- Type
- object
- Details
- Native field; use the reviewed provider reference.
input.linkIds
input.linkIds[]
Native JSON value; inspect the full schema for validation.
input.externalIds
input.externalIds[]
Native JSON value; inspect the full schema for validation.
input.data
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Geo targeting information for the short link in JSON format
{[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
input.data.tagIds
input.data.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.data.tagIds anyOf branch 2
input.data.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.data.tagNames
input.data.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.data.tagNames anyOf branch 2
input.data.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.data.testVariants
input.data.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.data.webhookIds
input.data.webhookIds[]
Native JSON value; inspect the full schema for validation.
##### bulkDeleteLinks
DELETE /links/bulk
linkIds- Required
- Yes
- Type
- array
- Details
- Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored.
input.linkIds
input.linkIds[]
Native JSON value; inspect the full schema for validation.
No native JSON request body.
##### upsertLink
PUT /links/upsert
Native JSON value; inspect the full schema for validation.
url- Required
- Yes
- Type
- string
- Details
- The destination URL of the short link. maxLength:
32000.
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or
dub.shif the workspace has no domains). maxLength:190.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
keyLength- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The length of the short link slug. Defaults to 7 if not provided. When used with
prefix, the total length of the key will beprefix.length + keyLength. minimum:3. maximum:190.
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
programId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the program the short link is associated with.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner the short link is associated with.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The prefix of the short link slug for randomly-generated keys (e.g. if prefix is
/c/, generated keys will be in the/c/:keyformat). Will be ignored ifkeyis provided.
trackConversion- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to track conversions for the short link. Defaults to
falseif not provided.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
folderId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The unique ID existing folder to assign the short link to.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
geo- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Geo targeting information for the short link in JSON format
{[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
utm_source- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. maxLength:
255.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. maxLength:
255.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. maxLength:
255.
utm_term- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. maxLength:
255.
utm_content- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength:
255.
ref- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The referral tag of the short link. If set, this will populate or override the
refquery parameter in the destination URL. maxLength:255.
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
publicStats- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use
dashboardinstead. Whether the short link's stats are publicly accessible. Defaults tofalseif not provided. Deprecated native compatibility field.
tagId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
tagIdsinstead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field.
webhookIds- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. Deprecated native compatibility field.
input.tagIds
input.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagIds anyOf branch 2
input.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.tagNames
input.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.tagNames anyOf branch 2
input.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.testVariants
input.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
input.webhookIds
input.webhookIds[]
Native JSON value; inspect the full schema for validation.
##### retrieveAnalytics
GET /analytics
event- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The type of event to retrieve analytics for. Defaults to
clicks. enum:["clicks", "leads", "sales", "composite"]. default:"clicks".
groupBy- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The parameter to group the analytics data points by. Defaults to
countif undefined. enum:["count", "timeseries", "continents", "regions", "countries", "cities", "devices", "browsers", "os", "trigger", "triggers", "event_names", "referers", "referer_urls", "top_folders", "top_link_tags", "top_domains", "top_links", "top_urls", "top_base_urls", "top_partners", "top_groups", "top_partner_tags", "utm_sources", "utm_mediums", "utm_campaigns", "utm_terms", "utm_contents"]. default:"count".
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain to filter analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:dub.co,dub.co,google.com,-spam.com.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The slug of the short link to retrieve analytics for. Must be used along with the corresponding
domainof the short link to fetch analytics for a specific short link.
linkId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The unique ID of the link to retrieve analytics for.Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:link_123,link_123,link_456,-link_789.
externalId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the tenant that created the link inside your system. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:tenant_123,tenant_123,tenant_456,-tenant_789.
tagId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The tag ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:tag_123,tag_123,tag_456,-tag_789.
folderId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The folder ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:folder_123,folder_123,folder_456,-folder_789. If not provided, return analytics for all links.
partnerTagId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The partner tag ID(s) to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:ptag_123,ptag_123,ptag_456,-ptag_789.
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The group ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:grp_123,grp_123,grp_456,-grp_789.
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:pn_123,pn_123,pn_456,-pn_789.
customerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the customer to retrieve analytics for.
interval- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The interval to retrieve analytics for. If undefined, defaults to 24h. enum:
["24h", "7d", "30d", "90d", "1y", "mtd", "qtd", "ytd", "all"].
start- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The start date and time when to retrieve analytics from. If set, takes precedence over
interval.
end- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with
start, takes precedence overinterval.
timezone- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. default:
"UTC".
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code (see https://d.to/geo). Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:US,US,BR,FR,-US.
city- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The city to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:New York,New York,London,-New York.
region- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ISO 3166-2 region code to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:NY,NY,CA,-NY.
continent- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The continent to retrieve analytics for. Valid values: AF, AN, AS, EU, NA, OC, SA. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:NA,NA,EU,-AS.
device- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The device to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Desktop,Mobile,Tablet,-Mobile.
browser- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The browser to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Chrome,Chrome,Firefox,Safari,-IE.
os- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The OS to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Windows,Mac,Windows,Linux,-Windows.
trigger- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The trigger to retrieve analytics for. Valid values: qr, link, pageview. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:qr,qr,link,-qr. If undefined, returns all trigger types.
eventName- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The conversion event name to retrieve analytics for. Only available for lead and sale events. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Sign up,Sign up,Purchase,-Sign up.
referer- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The referer hostname to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:google.com,google.com,twitter.com,-facebook.com.
refererUrl- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The full referer URL to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:https://google.com,https://google.com,https://twitter.com,-https://spam.com.
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:https://example.com,https://example.com,https://other.com,-https://spam.com.
utm_source- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM source to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:google,google,twitter,-spam.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM medium to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:cpc,cpc,social,-email.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM campaign to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:summer_sale,summer_sale,winter_sale,-old_campaign.
utm_term- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM term to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-).
utm_content- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM content to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-).
root- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.
saleType- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both. enum:
["new", "recurring"].
query- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Search the events by a custom metadata value. Only available for lead and sale events. Examples:
metadata['key']:'value'maxLength:10000.
programId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: This is automatically inferred from your workspace's defaultProgramId. The ID of the program to retrieve analytics for. Deprecated native compatibility field.
tagIds- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: Use
tagIdinstead. The tag IDs to retrieve analytics for. Deprecated native compatibility field.
qr- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use the
triggerfield instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. Deprecated native compatibility field.
No native JSON request body.
##### listEvents
GET /events
event- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The type of event to retrieve analytics for. Defaults to 'clicks'. enum:
["clicks", "leads", "sales"]. default:"clicks".
domain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The domain to filter analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:dub.co,dub.co,google.com,-spam.com.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The slug of the short link to retrieve analytics for. Must be used along with the corresponding
domainof the short link to fetch analytics for a specific short link.
linkId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The unique ID of the link to retrieve analytics for.Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:link_123,link_123,link_456,-link_789.
externalId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the tenant that created the link inside your system. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:tenant_123,tenant_123,tenant_456,-tenant_789.
tagId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The tag ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:tag_123,tag_123,tag_456,-tag_789.
folderId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The folder ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:folder_123,folder_123,folder_456,-folder_789. If not provided, return analytics for all links.
partnerTagId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The partner tag ID(s) to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:ptag_123,ptag_123,ptag_456,-ptag_789.
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The group ID to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:grp_123,grp_123,grp_456,-grp_789.
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:pn_123,pn_123,pn_456,-pn_789.
customerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the customer to retrieve analytics for.
interval- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The interval to retrieve analytics for. If undefined, defaults to 24h. enum:
["24h", "7d", "30d", "90d", "1y", "mtd", "qtd", "ytd", "all"].
start- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The start date and time when to retrieve analytics from. If set, takes precedence over
interval.
end- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with
start, takes precedence overinterval.
timezone- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. default:
"UTC".
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code (see https://d.to/geo). Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:US,US,BR,FR,-US.
city- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The city to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:New York,New York,London,-New York.
region- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ISO 3166-2 region code to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:NY,NY,CA,-NY.
continent- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The continent to retrieve analytics for. Valid values: AF, AN, AS, EU, NA, OC, SA. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:NA,NA,EU,-AS.
device- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The device to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Desktop,Mobile,Tablet,-Mobile.
browser- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The browser to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Chrome,Chrome,Firefox,Safari,-IE.
os- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The OS to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Windows,Mac,Windows,Linux,-Windows.
trigger- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The trigger to retrieve analytics for. Valid values: qr, link, pageview. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:qr,qr,link,-qr. If undefined, returns all trigger types.
eventName- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The conversion event name to retrieve analytics for. Only available for lead and sale events. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:Sign up,Sign up,Purchase,-Sign up.
referer- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The referer hostname to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:google.com,google.com,twitter.com,-facebook.com.
refererUrl- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The full referer URL to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:https://google.com,https://google.com,https://twitter.com,-https://spam.com.
url- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The destination URL to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:https://example.com,https://example.com,https://other.com,-https://spam.com.
utm_source- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM source to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:google,google,twitter,-spam.
utm_medium- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM medium to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:cpc,cpc,social,-email.
utm_campaign- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM campaign to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:summer_sale,summer_sale,winter_sale,-old_campaign.
utm_term- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM term to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-).
utm_content- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The UTM content to retrieve analytics for. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-).
root- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.
saleType- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both. enum:
["new", "recurring"].
query- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Search the events by a custom metadata value. Only available for lead and sale events. Examples:
metadata['key']:'value'maxLength:10000.
programId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: This is automatically inferred from your workspace's defaultProgramId. The ID of the program to retrieve analytics for. Deprecated native compatibility field.
tagIds- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Deprecated: Use
tagIdinstead. The tag IDs to retrieve analytics for. Deprecated native compatibility field.
qr- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Deprecated: Use the
triggerfield instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. Deprecated native compatibility field.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0. default:1.
limit- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
1000. exclusiveMinimum:0. default:100.
sortOrder- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order. The default is
desc. enum:["asc", "desc"]. default:"desc".
sortBy- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the events by. The default is
timestamp. enum:["timestamp"]. default:"timestamp".
order- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- DEPRECATED. Use
sortOrderinstead. enum:["asc", "desc"]. default:"desc". Deprecated native compatibility field.
No native JSON request body.
##### createTag
POST /tags
Native JSON value; inspect the full schema for validation.
name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190.
color- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, brown, gray. enum:
["red", "yellow", "green", "blue", "purple", "brown", "gray", "pink"].
tag- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190. Deprecated native compatibility field.
##### getTags
GET /tags
sortBy- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the tags by. enum:
["name", "createdAt"]. default:"name".
sortOrder- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The order to sort the tags by. enum:
["asc", "desc"]. default:"asc".
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The search term to filter the tags by.
ids- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- IDs of tags to filter by.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
pageSize- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
input.ids
input.ids anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.ids anyOf branch 2
input.ids.anyOf2[]
Native JSON value; inspect the full schema for validation.
No native JSON request body.
##### updateTag
PATCH /tags/{id}
id- Required
- Yes
- Type
- string
- Details
- The ID of the tag to update.
name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190.
color- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, brown, gray. enum:
["red", "yellow", "green", "blue", "purple", "brown", "gray", "pink"].
tag- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the tag to create. minLength:
1. maxLength:190. Deprecated native compatibility field.
##### deleteTag
DELETE /tags/{id}
id- Required
- Yes
- Type
- string
- Details
- The ID of the tag to delete.
No native JSON request body.
##### createFolder
POST /folders
Native JSON value; inspect the full schema for validation.
name- Required
- Yes
- Type
- string
- Details
- The name of the folder. maxLength:
190.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The description of the folder. maxLength:
500.
accessLevel- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The workspace-level access level settings for the folder. Default is
writewhich allows full access to the folder for all team members. The other options areread(view-only access) andnull(no access) and are only available on Business plans and above. enum:["write", "read", null]. default:"write".
##### listFolders
GET /folders
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The search term to filter the folders by.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
pageSize- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
50. exclusiveMinimum:0. default:50.
No native JSON request body.
##### updateFolder
PATCH /folders/{id}
id- Required
- Yes
- Type
- string
- Details
- The ID of the folder to update.
name- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the folder. maxLength:
190.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The description of the folder. maxLength:
500.
accessLevel- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The access level of the folder within the workspace. enum:
["write", "read", null].
##### deleteFolder
DELETE /folders/{id}
id- Required
- Yes
- Type
- string
- Details
- The ID of the folder to delete.
No native JSON request body.
##### createDomain
POST /domains
Native JSON value; inspect the full schema for validation.
slug- Required
- Yes
- Type
- string
- Details
- Name of the domain. minLength:
1. maxLength:190.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when any link under this domain has expired. maxLength:
32000.
notFoundUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when a link under this domain doesn't exist. maxLength:
32000.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to archive this domain.
falsewill unarchive a previously archived domain. default:false.
placeholder- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. maxLength:
100.
logo- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
assetLinks- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- assetLinks.json configuration file (for deep link support on Android).
appleAppSiteAssociation- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- apple-app-site-association configuration file (for deep link support on iOS).
input.logo
input.logo anyOf branch 1
input.logo.anyOf1 anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.logo.anyOf1 anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.logo.anyOf1 anyOf branch 3
Native JSON value; inspect the full schema for validation.
input.logo anyOf branch 2
Native JSON value; inspect the full schema for validation.
##### listDomains
GET /domains
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include archived domains in the response. Defaults to
falseif not provided. default:false.
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The search term to filter the domains by.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
pageSize- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
50. exclusiveMinimum:0. default:50.
No native JSON request body.
##### updateDomain
PATCH /domains/{slug}
slug- Required
- Yes
- Type
- string
- Details
- The domain name.
slug- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Name of the domain. minLength:
1. maxLength:190.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when any link under this domain has expired. maxLength:
32000.
notFoundUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Redirect users to a specific URL when a link under this domain doesn't exist. maxLength:
32000.
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to archive this domain.
falsewill unarchive a previously archived domain. default:false.
placeholder- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. maxLength:
100.
logo- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- Native field; use the reviewed provider reference.
assetLinks- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- assetLinks.json configuration file (for deep link support on Android).
appleAppSiteAssociation- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- apple-app-site-association configuration file (for deep link support on iOS).
input.logo
input.logo anyOf branch 1
input.logo.anyOf1 anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.logo.anyOf1 anyOf branch 2
Native JSON value; inspect the full schema for validation.
input.logo.anyOf1 anyOf branch 3
Native JSON value; inspect the full schema for validation.
input.logo anyOf branch 2
Native JSON value; inspect the full schema for validation.
##### deleteDomain
DELETE /domains/{slug}
slug- Required
- Yes
- Type
- string
- Details
- The domain name.
No native JSON request body.
##### registerDomain
POST /domains/register
Native JSON value; inspect the full schema for validation.
domain- Required
- Yes
- Type
- string
- Details
- The domain to claim. We only support .link domains for now. minLength:
1. pattern:".*\\.link$".
##### checkDomainStatus
GET /domains/status
domains- Required
- Yes
- Type
- JSON
- Details
- The domains to search. We only support .link domains for now.
input.domains
input.domains anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.domains anyOf branch 2
input.domains.anyOf2[]
Native JSON value; inspect the full schema for validation.
No native JSON request body.
##### trackLead
POST /track/lead
Native JSON value; inspect the full schema for validation.
clickId- Required
- Yes
- Type
- string
- Details
- The unique ID of the click that the lead conversion event is attributed to. You can read this value from
dub_idcookie. [For deferred lead tracking]: If an empty string is provided, Dub will try to find an existing customer with the providedcustomerExternalIdand use theclickIdfrom the customer if found.
eventName- Required
- Yes
- Type
- string
- Details
- The name of the lead event to track. Can also be used as a unique identifier to associate a given lead event for a customer for a subsequent sale event (via the
leadEventNameprop in/track/sale). minLength:1. maxLength:255.
customerExternalId- Required
- Yes
- Type
- string
- Details
- The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer. minLength:
1. maxLength:100.
customerName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”). maxLength:
100. default:null.
customerEmail- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The email address of the customer. maxLength:
100. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". default:null. format:"email".
customerAvatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The avatar URL of the customer. default:
null.
mode- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The mode to use for tracking the lead event.
asyncwill not block the request;waitwill block the request until the lead event is fully recorded in Dub;deferredwill defer the lead event creation to a subsequent request. enum:["async", "wait", "deferred"]. default:"async".
eventQuantity- Required
- No; body/guard requirements still apply
- Type
- ['integer', 'null']
- Details
- The numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times. maximum:
100. exclusiveMinimum:0.
metadata- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Additional metadata to be stored with the lead event. Max 10,000 characters. default:
null.
##### trackSale
POST /track/sale
Native JSON value; inspect the full schema for validation.
customerExternalId- Required
- Yes
- Type
- string
- Details
- The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer. minLength:
1. maxLength:100.
amount- Required
- Yes
- Type
- integer
- Details
- The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g.
1580JPY). Learn more: https://d.to/currency minimum:0. maximum:9007199254740991.
currency- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The currency of the sale. Accepts ISO 4217 currency codes. Sales will be automatically converted and stored as USD at the latest exchange rates. Learn more: https://d.to/currency default:
"usd".
eventName- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the sale event. Recommended format:
Invoice paidorSubscription created. maxLength:255. default:"Purchase".
paymentProcessor- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The payment processor via which the sale was made. enum:
["stripe", "shopify", "polar", "paddle", "apple", "revenuecat", "lemonsqueezy", "dub", "custom"]. default:"custom".
invoiceId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID. default:
null.
metadata- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Additional metadata to be stored with the sale event. Max 10,000 characters when stringified. default:
null.
leadEventName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event for a link-customer combination, which is the default behavior). For direct sale tracking, this field can also be used to specify the lead event name. default:
null.
clickId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The unique ID of the click that the sale conversion event is attributed to. You can read this value from
dub_idcookie.
customerName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”). maxLength:
100. default:null.
customerEmail- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The email address of the customer. maxLength:
100. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". default:null. format:"email".
customerAvatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- [For direct sale tracking]: The avatar URL of the customer. default:
null.
##### trackOpen
POST /track/open
Native JSON value; inspect the full schema for validation.
deepLink- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The deep link that brought the user to the app. If left blank, Dub will fallback to probabilistic tracking by using the
dubDomainparameter to check if there is an associated click event for the user's IP address. Learn more: https://d.to/ddl maxLength:32000.
dubDomain- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Your deep link custom domain on Dub (e.g.
acme.link). This is used in probabilistic tracking to check if there is an associated click event for the user's IP address. Learn more: https://d.to/ddl
##### getCustomers
GET /customers
email- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A case-sensitive filter on the list based on the customer's
emailfield. The value must be a string. Takes precedence overexternalId.
externalId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A case-sensitive filter on the list based on the customer's
externalIdfield. The value must be a string. Takes precedence oversearch.
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A search query to filter customers by email, name, or customer ID (
cus_...). IfemailorexternalIdis provided, this will be ignored.
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the customer's
countryfield.
linkId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the customer's
linkIdfield (the referral link ID).
programId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Program ID to filter by.
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Partner ID to filter by.
includeExpandedFields- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include expanded fields on the customer (
link,partner,discount).
sortBy- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the customers by. The default is
createdAt. enum:["createdAt", "saleAmount", "firstSaleAt", "subscriptionCanceledAt"]. default:"createdAt".
sortOrder- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order. The default is
desc. enum:["asc", "desc"]. default:"desc".
endingBefore- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results before this cursor. Mutually exclusive with
startingAfter.
startingAfter- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results after this cursor. Mutually exclusive with
endingBefore.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- DEPRECATED. Use
startingAfterinstead. maximum:9007199254740991. exclusiveMinimum:0. Deprecated native compatibility field.
pageSize- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
No native JSON request body.
##### getCustomer
GET /customers/{id}
id- Required
- Yes
- Type
- string
- Details
- The unique ID of the customer. You may use either the customer's
idon Dub (obtained via/customersendpoint) or theirexternalId(unique ID within your system, prefixed withext_, e.g.ext_123).
includeExpandedFields- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include expanded fields on the customer (
link,partner,discount).
No native JSON request body.
##### updateCustomer
PATCH /customers/{id}
id- Required
- Yes
- Type
- string
- Details
- The unique ID of the customer. You may use either the customer's
idon Dub (obtained via/customersendpoint) or theirexternalId(unique ID within your system, prefixed withext_, e.g.ext_123).
includeExpandedFields- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to include expanded fields on the customer (
link,partner,discount).
email- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's email address. pattern:
"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's name. If not provided, the email address will be used, and if email is not provided, a random name will be generated.
avatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's avatar URL. If not provided, a random avatar will be generated. format:
"uri".
externalId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The customer's unique identifier your database. This is useful for associating subsequent conversion events from Dub's API to your internal systems.
stripeCustomerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events).
subscriptionCanceledAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date the customer canceled their subscription. Set to a timestamp to mark the subscription as canceled, or
nullto clear it (e.g. if they resubscribe).
##### deleteCustomer
DELETE /customers/{id}
id- Required
- Yes
- Type
- string
- Details
- The unique ID of the customer. You may use either the customer's
idon Dub (obtained via/customersendpoint) or theirexternalId(unique ID within your system, prefixed withext_, e.g.ext_123).
No native JSON request body.
##### createPartner
POST /partners
Native JSON value; inspect the full schema for validation.
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g.
john@acme.com) maxLength:100.
email- Required
- Yes
- Type
- string
- Details
- The partner's email address. Partners will be able to claim their profile by signing up at
partners.dub.cowith this email. maxLength:190. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
username- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email. maxLength:
100.
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's avatar image. If not provided, a default avatar will be used.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner.
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The group ID to add the partner to. If not provided, the partner will be added to the default group.
country- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- A brief description of the partner and their background. Max 5,000 characters. maxLength:
5000.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
input.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.linkProps.tagIds
input.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagIds anyOf branch 2
input.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames
input.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames anyOf branch 2
input.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.testVariants
input.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
##### listPartners
GET /partners
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the partner's
groupIdfield.
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the partner's
statusfield. enum:["pending", "approved", "rejected", "invited", "declined", "deactivated", "banned", "archived"].
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the partner's
countryfield.
sortBy- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the partners by. The default is
totalSaleAmount. enum:["createdAt", "totalClicks", "totalLeads", "totalConversions", "totalSaleAmount", "totalCommissions", "netRevenue", "earningsPerClick", "averageLifetimeValue", "clickToLeadRate", "clickToConversionRate", "leadToConversionRate", "returnOnAdSpend"]. default:"totalSaleAmount".
sortOrder- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order. The default is
desc. enum:["asc", "desc"]. default:"desc".
email- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the partner list based on the partner's
email. The value must be a string. Takes precedence oversearch.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the partner list based on the partner's
tenantId. The value must be a string. Combines with the other filters.
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A search query to filter partners by ID, name, email, company name, description, social platforms, or referral links. Partial matches are supported.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
pageSize- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
No native JSON request body.
##### createPartnerLink
POST /partners/links
Native JSON value; inspect the full schema for validation.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
url- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to shorten (if not provided, the program's default URL will be used). maxLength:
32000.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
input.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.linkProps.tagIds
input.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagIds anyOf branch 2
input.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames
input.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames anyOf branch 2
input.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.testVariants
input.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
##### retrievePartnerLinks
GET /partners/links
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
No native JSON request body.
##### upsertPartnerLink
PUT /partners/links/upsert
Native JSON value; inspect the full schema for validation.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
url- Required
- Yes
- Type
- string
- Details
- The URL to upsert for. maxLength:
32000.
key- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The short link slug. If not provided, a random 7-character slug will be generated. maxLength:
190.
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
input.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.linkProps.tagIds
input.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagIds anyOf branch 2
input.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames
input.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.linkProps.tagNames anyOf branch 2
input.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.linkProps.testVariants
input.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
##### retrievePartnerAnalytics
GET /partners/analytics
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
interval- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The interval to retrieve analytics for. If undefined, defaults to 24h. enum:
["24h", "7d", "30d", "90d", "1y", "mtd", "qtd", "ytd", "all"].
start- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The start date and time when to retrieve analytics from. If set, takes precedence over
interval.
end- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with
start, takes precedence overinterval.
timezone- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. default:
"UTC".
query- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Search the events by a custom metadata value. Only available for lead and sale events. Examples:
metadata['key']:'value'maxLength:10000.
groupBy- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The parameter to group the analytics data points by. Defaults to
countif undefined. enum:["top_links", "timeseries", "count"]. default:"count".
No native JSON request body.
##### banPartner
POST /partners/ban
Native JSON value; inspect the full schema for validation.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
reason- Required
- Yes
- Type
- string
- Details
- The reason for banning the partner. enum:
["tos_violation", "inappropriate_content", "fake_traffic", "fraud", "spam", "brand_abuse"].
##### deactivatePartner
POST /partners/deactivate
Native JSON value; inspect the full schema for validation.
partnerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner to create a link for. Will take precedence over
tenantIdif provided.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the partner in your system. If both
partnerIdandtenantIdare not provided, an error will be thrown.
##### listProgramApplications
GET /program-applications
country- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the partner's
countryfield.
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- A filter on the list based on the partner's
groupIdfield.
sortOrder- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order. The default is
desc. enum:["asc", "desc"]. default:"desc".
search- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter applications by name, email, or company name. Partial matches are supported. An exact partner ID is also matched.
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter applications by status. One of
pending,approved, orrejected. Defaults topending. enum:["pending", "approved", "rejected"]. default:"pending".
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
pageSize- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
No native JSON request body.
##### approveProgramApplication
POST /program-applications/approve
Native JSON value; inspect the full schema for validation.
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to approve.
groupId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the group to assign the partner to. If not provided, the partner will be assigned to the group they applied to, or the program's default group if no application group is set.
##### rejectProgramApplication
POST /program-applications/reject
Native JSON value; inspect the full schema for validation.
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to reject.
rejectionReason- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The reason for rejecting the partner application. This will be shared with the partner via email. enum:
["needsMoreDetail", "doesNotMeetRequirements", "notTheRightFit", "other"].
rejectionNote- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Additional details about the rejection. This will be shared with the partner via email. maxLength:
500.
reapplicationTimeframe- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The mode for reapplying for the program.
instant: The partner can reapply immediately.standard: The partner can reapply after 30 days.never: The partner can never reapply for the program. Defaults tostandardif undefined. enum:["instant", "standard", "never"]. default:"standard".
flagForFraud- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to flag the partner for fraud review by the Dub team. Cannot be combined with
reapplicationTimeframe: instant.
flagForFraudReason- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The reason for flagging the partner for fraud. Required when flagForFraud is true. maxLength:
2000.
##### listDiscountCodes
GET /discount-codes
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner to retrieve discount codes for. If omitted, returns discount codes for the whole program.
discountId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter discount codes by discount ID.
code- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter discount codes by the alphanumeric code (e.g.
PARTNER10OFF).
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
pageSize- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
No native JSON request body.
##### createDiscountCode
POST /discount-codes
Native JSON value; inspect the full schema for validation.
code- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The discount code to create. If omitted, a unique code will be generated automatically from the partner's name. Stripe and Shopify codes can only contain letters, numbers, dashes, and underscores. Custom provider codes can contain any characters. maxLength:
100.
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to create a discount code for.
linkId- Required
- Yes
- Type
- string
- Details
- The ID of the partner's referral link to associate this discount code with. Each link can only have one discount code.
##### deleteDiscountCode
DELETE /discount-codes/{idOrCode}
idOrCode- Required
- Yes
- Type
- string
- Details
- The unique ID (e.g.
dcode_...) or alphanumeric code (e.g.ABC123) of the discount code to delete.
No native JSON request body.
##### createCommission
POST /commissions
Native JSON value; inspect the full schema for validation.
input oneOf branch 1
type- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference. enum:
["custom"].
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to create the commission for.
amount- Required
- Yes
- Type
- number
- Details
- The commission earnings amount in cents. Use a negative amount to create a clawback.
date- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- If not provided, the current date will be used.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The description of the commission. Required for clawbacks (negative
amount). May be a known clawback reason (order_canceled,fraud,terms_violation,tracking_error,payment_failed,ineligible_partner,duplicate_commission) or an arbitrary string (max 190 characters). maxLength:190.
input oneOf branch 2
type- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference. enum:
["lead"].
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to create the commission for.
customerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer ID to associate the commission with. Useful if the customer was already created in a prior operation and you want to associate the commission with it.
customer- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- The full customer object to associate the commission with. Useful for creating the customer on demand.
linkId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner link ID to associate the commission with. If not provided, default to the link with the most revenue.
date- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time of the lead event. If not provided, defaults to the current date and time.
lead- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- The lead event object to associate the commission with.
leadEventDate- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
dateinstead. The date and time of the lead event. If not provided, defaults to the current date and time. Deprecated native compatibility field.
leadEventName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
lead.eventNameinstead. The name of the lead event. If not provided, defaults to 'Sign up'. default:"Sign up". Deprecated native compatibility field.
input.oneOf2.customer
email- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's email address. pattern:
"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's name. If not provided, the email address will be used, and if email is not provided, a random name will be generated.
avatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's avatar URL. If not provided, a random avatar will be generated. format:
"uri".
externalId- Required
- Yes
- Type
- string
- Details
- The customer's unique identifier your database. This is useful for associating subsequent conversion events from Dub's API to your internal systems.
stripeCustomerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
country- Required
- Yes
- Type
- string
- Details
- The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events).
input.oneOf2.lead
eventName- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The name of the lead event to track. If not provided, defaults to 'Sign up'. minLength:
1. maxLength:255.
metadata- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Additional metadata to be stored with the lead event. Max 10,000 characters. default:
null.
input oneOf branch 3
type- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference. enum:
["sale"].
partnerId- Required
- Yes
- Type
- string
- Details
- The ID of the partner to create the commission for.
customerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer ID to associate the commission with. Useful if the customer was already created in a prior operation and you want to associate the commission with it.
customer- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- The full customer object to associate the commission with. Useful for creating the customer on demand.
linkId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner link ID to associate the commission with. If neither
linkIdnordiscountCodeis provided, default to the link with the most revenue.
discountCode- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner discount code to resolve the associated link. Use this when the link ID is unknown. Cannot be provided together with
linkId. minLength:1.
importStripeInvoices- Required
- No; body/guard requirements still apply
- Type
- ['boolean', 'null']
- Details
- When
true, import all unimported paid Stripe invoices for the customer and create a commission for each. Whenfalse, create a single manual sale event usingsale.amount(or deprecatedsaleAmount). default:false.
date- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Only used when
importStripeInvoicesisfalse. The date of the manual sale event. Defaults to the current date and time if not provided.
sale- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- The sale event object to associate the commission with.
saleEventDate- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
dateinstead. Deprecated native compatibility field.
saleAmount- Required
- No; body/guard requirements still apply
- Type
- ['number', 'null']
- Details
- Deprecated: Use
sale.amountinstead. Deprecated native compatibility field.
invoiceId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
sale.invoiceIdinstead. Deprecated native compatibility field.
productId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- Deprecated: Use
sale.metadata.productIdinstead. Deprecated native compatibility field.
input.oneOf3.customer
email- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's email address. pattern:
"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's name. If not provided, the email address will be used, and if email is not provided, a random name will be generated.
avatar- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's avatar URL. If not provided, a random avatar will be generated. format:
"uri".
externalId- Required
- Yes
- Type
- string
- Details
- The customer's unique identifier your database. This is useful for associating subsequent conversion events from Dub's API to your internal systems.
stripeCustomerId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
country- Required
- Yes
- Type
- string
- Details
- The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events).
input.oneOf3.sale
amount- Required
- No; body/guard requirements still apply
- Type
- ['number', 'null']
- Details
- The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g.
1580JPY). Learn more: https://d.to/currency
currency- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The currency of the sale. Accepts ISO 4217 currency codes. Sales will be automatically converted and stored as USD at the latest exchange rates. Learn more: https://d.to/currency default:
"usd".
eventName- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The name of the sale event. Recommended format:
Invoice paidorSubscription created. maxLength:255. default:"Purchase".
paymentProcessor- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The payment processor via which the sale was made. enum:
["stripe", "shopify", "polar", "paddle", "apple", "revenuecat", "lemonsqueezy", "dub", "custom"]. default:"custom".
invoiceId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID. default:
null.
metadata- Required
- No; body/guard requirements still apply
- Type
- ['object', 'null']
- Details
- Additional metadata to be stored with the sale event. Max 10,000 characters when stringified. default:
null.
##### listCommissions
GET /commissions
type- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by type. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples: - "sale" - "sale,lead" - "-click" enum:["click", "lead", "sale", "referral", "custom"].
customerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated customer.
payoutId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated payout.
bountySubmissionId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated bounty submission.
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated partner. When specified, takes precedence over
tenantId. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with-). Examples: - "partner_abc" - "partner_abc,partner_xyz" - "-partner_abc"
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated partner's
tenantId(their unique ID within your database).
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated partner group. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples: - "group_abc" - "group_abc,group_xyz" - "-group_abc"
partnerTagId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated partner tag. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples: - "ptag_abc" - "ptag_abc,ptag_xyz" - "-ptag_abc"
invoiceId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by the associated invoice. Since invoiceId is unique on a per-program basis, this will only return one commission per invoice.
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of commissions by their corresponding status. enum:
["pending", "processed", "paid", "refunded", "duplicate", "fraud", "canceled", "hold"].
sortBy- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the list of commissions by. enum:
["createdAt", "amount"]. default:"createdAt".
sortOrder- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order for the list of commissions. enum:
["asc", "desc"]. default:"desc".
interval- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The interval to retrieve commissions for. enum:
["24h", "7d", "30d", "90d", "1y", "mtd", "qtd", "ytd", "all"]. default:"all".
start- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The start date of the date range to filter the commissions by.
end- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The end date of the date range to filter the commissions by.
timezone- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Native field; use the reviewed provider reference.
query- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter by lead or sale event metadata. Top-level keys only. Compares string values only : numeric and boolean metadata values are not matched. Examples: - "metadata['key']='value'" - "metadata['key']!='value'" maxLength:
10000.
endingBefore- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results before this cursor. Mutually exclusive with
startingAfter.
startingAfter- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- If specified, the query only searches for results after this cursor. Mutually exclusive with
endingBefore.
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- DEPRECATED. Use
startingAfterinstead. maximum:9007199254740991. exclusiveMinimum:0. Deprecated native compatibility field.
pageSize- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
No native JSON request body.
##### updateCommission
PATCH /commissions/{id}
id- Required
- Yes
- Type
- string
- Details
- The commission's unique ID on Dub.
earnings- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The new earnings amount for the commission. Paid commissions cannot be updated. If provided, will override the earnings calculated based on the sale amount and currency. minimum:
0.
saleAmount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The new absolute amount for the sale. Paid commissions cannot be updated. minimum:
0.
modifySaleAmount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- Modify the current sale amount: use positive values to increase the amount, negative values to decrease it. Takes precedence over
saleAmount. Paid commissions cannot be updated.
currency- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The currency of the sale amount to update. Accepts ISO 4217 currency codes. default:
"usd".
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Useful for marking a commission as pending, refunded, duplicate, canceled, or fraudulent. Takes precedence over
saleAmountandmodifySaleAmount. When a commission is marked as pending, refunded, duplicate, canceled, or fraudulent, it will be omitted from the payout, and the payout amount will be recalculated accordingly. Paid commissions cannot be updated. enum:["pending", "refunded", "duplicate", "canceled", "fraud"].
amount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- Deprecated. Use
saleAmountinstead. minimum:0. Deprecated native compatibility field.
modifyAmount- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- Deprecated. Use
modifySaleAmountinstead. Deprecated native compatibility field.
##### bulkUpdateCommissions
PATCH /commissions/bulk
Native JSON value; inspect the full schema for validation.
commissionIds- Required
- Yes
- Type
- array
- Details
- Native field; use the reviewed provider reference. minItems:
1. maxItems:100.
status- Required
- Yes
- Type
- string
- Details
- The status to apply to every commission in the batch. enum:
["pending", "refunded", "duplicate", "canceled", "fraud"].
input.commissionIds
input.commissionIds[]
Native JSON value; inspect the full schema for validation.
##### listPayouts
GET /payouts
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of payouts by their corresponding status. enum:
["pending", "processing", "processed", "sent", "completed", "failed", "canceled"].
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of payouts by the associated partner. When specified, takes precedence over
tenantId.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of payouts by the associated partner's
tenantId(their unique ID within your database).
invoiceId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of payouts by invoice ID (the unique ID of the invoice you receive for each batch payout you process on Dub). Pending payouts will not have an invoice ID.
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Filter the list of payouts by the associated partner group. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with
-). Examples:group_abc,group_abc,group_xyz,-group_abc.
sortBy- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the list of payouts by. enum:
["amount", "initiatedAt", "paidAt"]. default:"amount".
sortOrder- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The sort order for the list of payouts. enum:
["asc", "desc"]. default:"desc".
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
pageSize- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
No native JSON request body.
##### createReferralsEmbedToken
POST /tokens/embed/referrals
Native JSON value; inspect the full schema for validation.
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Native field; use the reviewed provider reference.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Native field; use the reviewed provider reference.
partner- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Native field; use the reviewed provider reference.
input.partner
name- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g.
john@acme.com) maxLength:100.
email- Required
- Yes
- Type
- string
- Details
- The partner's email address. Partners will be able to claim their profile by signing up at
partners.dub.cowith this email. maxLength:190. pattern:"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$". format:"email".
username- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email. maxLength:
100.
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's avatar image. If not provided, a default avatar will be used.
tenantId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner.
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The group ID to add the partner to. If not provided, the partner will be added to the default group.
country- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information.
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- A brief description of the partner and their background. Max 5,000 characters. maxLength:
5000.
linkProps- Required
- No; body/guard requirements still apply
- Type
- object
- Details
- Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
input.partner.linkProps
externalId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. Pass
nullor an empty string to remove it. maxLength:255.
tenantId- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. Pass
nullor an empty string to remove it. maxLength:255.
prefix- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- Path prefix for each default referral link slug (e.g.
/c/→https://{domain}/c/{identity}). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g.c/jane-a7f2).
archived- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link is archived. Defaults to
falseif not provided.
tagIds- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique IDs of the tags assigned to the short link.
tagNames- Required
- No; body/guard requirements still apply
- Type
- JSON
- Details
- The unique name of the tags assigned to the short link (case insensitive).
comments- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The comments for the short link.
expiresAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the short link will expire at.
expiredUrl- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The URL to redirect to when the short link has expired. maxLength:
32000.
password- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The password required to access the destination URL of the short link.
proxy- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses Custom Link Previews feature. Defaults to
falseif not provided.
title- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview title (og:title). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
description- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview description (og:description). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
image- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview image (og:image). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
video- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The custom link preview video (og:video). Will be used for Custom Link Previews if
proxyis true. Learn more: https://d.to/og
rewrite- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether the short link uses link cloaking. Defaults to
falseif not provided.
ios- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The iOS destination URL for the short link for iOS device targeting. maxLength:
32000.
android- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The Android destination URL for the short link for Android device targeting. maxLength:
32000.
doIndex- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Allow search engines to index your short link. Defaults to
falseif not provided. Learn more: https://d.to/noindex
testVariants- Required
- No; body/guard requirements still apply
- Type
- ['array', 'null']
- Details
- An array of A/B test URLs and the percentage of traffic to send to each URL. minItems:
2. maxItems:4.
testStartedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests started.
testCompletedAt- Required
- No; body/guard requirements still apply
- Type
- ['string', 'null']
- Details
- The date and time when the tests were or will be completed.
input.partner.linkProps.tagIds
input.partner.linkProps.tagIds anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.partner.linkProps.tagIds anyOf branch 2
input.partner.linkProps.tagIds.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.partner.linkProps.tagNames
input.partner.linkProps.tagNames anyOf branch 1
Native JSON value; inspect the full schema for validation.
input.partner.linkProps.tagNames anyOf branch 2
input.partner.linkProps.tagNames.anyOf2[]
Native JSON value; inspect the full schema for validation.
input.partner.linkProps.testVariants
input.partner.linkProps.testVariants[]
url- Required
- Yes
- Type
- string
- Details
- Native field; use the reviewed provider reference.
percentage- Required
- Yes
- Type
- number
- Details
- Native field; use the reviewed provider reference. minimum:
10. maximum:90.
##### getQRCode
GET /qr
url- Required
- Yes
- Type
- string
- Details
- The URL to generate a QR code for. maxLength:
32000.
logo- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The logo to include in the QR code. Can only be used with a paid plan on Dub.
size- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The size of the QR code in pixels. Defaults to
600if not provided. default:600.
level- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The level of error correction to use for the QR code. Defaults to
Lif not provided. enum:["L", "M", "Q", "H"]. default:"L".
fgColor- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The foreground color of the QR code in hex format. Defaults to
#000000if not provided. default:"#000000".
bgColor- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The background color of the QR code in hex format. Defaults to
#ffffffif not provided. default:"#FFFFFF".
hideLogo- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- Whether to hide the logo in the QR code. Can only be used with a paid plan on Dub. default:
false.
margin- Required
- No; body/guard requirements still apply
- Type
- number
- Details
- The size of the margin around the QR code. Defaults to 2 if not provided. default:
2.
includeMargin- Required
- No; body/guard requirements still apply
- Type
- boolean
- Details
- DEPRECATED: Margin is included by default. Use the
marginprop to customize the margin size. default:true. Deprecated native compatibility field.
No native JSON request body.
##### listBountySubmissions
GET /bounties/{bountyId}/submissions
bountyId- Required
- Yes
- Type
- string
- Details
- The unique ID of the bounty on Dub. Can be found in the URL of the bounty page, prefixed with
bnty_.
status- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The status of the submissions to list. enum:
["draft", "submitted", "approved", "rejected"].
groupId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the group to list submissions for.
partnerId- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The ID of the partner to list submissions for.
sortBy- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The field to sort the submissions by. enum:
["completedAt", "performanceCount", "socialMetricCount"]. default:"completedAt".
sortOrder- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The order to sort the submissions by. enum:
["asc", "desc"]. default:"asc".
page- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The page number for pagination. The first page is
1. maximum:9007199254740991. exclusiveMinimum:0.
pageSize- Required
- No; body/guard requirements still apply
- Type
- integer
- Details
- The number of items per page. maximum:
100. exclusiveMinimum:0. default:100.
No native JSON request body.
##### approveBountySubmission
POST /bounties/{bountyId}/submissions/{submissionId}/approve
bountyId- Required
- Yes
- Type
- string
- Details
- The ID of the bounty
submissionId- Required
- Yes
- Type
- string
- Details
- The ID of the bounty submission
rewardAmount- Required
- No; body/guard requirements still apply
- Type
- ['number', 'null']
- Details
- The reward amount for the performance-based bounty. Applicable if the bounty reward amount is not set.
##### rejectBountySubmission
POST /bounties/{bountyId}/submissions/{submissionId}/reject
bountyId- Required
- Yes
- Type
- string
- Details
- The ID of the bounty
submissionId- Required
- Yes
- Type
- string
- Details
- The ID of the bounty submission
rejectionReason- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The reason for rejecting the submission. enum:
["invalidProof", "duplicateSubmission", "outOfTimeWindow", "didNotMeetCriteria", "other"].
rejectionNote- Required
- No; body/guard requirements still apply
- Type
- string
- Details
- The note for rejecting the submission. maxLength:
5000.
Complete client, OS and desktop setup
# Install Dub MCP Server & CLI
One npm package includes both binaries and all 61 tools. Requires Node.js 22 or newer for CLI/manual MCP installs. Discovery works before account authentication. Account operations need eligible Dub workspace REST API access; provider workspace plans, key permissions and API quota apply.
- Program
- dub-cli
- Use
- Scripts and agents with a shell
- Program
- dub-mcp
- Use
- AI clients supporting stdio
- Program
- dub-2.0.0.mcpb
- Use
- Compatible Claude Desktop custom extensions
- Program
- https://mcp.dub.sh/mcp/dub-links
- Use
- Official remote provider-hosted access
Contents
Requirements · CLI · Private account setup · Claude Code · Codex · Claude Desktop · Cursor · VS Code and Copilot · Windsurf · Zed · Gemini CLI · Docker · Verify · Multiple accounts · Updates and removal · Troubleshooting · Development
Requirements
Install Node from nodejs.org. Open a new terminal and check node --version and npm --version. The desktop host needs a compatible Node runtime; dependencies are bundled. A GUI app may not inherit your terminal's environment. Check your account's current API access and quota with Dub instead of assuming npm installation provides it.
CLI
On macOS/Linux, use Terminal. On Windows, use PowerShell or Command Prompt:
npm install -g @thenavidm/dub-mcp-cli@latest
dub-cli --version
dub-cli
dub-cli list-links --help
dub-cli schema create-link
dub-cli loginIf PowerShell blocks npm.ps1, use npm.cmd or Command Prompt according to your policy. If a binary is missing, check npm prefix -g, ensure its executable directory is on PATH and open a new terminal. Avoid sudo as a workaround for PATH problems.
For one command without a global install:
npx -y --package @thenavidm/dub-mcp-cli@latest dub-cli toolsMake SKILL.md available in your agent's supported skill location. The installed file is <npm root -g>/@thenavidm/dub-mcp-cli/SKILL.md. npm does not automatically register client skills. Your agent should read the actual schema and use --agent/--select for compact output.
Private account setup
Private workspace access
- Sign into the intended Dub workspace. Open Settings → API Keys / tokens. Verify the workspace before copying a key.
- Create only the needed all-access, read-only or restricted link/analytics/domain/tag permissions. REST keys are workspace-specific; native read-only and workspace isolation already exist in Dub.
- Store the key outside repositories as DUB_API_KEY in private user settings or DUB_TOKEN_FILE pointing to an absolute token-only file. On macOS/Linux use a private 0700 directory and 0600 regular non-symlink file, at most 64 KiB. On Windows restrict ACLs to yourself; POSIX mode checks do not verify ACLs.
- Run dub-cli doctor for local settings. Deliberately run doctor --network for one GET /links?pageSize=1; it reports the returned count without echoing the link. This proves that read, not workspace ownership or every permission.
- Discover actual link IDs and fields, review the requested change, and approve only that operation or matching reviewed batch. Do not delete links, register domains, track sales or change financial records just to test installation.
REST keys are sent only to https://api.dub.co as Authorization: Bearer. The official hosted MCP accepts OAuth or the documented Mcp-Dub-Token header; do not substitute that header for REST Bearer. Official dub CLI OAuth uses its own private session and scopes. This wrapper never imports those sessions, starts OAuth, loads .env, purchases access or saves a key through login. login prints private setup instructions only.
DUB_ACCOUNTS is a private array of unique {name,api_key,token_file} profiles. A token file overrides only that selected profile's key and caches until process restart. Profiles never fall back to DUB_API_KEY or another account when credentials are missing. Labels do not verify provider ownership. A tenantId filter is customer segmentation within a workspace, not another workspace's authentication.
Plans, quotas and provider effects
The AGPL wrapper is free. Dub subscription limits, partner-program eligibility, domain-registration charges, conversions and financial actions remain provider costs and permissions. Check current plans and API limits.
Documented standard per-key limits are Free 60/minute, Pro 600/minute, Business 1200/minute and Advanced 3000/minute; Enterprise is custom. Analytics/events additionally list Free unavailable, Pro two requests/second, Business four/second and Advanced eight/second. Successful installation does not unlock paid analytics. The default 1100 ms process-wide request-start spacing is conservative for one Free key; other processes/apps share its quota. It is not a guaranteed limiter for all plans or concurrent clients.
No request automatically retries, including 429, redirects, timeouts or 5xx. Respect Retry-After before deliberately repeating a read. Inspect actual provider state before repeating an unknown mutation. Requests are capped at 1 MiB and responses at 5 MiB. Each explicit list call reads one native page: links/customers/commissions support mutually exclusive startingAfter/endingBefore cursors; other families use their documented page/pageSize or limit. Deprecated page parameters remain marked, cannot be mixed with cursors, and require positive integers. There is no invented all_pages option or complete-backup claim.
Native bulk link creation/update/deletion already supports up to 100 items. Bulk create omits custom previews and webhook events, and HTTP 200 can mix successful links with per-link errors. The local reviewed batch is a separate ordered one-to-twenty link/tag/folder workflow, with all payloads checked and exact approval hash before first request. A bulk task can still affect up to 100 records; twenty tasks is not a twenty-record budget.
Domain deletion is irreversible and deletes its links. Partner ban cancels commissions and deletes links; financial changes and customer deletion need explicit user intent. create_commission can return HTTP 202 with a task receipt: acceptance is not completed financial work. Tracking events can affect analytics and commissions. No payout execution endpoint is invented.
Rotation and revocation
Revoke the intended key in the correct workspace, replace private settings/files and restart every process. Native key/user role changes apply at the provider; machine-user keys share their owner's permissions and deleting a machine user revokes its keys. Do not create a machine user merely to test this package. Revoke official OAuth integrations separately. Removing npm/client entries does not revoke keys, undo links/events/commissions, refund a registered domain or remove saved private output files.
export DUB_TOKEN_FILE='/absolute/private/dub.txt'
dub-cli doctor --network$env:DUB_TOKEN_FILE = 'C:\Users\YOUR_USER\Private\dub.txt'
dub-cli doctor --networkAgent-guided installation
Help me install Dub MCP Server & CLI with INSTALL.md. Check Node and the binary, let me configure my account credentials privately, then run discovery and doctor --network. Do not change or mutate accounts during setup.
Codex
Codex is the current validation priority. Private token paths must exist in the process or remote environment where the server runs.
codex mcp add dub -- npx -y @thenavidm/dub-mcp-cli@latest
codex mcp listAccount credentials must reach the server through private environment settings. codex mcp add --env NAME=value stores values in your local config, so never commit that config or put secrets in a shared command. In TOML, the equivalent server is:
[mcp_servers.dub]
command = "npx"
args = ["-y", "@thenavidm/dub-mcp-cli@latest"]
env_vars = ["DUB_API_KEY", "DUB_TOKEN_FILE", "DUB_ACCOUNTS", "DUB_DEFAULT_ACCOUNT", "DUB_READ_ONLY", "DUB_ALLOW_DESTRUCTIVE"]env_vars forwards those names from the environment available to Codex. If that environment does not contain them, configure private env settings locally. Codex can also call the CLI directly with SKILL.md and --agent output.
Claude Code
For a user-scoped connection, after privately configuring credentials:
claude mcp add --scope user dub -- npx -y @thenavidm/dub-mcp-cli@latest
claude mcp listUse the client's private local environment settings for the account variable if they are not inherited. Claude's -e NAME=value registration option writes values into its config; only use it locally through your secret manager, with no shared command transcript. Never place credentials in a project .mcp.json. Reconnect and ask Claude to verify credentials.
Alternatively install the CLI, make SKILL.md available to Claude, and use shell commands. Registering both surfaces is optional.
Claude Desktop
Install the .mcpb extension
- Download
dub-2.0.0.mcpbfrom GitHub Releases. - In a supported Claude Desktop build, open Settings > Extensions > Advanced settings > Install Extension… and select it.
- Enter a private API key in the sensitive setting, or an absolute private token-file path. Leave the unused credential method empty. Requests use Authorization: Bearer at the fixed Dub endpoint. Use the intended workspace API key; named profiles are configured separately in private client environments.
- Enable read-only if you want only the 22 read operations. Reconnect and ask for account verification.
The bundle includes production dependencies and no credentials. Use a regular private token-only file if you prefer file-based credentials. The manifest requires Node 22 or newer from a compatible host. Organization policy may restrict custom extensions. Manual bundle updates require installing the new version; no automatic directory updates are promised. GUI installation remains unverified separately from archive/protocol checks.
Manual config
Open Settings > Developer > Edit Config, or use your platform's config file:
| OS | Typical config path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json; confirm the location through Edit Config in your installed build |
{
"mcpServers": {
"dub": {
"command": "npx",
"args": ["-y", "@thenavidm/dub-mcp-cli@latest"],
"env": {
"DUB_API_KEY": "YOUR_PRIVATE_API_KEY",
"DUB_TOKEN_FILE": ""
}
}
}
}Replace the placeholders only in your private file. Merge the server entry into an existing mcpServers object instead of replacing other integrations. Fully quit and reopen Claude Desktop. Do not enable an extension and a manual entry with the same name; choose one route.
If a Windows launcher cannot execute npx directly, use "command": "cmd" with "args": ["/c", "npx", "-y", "@thenavidm/dub-mcp-cli@latest"]. An absolute node executable and installed dist/index.js path also avoids launcher/PATH problems.
Cursor
Use private user settings at ~/.cursor/mcp.json, or Settings > Tools & MCP. Cursor documents environment interpolation and envFile support.
{
"mcpServers": {
"dub": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@thenavidm/dub-mcp-cli@latest"],
"env": {
"DUB_API_KEY": "${env:DUB_API_KEY}",
"DUB_TOKEN_FILE": "${env:DUB_TOKEN_FILE}"
}
}
}
}The environment values must exist for the Cursor process. If you use envFile, keep that file private and outside version control. A project's .cursor/mcp.json must not contain actual credentials. Reconnect the server after saving.
VS Code and Copilot
Use MCP: Open User Configuration. VS Code uses servers and secure inputs, rather than a mcpServers root:
{
"inputs": [
{"type": "promptString", "id": "dub-api-token", "description": "Dub API key (leave empty for a private token file)", "password": true},
{"type": "promptString", "id": "dub-token-file", "description": "Optional private token-file path (leave empty for API key)"}
],
"servers": {
"dub": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@thenavidm/dub-mcp-cli@latest"],
"env": {
"DUB_API_KEY": "${input:dub-api-token}",
"DUB_TOKEN_FILE": "${input:dub-token-file}"
}
}
}
}Start Dub through the MCP controls, approve trust if prompted, and enter credentials in the private input prompts. Workspace .vscode/mcp.json may contain this placeholder-only structure, but never resolved secret values. Remote development runs the server in the selected remote environment, so local file paths refer to that environment.
Windsurf
Open Cascade's MCP settings or edit the private user file ~/.codeium/windsurf/mcp_config.json. Use the Claude Desktop manual mcpServers block above with your locally configured env values. See Windsurf's current MCP documentation. Restart or reconnect Dub in Cascade; project files must not contain secrets.
Zed
Open Settings > AI > MCP Servers > Add Server > Add Local Server, or your user settings file. Zed uses context_servers:
{
"context_servers": {
"dub": {
"command": "npx",
"args": ["-y", "@thenavidm/dub-mcp-cli@latest"],
"env": {
"DUB_API_KEY": "YOUR_PRIVATE_API_KEY",
"DUB_TOKEN_FILE": ""
}
}
}
}Enter actual values only in private user settings. Check the active-server indicator before prompting. Do not wrap command and args inside a nested command object from older Zed examples.
Gemini CLI
Merge the Claude Desktop manual mcpServers block into your private ~/.gemini/settings.json. Configure the private credential values locally, then restart Gemini CLI and inspect /mcp. See Gemini CLI's MCP configuration. Its project settings must not contain real credentials. You can instead use the CLI from an agent shell.
Other local stdio clients use the same command and arguments, adapted to their config format. A client that only accepts a remote MCP URL cannot connect directly: this package does not ship a public HTTP listener. ChatGPT's remote connector setup is not a substitute for local stdio installation.
Docker
Build locally from the reviewed source; no prebuilt registry image is claimed:
git clone https://github.com/thenavidm/dub-mcp-cli.git
cd dub-mcp-cli
docker build -t dub-mcp-cli .
docker run --rm -i -e DUB_API_KEY dub-mcp-cliCline and other local MCP clients
Use the client's Add MCP server flow with command npx, arguments -y and @thenavidm/dub-mcp-cli@latest, stdio transport, and private local DUB_API_KEY or DUB_TOKEN_FILE settings. UI names depend on the installed client. Reconnect and discover tools before an account call. Browser-only clients need a remote HTTPS connector; use Dub's official server rather than this local stdio command.
Verify
dub-cli --version
dub-cli tools
dub-cli list-accounts --agent
dub-cli doctor
dub-cli doctor --network
dub-cli list-links --page-size 1 --account work --agentLocal doctor reports profile count/default/policy without loading credentials or claiming authentication. --network opts into exactly one read, with count only. Actual account role/ownership, analytics plan, every endpoint and writes remain separate checks. Never use a destructive or paid call as an install test.
Multiple accounts
DUB_ACCOUNTS contains unique {name,api_key,token_file} workspace profiles; DUB_DEFAULT_ACCOUNT selects the exact label or defaults to the first configured profile. --account selects one workspace only. No wildcard/all-accounts work or global credential fallback occurs. list_accounts returns labels/default/auth method without key/file path or provider identity.
Native Dub keys are already scoped and workspace-specific. Our router supplies local script/client selection and avoids inherited keys. tenantId is a data filter, not credentials. Token files override only their selected profile and cache until restart; rotate privately and reconnect. Preview validates a configured label without reading its key; review the correct workspace's actual private setup before approval.
Updates and removal
npm install -g @thenavidm/dub-mcp-cli@latest
dub-cli --version
npm uninstall -g @thenavidm/dub-mcp-cli
codex mcp remove dubnpx @latest resolves when a process starts; reconnect/restart for updates. Global npm and versioned desktop bundles require explicit updates. Uninstalling does not revoke provider keys/OAuth, undo requested changes or remove saved private files. Revoke access through the actual provider workspace separately.
Troubleshooting
| Symptom | Check / next action |
|---|---|
| No configured profile | Use private key/file settings; login explains setup |
| 401/403 | Verify selected workspace, key scopes, user role and plan |
| CLI works, GUI fails | Configure that GUI/remote process's own environment/filesystem |
| Read-only refusal | Do only the read requested, or configure the explicitly intended mutation access |
| Invalid body | Inspect current schema; complete body input and no mixing |
| Program applications fail | Use current /program-applications, not old SDK routes |
| Only one list page | Deliberately continue with that endpoint's current native pagination |
| HTTP200 bulk errors | Inspect each item; do not replay known successes |
| 429 | Respect per-key/analytics quotas; no automatic retry |
| Unknown mutation outcome | Inspect provider state/known receipts before repeating |
| Review mismatch | Re-review exact task/profile/order/schema |
| Existing output file | Choose a new private path; overwrite is never implicit |
| HTTP202 commission | Accepted task receipt is not a completed financial action |
| Desktop refused | Check runtime/custom-extension policy and correct version |
Development
git clone https://github.com/thenavidm/dub-mcp-cli.git
cd dub-mcp-cli
npm ci
npm run typecheck
npm run build
npm test
npm run check:counts
npm run build:mcpbSource mode: configure private env, then register node /absolute/path/dub-mcp-cli/dist/index.js as the MCP command. Build before registration and after source changes. No local credentials are packaged. CONTRIBUTING.md, SECURITY.md and THIRD_PARTY_NOTICES.md cover contributions, disclosures and licensing.
Output, flags and exit codes
Provider JSON returns as objects/arrays through both surfaces. The CLI emits JSON on stderr for failures. QR PNGs and generated publicToken credentials go only into exclusive private output files; returned data contains saved-file metadata, not the bytes/key. HTTP 202 commissions return accepted:true/http_status:202/result, not a finished commission. Native bulk-create HTTP 200 can contain per-link errors: inspect every item; CLI exit 0 alone is not per-item success.
| Flag | Contract |
|---|---|
| --agent | Compact JSON, no prompt/color; --yes does not approve writes |
| --select a,b.c | Local response field selection; does not reduce provider calls/quota |
| --confirm | Only the requested mutation or output-file write |
| --account NAME | Exact private profile |
| --payload JSON | Complete native body; arrays repeat once per item or use payload_file |
| --payload-file PATH | Absolute regular non-symlink JSON file, at most 1 MiB |
| --tasks JSON | Repeat per ordered task object; never pass one whole JSON array |
| --review-sha256 SHA256 | Hash from exact matching local batch review |
| --output-file PATH | New absolute exclusive private output file; no overwrite |
Native body flag names retain the current schema's camelCase, such as --externalId; query/path flags use snake-derived --page-size/--link-id. For nullable fields, unions and top-level commission oneOf bodies prefer complete payload JSON or a private JSON file; help/schema are authoritative.
| Exit | Meaning |
|---|---|
| 0 | Request/local operation worked; still inspect semantic result/per-link errors/accepted state |
| 2 | Invalid input or refused write |
| 3 | Resource not found |
| 4 | Provider authentication/permission error |
| 5 | Other provider/network/API failure |
| 7 | Rate limit |
| 10 | Missing/broken private configuration |
dub-cli list-links --help
dub-cli schema create-commission
dub-cli get-link --link-id YOUR_LINK_ID --account work --agent
dub-cli create-link --payload '{"url":"https://example.com/requested","key":"requested"}' --account work --confirm --agentOfficial and community comparisons
- Reviewed version/surface
- Public listed 32 tools, checked 2026-10-03
- Strengths and limits
- Hosted OAuth or headless key access, links/bulk operations, analytics/events, QR, customers/conversions, domains/tags/folders. Count is listed documentation, not authenticated discovery.
- Reviewed version/surface
- Public listed 25 tools, checked 2026-10-03
- Strengths and limits
- Hosted partner/application/bounty/commission workflows. Overlapping tools must not be summed as unique coverage. Client approval behavior was not authenticated here.
- Reviewed version/surface
- dub-cli 0.0.13, bin dub, source 53808cb1e89254fd0746bd3294b434866c9d34a6
- Strengths and limits
- OAuth login, private configuration, domain selection, shorten and link search. Actual released shorten command constructed one POST without a confirmation flag in an intercepted fixture. No provider request or account outcome was tested. No documented shared exact reviewed batch/mandatory read-only guard in this inspected command surface.
- Reviewed version/surface
- dub 0.73.5, source eff8e92e06dcd77c03155b03ea7575ccf409cc21
- Strengths and limits
- Broad typed application API, optional pagination/retry configuration and custom HTTP client. Default retries are none, not an owned improvement. Current provider schema has program-application routes newer than this SDK's partner-application snapshot. SDK is separate from official dub-cli.
- Reviewed version/surface
- Pinned source 08bc2649fdbc2d338dab81d3c8db829b9a95c8a6
- Strengths and limits
- Three inspected create/update/delete link tools using DUBCO_API_KEY. No task CLI bin, private profile routing or common direct-call guard found in this reviewed source. Source inspection is not a runtime benchmark.
- Reviewed version/surface
- Local stdio MCP, shared task CLI and versioned desktop bundle
- Strengths and limits
- 61 tools, 22 reads/helpers and 39 confirmed operations. Current 57 native routes, isolated workspace profiles, exact reviewed link/tag/folder batches, exclusive private QR/embed-token files and shared direct-call policy. No hosted OAuth, official session import, browser dashboard or proven task-token winner.
Dub already has an official CLI, hosted action MCPs, native bulk actions, scoped/read-only workspace keys and useful provider logs. None are described as missing. The owned product qualifies through verified shared local confirmation/direct-call read-only rules and exact payload/profile/order batch review, plus private generated-credential delivery. The real official CLI baseline made one intercepted POST without a confirmation flag; our same create_link refuses before fetch until explicitly approved. This does not establish missing approvals in the hosted MCP.
Official SDK delete was separately exercised through its real export and injected HTTP, with one intentionally unsuccessful fixture request and no mandatory confirmation argument. Neither fixture proves a successful account task or universal superiority. A human/client can already coordinate official tools; our exact hash provides a repeatable local request review boundary, not a unique ability to do bulk work or cryptographic human approval.
The current API was fetched from the official SDK workflow's observed source https://api.dub.co. Its 57 operations rename list/approve/reject partner applications to /program-applications. Source/provenance records both snapshots and sanitized hashes. Native schemas are converted to Ajv JSON Schema; malformed positive exclusiveMinimum booleans without a numeric minimum are documented as explicit local positive pagination/event-quantity validation, not asserted SDK behavior.
Versions and legacy migration
| Component | Reviewed / locked version |
|---|---|
| Owned package | 2.0.0 |
| Current native API operations | 57 |
| MCP SDK | 1.32.0 |
| Ajv | 8.20.0 |
| Ajv formats | 3.0.1 |
| TypeScript | 7.0.2 |
| Vitest | 5.0.3 |
| Vite | 8.3.2 |
| MCPB | 2.1.2 |
| Official CLI | dub-cli 0.0.13 |
| Official SDK | dub 0.73.5 |
2.0.0 is a breaking modernization of the private twelve-tool JavaScript MCP. Both owned binaries now live under @thenavidm/dub-mcp-cli; the old generic package name is not republished. Eleven legacy names remain with current schemas; unsupported get_workspace is removed. get_link now uses link_id/external_id/domain+key selectors, get_link_stats uses current analytics parameters and domain reads use current list fields. New folder/partner/program-application/commission/conversion/bounty/discount/embed/QR routes follow current primary contracts.
All mutations now need confirmation, private account files/profiles use the documented new config, PNG/embed outputs require a new output_file, and reviewed batches require an exact hash. Native body JSON retains camelCase; query/path wrapper flags use snake-derived dashes. There is no invented account-wide workspace identity read or legacy route alias. Preserve private legacy history; do not push old refs or private credential files. Record future provider changes in dated changelog/provenance, meaningful fixtures and complete repo/CMS/client docs before release.
Updates and removal
npm install -g @thenavidm/dub-mcp-cli@latest
dub-cli --version
npm uninstall -g @thenavidm/dub-mcp-cli
codex mcp remove dubnpx @latest resolves when a process starts; reconnect/restart for updates. Global npm and versioned desktop bundles require explicit updates. Uninstalling does not revoke provider keys/OAuth, undo requested changes or remove saved private files. Revoke access through the actual provider workspace separately.
Validation and remaining evidence
Typecheck/build, 54 behavior/shared CLI tests, actual full/read-only discovery and pinned official CLI/SDK request fixtures pass. No provider requests or financial/domain charges were spent in these fixtures. Current primary schemas and route drift are documented. Public artifacts/platform CI/CMS/live outcomes remain separately tracked in the release proof. Account outcomes, authenticated official MCP discovery, desktop GUI installation, fresh matched successful Codex task/token usage and the private site scene/shared-helper deployment remain pending.
More tools for your business workflow
Connect the tools needed for the requested work.
Dub MCP Server & CLI FAQs
Official MCP/CLI differences, private keys, exact batches, native bulk/pagination, partner finances, private output and maintenance.
It offers the same 61 Dub tasks through a shared CLI, local MCP and desktop bundle, using current API schemas and private workspace profiles.
Yes.
Official Links and Partners MCPs provide broad hosted OAuth/key workflows.
Their listed 32/25 tools can overlap; these are not authenticated discovery counts.
Yes.
Official dub-cli 0.0.13 installs dub and offers OAuth, config, domain selection, shortening and link search.
Our binary is dub-cli and adds the proven shared policy/review workflow.
Verified shared confirmation/direct-call read-only controls, exact ordered request review and private generated-credential delivery serve local scripts and stdio clients.
SEO and more names alone are insufficient.
The documented local stdio/CLI clients include Codex, Claude Desktop/Code, Cursor, VS Code/Copilot, Windsurf, Zed, Gemini CLI, Cline and Docker on macOS/Windows/Linux.
Host GUI and actual account outcomes have separate verification status.
No.
Codex can use local MCP or the task CLI.
Claude Code is optional, and its measurements are deferred.
No.
Keys/scopes/workspace roles and paid plan eligibility remain provider requirements; Free analytics/events access is listed as unavailable.
This package uses private REST Bearer workspace keys.
Official MCP uses OAuth or Mcp-Dub-Token; official dub CLI uses its own OAuth session.
No sessions are imported.
Yes, through private named profiles and exact --account selection.
A missing profile key never inherits a global key.
Native workspace-scoped keys already exist.
Canonical requests, task order, selected profile label and reviewed schema snapshot.
It does not verify key ownership, lock provider state, reserve money/quota or certify human identity.
No.
Batch tasks exclude private-output/financial/domain actions and reject nested account/confirm/payload_file overrides.
Only approved link/tag/folder work is accepted.
Execution stops, reports known results, failed index and unattempted tasks.
Native HTTP200 bulk-create errors include the full known partial receipt.
There is no retry, rollback or implicit continuation.
Yes, up to 100 link creates/updates/deletes per native call.
Bulk creation omits custom previews/webhook events; an owned twenty-task bound is not a twenty-record limit.
A confirmed request writes PNG bytes to a new exclusive private output file, with signature/content-type validation and metadata returned.
No base64 dump or automatic upload occurs.
publicToken and expiry go only into the requested exclusive private JSON file.
Despite its name, publicToken is a credential; keep it and the parent directory/ACLs private.
Yes.
It hides all 39 mutation/file-write operations and refuses confirmed direct calls.
Native read-only API keys supply additional provider enforcement.
The current provider API uses /program-applications; the published SDK snapshot still uses partner-application routes.
The owned current methods follow the newer primary schema.
Not necessarily. create_commission may return HTTP202 accepted task metadata.
No task polling, payout execution or financial completion is inferred.
No fresh matched successful Codex task/token comparison exists.
Tool counts, characters and local field filtering are not task-token savings.
Reconnect npx @latest, update global npm or install the new desktop archive.
Remove client entries and revoke provider keys/OAuth separately; prior mutations and local private output remain.
Navid.me is reader-supported. When you buy through links on this site, I may earn an affiliate commission. Learn more.
More MCP servers & CLIs
Related free tools
Free AI newsletterThe most actionable AI newsletter for founders
Every week, get proven AI strategies, curated tools, and step-by-step systems to grow your audience, create better content, and build a profitable creator business.
No fluff, no filler, no BS. Just five minutes each week that might level up your online business and life.
P.S. Sign up now to get free access to my ultimate AI tools guide for creators.












