@thenavidm/dub-mcp-cli
v3.0.1
Published
Dub MCP and shared task CLI with private workspace profiles, current API schemas and exact reviewed link batches.
Maintainers
Keywords
Readme
Dub MCP Server & CLI
Dub MCP server and CLI for Codex and AI agents. 61 shared tools for current link, analytics, conversion and partner workflows, private workspace profiles and exact reviewed link batches.
One package provides a task CLI, local stdio MCP and versioned desktop bundle. Built and maintained by Navid Moazzez. Built on Slipway, which turns one definition of each tool into the MCP server and the CLI. Complete setup: navid.me.
The terminal illustrates actual commands, not a recorded provider account session. Node 22+ is required for manual installs; private workspace API access and provider plans/costs remain separate.
Two ways to use it
Command line
dub-cli tools
dub-cli list-links --page-size 5 --account work --agent
dub-cli get-link --link-id YOUR_LINK_ID --account work --agentMCP server, for your AI app
codex mcp add dub --env DUB_TOKEN_FILE=/absolute/private/dub.txt -- npx -y @thenavidm/dub-mcp-cli@latestWhich one
| Where you work | Route | | --- | --- | | Codex / Cursor / shell agents | Task CLI, local MCP or both | | Claude Desktop | Versioned custom extension or manual stdio | | Scripts / CI | Shared task CLI and approval/workspace routing | | Remote-only clients / current provider guide | Official hosted MCP |
Features
| Capability | CLI command | MCP tool | | --- | --- | --- | | Links and native bulk | list-links / create-link / bulk-create-links | list_links / create_link / bulk_create_links | | Analytics and events | get-link-stats / list-events | get_link_stats / list_events | | Tags, folders and domains | list-tags / list-folders / list-domains | list_tags / list_folders / list_domains | | Partners and applications | list-partners / list-program-applications | list_partners / list_program_applications | | Financial records | list-commissions / list-payouts | list_commissions / list_payouts | | Conversion tracking | track-lead / track-sale / track-open | track_lead / track_sale / track_open | | Private PNG/embed output | get-qr-code / create-referrals-embed-token | get_qr_code / create_referrals_embed_token | | Exact ordered review/submission | preview-link-batch / submit-link-batch | preview_link_batch / submit_link_batch | | Private profiles/native schemas | list-accounts / get-operation-schema | list_accounts / get_operation_schema |
Contents
| Number | Section | What it covers | | --- | --- | --- | | 1 | What you can ask it | Requested link/partner work | | 2 | Quick install | npm binaries and discovery | | 3 | Set up Dub access | Workspace keys, quotas and revocation | | 4 | Connect your client | Codex first and supported clients | | 5 | Check it works | Local checks and deliberate read | | 6 | Output, flags and exit codes | JSON, private outputs and stable exits | | 7 | MCP or CLI and token cost | Measured in Claude Code and Codex | | 8 | Every tool and argument | All 61 tools and 57 native routes | | 9 | Link and partner workflows | Link changes, partners, financial/private output | | 10 | Exact reviewed batches and pagination | Exact approval, partial receipts and native pages | | 11 | Several private accounts | Private workspace selection without fallback | | 12 | Writing safely | Shared confirmation/read-only/audit rules | | 13 | How the two surfaces work | One catalogue, SDK bridge and pinned schema | | 14 | Your data | Private provider payloads, credentials and files | | 15 | Environment variables | Credentials, safety and request tuning | | 16 | Updates and removal | npm/desktop updates and revocation | | 17 | Troubleshooting | Concrete failure outcomes and next actions | | 18 | API coverage and comparisons | Official MCP/CLI/SDK and pinned community | | 19 | Versions and migration | Locked versions and legacy breaking changes | | 20 | FAQ | Twenty provider-specific expanding answers |
1. What you can ask it
- Find the intended workspace's short links and inspect one exact link.
- Review and create only the approved destination/slug, including native tags and folders.
- Read eligible analytics/events using the precise date range and filters.
- Review ordered link/tag/folder tasks, then submit only the matching approved batch.
- Read partners/applications/commissions/payouts and approve only requested changes.
- Write one requested QR PNG or temporary referral embed credential into a new private file.
Actual discovery exposes 61 tools: 22 reads/helpers and 39 confirmed operations. Fifty-seven current API operations and four local workflow helpers share one implementation. The old twelve-tool MCP had no declared task CLI; eleven names remain, and unsupported get_workspace is removed. list_accounts is local profile labels, not provider identity.
2. Quick install
npm install -g @thenavidm/dub-mcp-cli@latest
dub-cli --version
dub-cli tools
dub-cli schema create-link
dub-cli loginNode 22+ is required for manual CLI/local MCP. Discovery works without authentication. See INSTALL.md for every advertised client/OS and the versioned desktop bundle. The official dub-cli package installs a different binary, dub; our binary is dub-cli.
3. 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.
4. Connect your client
INSTALL.md leads with Codex and covers Claude Code, Claude Desktop extension/manual stdio, Cursor, VS Code/Copilot, Windsurf, Zed, Gemini CLI, Cline, Docker and other local stdio clients on macOS/Windows/Linux. Launch npx -y @thenavidm/dub-mcp-cli@latest with private environment settings. GUI/remote processes have their own filesystem and environment; restart/reconnect after settings or versions change.
Remote-only clients use Dub's official hosted MCP. The documented local mcp-remote route is a proxy of that hosted product. Our package supplies local stdio, not a public HTTP relay. Install SKILL.md in your agent's supported skill location if using the CLI; npm does not register a skill automatically.
codex mcp add dub --env DUB_TOKEN_FILE=/absolute/private/dub.txt -- npx -y @thenavidm/dub-mcp-cli@latest5. Check it works
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.
6. 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 and no prompts; never confirms a write | | --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 | | 1 | Unexpected error | | 2 | Invalid input or refused write, an unknown command or a hidden 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 --agent7. MCP or CLI and token cost
| Surface | What the agent receives | Verified scope | | --- | --- | --- | | Local MCP | Client-loaded schemas and requested results | Actual full/read-only discovery and shared policy fixtures | | Task CLI | Discovered help/schema and selected command results | Actual house SDK bridge, same handlers/guard | | Official MCP/CLI | Provider tools and OAuth workflows | Current docs, pinned CLI and controlled request fixture |
Measured on 2026-10-05 against 2.0.1, the same day, with Claude Code 2.1.286 on Claude Opus 5.5 (one short prompt with and without the server connected, the difference read from the API's own usage figures) and Codex 0.159.3 on gpt-6.1-sol:
| Cost | 2.0.1 | 3.0.0 |
| --- | --- | --- |
| Claude Code, every tool loaded, every message | 86,431 | 74,231 |
| Claude Code's default, tool search, every message | 1,076 | 1,078 |
| SKILL.md, read once | 4,354 | 4,417 |
| Codex over the CLI, one task, median of five | 129,621 | 110,559 |
| Codex over MCP, the same task, median of five | 78,146 | 78,400 |
The task was "find the command that creates a short link, and the flags it requires". Every tool loaded costs less because each write's body appeared twice, as its own fields and inside payload, and 3.0.0 writes each repeated part once under $defs. Over the CLI, three 2.0.1 runs ran schema without a command, and every extra step carries the whole conversation forward; every 3.0.0 run asked which and none failed. Over MCP, Codex printed a tool list 1,545 tokens shorter on 3.0.0 (35,747 against 37,292) and cut both to about 10,000; the input totals differ by the model's own reasoning before it printed the list, from 0 to 170 tokens a run. SKILL.md costs 63 more because it now says how approval works over MCP and lists every exit code.
Tool counts, schema characters, another client's results and --select are not an efficiency percentage, and no other offering was measured.
8. Every tool and argument
| MCP tool | CLI command | Native route / mode |
| --- | --- | --- |
| create_link | dub-cli create-link | POST /links; confirmation required |
| list_links | dub-cli list-links | GET /links; read/helper |
| get_links_count | dub-cli get-links-count | GET /links/count; read/helper |
| get_link | dub-cli get-link | GET /links/info; read/helper |
| update_link | dub-cli update-link | PATCH /links/{linkId}; confirmation required |
| delete_link | dub-cli delete-link | DELETE /links/{linkId}; confirmation required |
| bulk_create_links | dub-cli bulk-create-links | POST /links/bulk; confirmation required |
| bulk_update_links | dub-cli bulk-update-links | PATCH /links/bulk; confirmation required |
| bulk_delete_links | dub-cli bulk-delete-links | DELETE /links/bulk; confirmation required |
| upsert_link | dub-cli upsert-link | PUT /links/upsert; confirmation required |
| get_link_stats | dub-cli get-link-stats | GET /analytics; read/helper |
| list_events | dub-cli list-events | GET /events; read/helper |
| create_tag | dub-cli create-tag | POST /tags; confirmation required |
| list_tags | dub-cli list-tags | GET /tags; read/helper |
| update_tag | dub-cli update-tag | PATCH /tags/{id}; confirmation required |
| delete_tag | dub-cli delete-tag | DELETE /tags/{id}; confirmation required |
| create_folder | dub-cli create-folder | POST /folders; confirmation required |
| list_folders | dub-cli list-folders | GET /folders; read/helper |
| update_folder | dub-cli update-folder | PATCH /folders/{id}; confirmation required |
| delete_folder | dub-cli delete-folder | DELETE /folders/{id}; confirmation required |
| create_domain | dub-cli create-domain | POST /domains; confirmation required |
| list_domains | dub-cli list-domains | GET /domains; read/helper |
| update_domain | dub-cli update-domain | PATCH /domains/{slug}; confirmation required |
| delete_domain | dub-cli delete-domain | DELETE /domains/{slug}; confirmation required |
| register_domain | dub-cli register-domain | POST /domains/register; confirmation required |
| check_domain_status | dub-cli check-domain-status | GET /domains/status; read/helper |
| track_lead | dub-cli track-lead | POST /track/lead; confirmation required |
| track_sale | dub-cli track-sale | POST /track/sale; confirmation required |
| track_open | dub-cli track-open | POST /track/open; confirmation required |
| list_customers | dub-cli list-customers | GET /customers; read/helper |
| get_customer | dub-cli get-customer | GET /customers/{id}; read/helper |
| update_customer | dub-cli update-customer | PATCH /customers/{id}; confirmation required |
| delete_customer | dub-cli delete-customer | DELETE /customers/{id}; confirmation required |
| create_partner | dub-cli create-partner | POST /partners; confirmation required |
| list_partners | dub-cli list-partners | GET /partners; read/helper |
| create_partner_link | dub-cli create-partner-link | POST /partners/links; confirmation required |
| retrieve_partner_links | dub-cli retrieve-partner-links | GET /partners/links; read/helper |
| upsert_partner_link | dub-cli upsert-partner-link | PUT /partners/links/upsert; confirmation required |
| retrieve_partner_analytics | dub-cli retrieve-partner-analytics | GET /partners/analytics; read/helper |
| ban_partner | dub-cli ban-partner | POST /partners/ban; confirmation required |
| deactivate_partner | dub-cli deactivate-partner | POST /partners/deactivate; confirmation required |
| list_program_applications | dub-cli list-program-applications | GET /program-applications; read/helper |
| approve_program_application | dub-cli approve-program-application | POST /program-applications/approve; confirmation required |
| reject_program_application | dub-cli reject-program-application | POST /program-applications/reject; confirmation required |
| list_discount_codes | dub-cli list-discount-codes | GET /discount-codes; read/helper |
| create_discount_code | dub-cli create-discount-code | POST /discount-codes; confirmation required |
| delete_discount_code | dub-cli delete-discount-code | DELETE /discount-codes/{idOrCode}; confirmation required |
| create_commission | dub-cli create-commission | POST /commissions; confirmation required |
| list_commissions | dub-cli list-commissions | GET /commissions; read/helper |
| update_commission | dub-cli update-commission | PATCH /commissions/{id}; confirmation required |
| bulk_update_commissions | dub-cli bulk-update-commissions | PATCH /commissions/bulk; confirmation required |
| list_payouts | dub-cli list-payouts | GET /payouts; read/helper |
| create_referrals_embed_token | dub-cli create-referrals-embed-token | POST /tokens/embed/referrals; confirmation required |
| get_qr_code | dub-cli get-qr-code | GET /qr; confirmation required |
| list_bounty_submissions | dub-cli list-bounty-submissions | GET /bounties/{bountyId}/submissions; read/helper |
| approve_bounty_submission | dub-cli approve-bounty-submission | POST /bounties/{bountyId}/submissions/{submissionId}/approve; confirmation required |
| reject_bounty_submission | dub-cli reject-bounty-submission | POST /bounties/{bountyId}/submissions/{submissionId}/reject; confirmation required |
| list_accounts | dub-cli list-accounts | Local workflow; read/helper |
| get_operation_schema | dub-cli get-operation-schema | Local workflow; read/helper |
| preview_link_batch | dub-cli preview-link-batch | Local workflow; read/helper |
| submit_link_batch | dub-cli submit-link-batch | Local workflow; confirmation required |
create_link
dub-cli create-link
Create a link for the authenticated workspace.
| Argument | Required | Type | Details |
| --- | --- | --- | --- |
| url | No; body/guard requirements still apply | string | The destination URL of the short link. maxLength: 32000. |
| domain | No; body/guard requirements still apply | string | The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or dub.sh if the workspace has no domains). maxLength: 190. |
| key | No; body/guard requirements still apply | string | The short link slug. If not provided, a random 7-character slug will be generated. maxLength: 190. |
| keyLength | No; body/guard requirements still apply | number | The length of the short link slug. Defaults to 7 if not provided. When used with prefix, the total length of the key will be prefix.length + keyLength. minimum: 3. maximum: 190. |
| externalId | No; body/guard requirements still apply | ['string', 'null'] | 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 null or an empty string to remove it. maxLength: 255. |
| tenantId | No; body/guard requirements still apply | ['string', 'null'] | 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 null or an empty string to remove it. maxLength: 255. |
| programId | No; body/guard requirements still apply | ['string', 'null'] | The ID of the program the short link is associated with. |
| partnerId | No; body/guard requirements still apply | ['string', 'null'] | The ID of the partner the short link is associated with. |
| prefix | No; body/guard requirements still apply | string | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is /c/, generated keys will be in the /c/:key format). Will be ignored if key is provided. |
| trackConversion | No; body/guard requirements still apply | boolean | Whether to track conversions for the short link. Defaults to false if not provided. |
| archived | No; body/guard requirements still apply | boolean | Whether the short link is archived. Defaults to false if not provided. |
| tagIds | No; body/guard requirements still apply | JSON | The unique IDs of the tags assigned to the short link. |
| tagNames | No; body/guard requirements still apply | JSON | The unique name of the tags assigned to the short link (case insensitive). |
| folderId | No; body/guard requirements still apply | ['string', 'null'] | The unique ID existing folder to assign the short link to. |
| comments | No; body/guard requirements still apply | ['string', 'null'] | The comments for the short link. |
| expiresAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the short link will expire at. |
| expiredUrl | No; body/guard requirements still apply | ['string', 'null'] | The URL to redirect to when the short link has expired. maxLength: 32000. |
| password | No; body/guard requirements still apply | ['string', 'null'] | The password required to access the destination URL of the short link. |
| proxy | No; body/guard requirements still apply | boolean | Whether the short link uses Custom Link Previews feature. Defaults to false if not provided. |
| title | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview title (og:title). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| description | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview description (og:description). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| image | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview image (og:image). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| video | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview video (og:video). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| rewrite | No; body/guard requirements still apply | boolean | Whether the short link uses link cloaking. Defaults to false if not provided. |
| ios | No; body/guard requirements still apply | ['string', 'null'] | The iOS destination URL for the short link for iOS device targeting. maxLength: 32000. |
| android | No; body/guard requirements still apply | ['string', 'null'] | The Android destination URL for the short link for Android device targeting. maxLength: 32000. |
| geo | No; body/guard requirements still apply | ['object', 'null'] | Geo targeting information for the short link in JSON format {[COUNTRY]: https://example.com }. See https://d.to/geo for more information. |
| doIndex | No; body/guard requirements still apply | boolean | Allow search engines to index your short link. Defaults to false if not provided. Learn more: https://d.to/noindex |
| utm_source | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength: 255. |
| ref | No; body/guard requirements still apply | ['string', 'null'] | The referral tag of the short link. If set, this will populate or override the ref query parameter in the destination URL. maxLength: 255. |
| testVariants | No; body/guard requirements still apply | ['array', 'null'] | An array of A/B test URLs and the percentage of traffic to send to each URL. minItems: 2. maxItems: 4. |
| testStartedAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the tests started. |
| testCompletedAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the tests were or will be completed. |
| publicStats | No; body/guard requirements still apply | boolean | Deprecated: Use dashboard instead. Whether the short link's stats are publicly accessible. Defaults to false if not provided. Deprecated native compatibility field. |
| tagId | No; body/guard requirements still apply | ['string', 'null'] | Deprecated: Use tagIds instead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field. |
| webhookIds | No; body/guard requirements still apply | ['array', 'null'] | 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 | No; body/guard requirements still apply | string | Exact configured private workspace profile label; not a tenant or provider account ID. |
| confirm | No; body/guard requirements still apply | boolean | Set true only when the user asked for exactly this action. |
| payload | No; body/guard requirements still apply | object | 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 | No; body/guard requirements still apply | string | 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[]
| Argument | Required | Type | Details |
| --- | --- | --- | --- |
| url | Yes | string | Native field; use the reviewed provider reference. |
| percentage | Yes | number | 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
| Argument | Required | Type | Details |
| --- | --- | --- | --- |
| url | Yes | string | The destination URL of the short link. maxLength: 32000. |
| domain | No; body/guard requirements still apply | string | The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or dub.sh if the workspace has no domains). maxLength: 190. |
| key | No; body/guard requirements still apply | string | The short link slug. If not provided, a random 7-character slug will be generated. maxLength: 190. |
| keyLength | No; body/guard requirements still apply | number | The length of the short link slug. Defaults to 7 if not provided. When used with prefix, the total length of the key will be prefix.length + keyLength. minimum: 3. maximum: 190. |
| externalId | No; body/guard requirements still apply | ['string', 'null'] | 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 null or an empty string to remove it. maxLength: 255. |
| tenantId | No; body/guard requirements still apply | ['string', 'null'] | 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 null or an empty string to remove it. maxLength: 255. |
| programId | No; body/guard requirements still apply | ['string', 'null'] | The ID of the program the short link is associated with. |
| partnerId | No; body/guard requirements still apply | ['string', 'null'] | The ID of the partner the short link is associated with. |
| prefix | No; body/guard requirements still apply | string | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is /c/, generated keys will be in the /c/:key format). Will be ignored if key is provided. |
| trackConversion | No; body/guard requirements still apply | boolean | Whether to track conversions for the short link. Defaults to false if not provided. |
| archived | No; body/guard requirements still apply | boolean | Whether the short link is archived. Defaults to false if not provided. |
| tagIds | No; body/guard requirements still apply | JSON | The unique IDs of the tags assigned to the short link. |
| tagNames | No; body/guard requirements still apply | JSON | The unique name of the tags assigned to the short link (case insensitive). |
| folderId | No; body/guard requirements still apply | ['string', 'null'] | The unique ID existing folder to assign the short link to. |
| comments | No; body/guard requirements still apply | ['string', 'null'] | The comments for the short link. |
| expiresAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the short link will expire at. |
| expiredUrl | No; body/guard requirements still apply | ['string', 'null'] | The URL to redirect to when the short link has expired. maxLength: 32000. |
| password | No; body/guard requirements still apply | ['string', 'null'] | The password required to access the destination URL of the short link. |
| proxy | No; body/guard requirements still apply | boolean | Whether the short link uses Custom Link Previews feature. Defaults to false if not provided. |
| title | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview title (og:title). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| description | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview description (og:description). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| image | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview image (og:image). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| video | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview video (og:video). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| rewrite | No; body/guard requirements still apply | boolean | Whether the short link uses link cloaking. Defaults to false if not provided. |
| ios | No; body/guard requirements still apply | ['string', 'null'] | The iOS destination URL for the short link for iOS device targeting. maxLength: 32000. |
| android | No; body/guard requirements still apply | ['string', 'null'] | The Android destination URL for the short link for Android device targeting. maxLength: 32000. |
| geo | No; body/guard requirements still apply | ['object', 'null'] | Geo targeting information for the short link in JSON format {[COUNTRY]: https://example.com }. See https://d.to/geo for more information. |
| doIndex | No; body/guard requirements still apply | boolean | Allow search engines to index your short link. Defaults to false if not provided. Learn more: https://d.to/noindex |
| utm_source | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength: 255. |
| ref | No; body/guard requirements still apply | ['string', 'null'] | The referral tag of the short link. If set, this will populate or override the ref query parameter in the destination URL. maxLength: 255. |
| testVariants | No; body/guard requirements still apply | ['array', 'null'] | An array of A/B test URLs and the percentage of traffic to send to each URL. minItems: 2. maxItems: 4. |
| testStartedAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the tests started. |
| testCompletedAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the tests were or will be completed. |
| publicStats | No; body/guard requirements still apply | boolean | Deprecated: Use dashboard instead. Whether the short link's stats are publicly accessible. Defaults to false if not provided. Deprecated native compatibility field. |
| tagId | No; body/guard requirements still apply | ['string', 'null'] | Deprecated: Use tagIds instead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field. |
| webhookIds | No; body/guard requirements still apply | ['array', 'null'] | 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[]
| Argument | Required | Type | Details |
| --- | --- | --- | --- |
| url | Yes | string | Native field; use the reviewed provider reference. |
| percentage | Yes | number | 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.
| Argument | Required | Type | Details |
| --- | --- | --- | --- |
| domain | No; body/guard requirements still apply | string | The domain to filter the links by. E.g. ac.me. If not provided, all links for the workspace will be returned. |
| tag_id | No; body/guard requirements still apply | string | Deprecated: Use tagIds instead. The tag ID to filter the links by. Deprecated native compatibility field. |
| tag_ids | No; body/guard requirements still apply | JSON | The tag IDs to filter the links by. |
| tag_names | No; body/guard requirements still apply | JSON | The unique name of the tags assigned to the short link (case insensitive). |
| folder_id | No; body/guard requirements still apply | string | The folder ID to filter the links by. |
| search | No; body/guard requirements still apply | string | 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 | No; body/guard requirements still apply | string | The user ID to filter the links by. |
| tenant_id | No; body/guard requirements still apply | string | The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant. |
| show_archived | No; body/guard requirements still apply | boolean | Whether to include archived links in the response. Defaults to false if not provided. default: false. |
| with_tags | No; body/guard requirements still apply | boolean | DEPRECATED. Filter for links that have at least one tag assigned to them. default: false. Deprecated native compatibility field. |
| ending_before | No; body/guard requirements still apply | string | If specified, the query only searches for results before this cursor. Mutually exclusive with startingAfter. |
| starting_after | No; body/guard requirements still apply | string | If specified, the query only searches for results after this cursor. Mutually exclusive with endingBefore. |
| page | No; body/guard requirements still apply | integer | DEPRECATED. Use startingAfter instead. maximum: 9007199254740991. exclusiveMinimum: 0. Deprecated native compatibility field. |
| page_size | No; body/guard requirements still apply | integer | The number of items per page. maximum: 100. exclusiveMinimum: 0. default: 100. |
| account | No; body/guard requirements still apply | string | 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.
| Argument | Required | Type | Details |
| --- | --- | --- | --- |
| domain | No; body/guard requirements still apply | string | The domain to filter the links by. E.g. ac.me. If not provided, all links for the workspace will be returned. |
| tag_id | No; body/guard requirements still apply | string | Deprecated: Use tagIds instead. The tag ID to filter the links by. Deprecated native compatibility field. |
| tag_ids | No; body/guard requirements still apply | JSON | The tag IDs to filter the links by. |
| tag_names | No; body/guard requirements still apply | JSON | The unique name of the tags assigned to the short link (case insensitive). |
| folder_id | No; body/guard requirements still apply | string | The folder ID to filter the links by. |
| search | No; body/guard requirements still apply | string | 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 | No; body/guard requirements still apply | string | The user ID to filter the links by. |
| tenant_id | No; body/guard requirements still apply | string | The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant. |
| show_archived | No; body/guard requirements still apply | boolean | Whether to include archived links in the response. Defaults to false if not provided. default: false. |
| with_tags | No; body/guard requirements still apply | boolean | DEPRECATED. Filter for links that have at least one tag assigned to them. default: false. Deprecated native compatibility field. |
| group_by | No; body/guard requirements still apply | JSON | The field to group the links by. |
| account | No; body/guard requirements still apply | string | 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.
| Argument | Required | Type | Details |
| --- | --- | --- | --- |
| domain | No; body/guard requirements still apply | string | The domain of the link to retrieve. E.g. for d.to/github, the domain is d.to. minLength: 1. |
| key | No; body/guard requirements still apply | string | The key of the link to retrieve. E.g. for d.to/github, the key is github. minLength: 1. |
| link_id | No; body/guard requirements still apply | string | The unique ID of the short link. |
| external_id | No; body/guard requirements still apply | string | This is the ID of the link in the your database. |
| account | No; body/guard requirements still apply | string | 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.
| Argument | Required | Type | Details |
| --- | --- | --- | --- |
| link_id | Yes | string | The id of the link to update. You may use either linkId (obtained via /links/info endpoint) or externalId prefixed with ext_. |
| url | No; body/guard requirements still apply | string | The destination URL of the short link. maxLength: 32000. |
| domain | No; body/guard requirements still apply | string | The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or dub.sh if the workspace has no domains). maxLength: 190. |
| key | No; body/guard requirements still apply | string | The short link slug. If not provided, a random 7-character slug will be generated. maxLength: 190. |
| externalId | No; body/guard requirements still apply | ['string', 'null'] | 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 null or an empty string to remove it. maxLength: 255. |
| tenantId | No; body/guard requirements still apply | ['string', 'null'] | 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 null or an empty string to remove it. maxLength: 255. |
| programId | No; body/guard requirements still apply | ['string', 'null'] | The ID of the program the short link is associated with. |
| partnerId | No; body/guard requirements still apply | ['string', 'null'] | The ID of the partner the short link is associated with. |
| trackConversion | No; body/guard requirements still apply | boolean | Whether to track conversions for the short link. Defaults to false if not provided. |
| archived | No; body/guard requirements still apply | boolean | Whether the short link is archived. Defaults to false if not provided. |
| tagIds | No; body/guard requirements still apply | JSON | The unique IDs of the tags assigned to the short link. |
| tagNames | No; body/guard requirements still apply | JSON | The unique name of the tags assigned to the short link (case insensitive). |
| folderId | No; body/guard requirements still apply | ['string', 'null'] | The unique ID existing folder to assign the short link to. |
| comments | No; body/guard requirements still apply | ['string', 'null'] | The comments for the short link. |
| expiresAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the short link will expire at. |
| expiredUrl | No; body/guard requirements still apply | ['string', 'null'] | The URL to redirect to when the short link has expired. maxLength: 32000. |
| password | No; body/guard requirements still apply | ['string', 'null'] | The password required to access the destination URL of the short link. |
| proxy | No; body/guard requirements still apply | boolean | Whether the short link uses Custom Link Previews feature. Defaults to false if not provided. |
| title | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview title (og:title). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| description | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview description (og:description). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| image | No; body/guard requirements still apply | JSON | Native field; use the reviewed provider reference. |
| video | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview video (og:video). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| rewrite | No; body/guard requirements still apply | boolean | Whether the short link uses link cloaking. Defaults to false if not provided. |
| ios | No; body/guard requirements still apply | ['string', 'null'] | The iOS destination URL for the short link for iOS device targeting. maxLength: 32000. |
| android | No; body/guard requirements still apply | ['string', 'null'] | The Android destination URL for the short link for Android device targeting. maxLength: 32000. |
| geo | No; body/guard requirements still apply | JSON | Native field; use the reviewed provider reference. |
| doIndex | No; body/guard requirements still apply | boolean | Allow search engines to index your short link. Defaults to false if not provided. Learn more: https://d.to/noindex |
| utm_source | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength: 255. |
| ref | No; body/guard requirements still apply | ['string', 'null'] | The referral tag of the short link. If set, this will populate or override the ref query parameter in the destination URL. maxLength: 255. |
| testVariants | No; body/guard requirements still apply | ['array', 'null'] | An array of A/B test URLs and the percentage of traffic to send to each URL. minItems: 2. maxItems: 4. |
| testStartedAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the tests started. |
| testCompletedAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the tests were or will be completed. |
| publicStats | No; body/guard requirements still apply | boolean | Deprecated: Use dashboard instead. Whether the short link's stats are publicly accessible. Defaults to false if not provided. Deprecated native compatibility field. |
| tagId | No; body/guard requirements still apply | ['string', 'null'] | Deprecated: Use tagIds instead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field. |
| webhookIds | No; body/guard requirements still apply | ['array', 'null'] | 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 | No; body/guard requirements still apply | string | Exact configured private workspace profile label; not a tenant or provider account ID. |
| confirm | No; body/guard requirements still apply | boolean | Set true only when the user asked for exactly this action. |
| payload | No; body/guard requirements still apply | object | 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 | No; body/guard requirements still apply | string | 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[]
| Argument | Required | Type | Details |
| --- | --- | --- | --- |
| url | Yes | string | Native field; use the reviewed provider reference. |
| percentage | Yes | number | 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
| Argument | Required | Type | Details |
| --- | --- | --- | --- |
| url | No; body/guard requirements still apply | string | The destination URL of the short link. maxLength: 32000. |
| domain | No; body/guard requirements still apply | string | The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or dub.sh if the workspace has no domains). maxLength: 190. |
| key | No; body/guard requirements still apply | string | The short link slug. If not provided, a random 7-character slug will be generated. maxLength: 190. |
| externalId | No; body/guard requirements still apply | ['string', 'null'] | 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 null or an empty string to remove it. maxLength: 255. |
| tenantId | No; body/guard requirements still apply | ['string', 'null'] | 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 null or an empty string to remove it. maxLength: 255. |
| programId | No; body/guard requirements still apply | ['string', 'null'] | The ID of the program the short link is associated with. |
| partnerId | No; body/guard requirements still apply | ['string', 'null'] | The ID of the partner the short link is associated with. |
| trackConversion | No; body/guard requirements still apply | boolean | Whether to track conversions for the short link. Defaults to false if not provided. |
| archived | No; body/guard requirements still apply | boolean | Whether the short link is archived. Defaults to false if not provided. |
| tagIds | No; body/guard requirements still apply | JSON | The unique IDs of the tags assigned to the short link. |
| tagNames | No; body/guard requirements still apply | JSON | The unique name of the tags assigned to the short link (case insensitive). |
| folderId | No; body/guard requirements still apply | ['string', 'null'] | The unique ID existing folder to assign the short link to. |
| comments | No; body/guard requirements still apply | ['string', 'null'] | The comments for the short link. |
| expiresAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the short link will expire at. |
| expiredUrl | No; body/guard requirements still apply | ['string', 'null'] | The URL to redirect to when the short link has expired. maxLength: 32000. |
| password | No; body/guard requirements still apply | ['string', 'null'] | The password required to access the destination URL of the short link. |
| proxy | No; body/guard requirements still apply | boolean | Whether the short link uses Custom Link Previews feature. Defaults to false if not provided. |
| title | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview title (og:title). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| description | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview description (og:description). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| image | No; body/guard requirements still apply | JSON | Native field; use the reviewed provider reference. |
| video | No; body/guard requirements still apply | ['string', 'null'] | The custom link preview video (og:video). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
| rewrite | No; body/guard requirements still apply | boolean | Whether the short link uses link cloaking. Defaults to false if not provided. |
| ios | No; body/guard requirements still apply | ['string', 'null'] | The iOS destination URL for the short link for iOS device targeting. maxLength: 32000. |
| android | No; body/guard requirements still apply | ['string', 'null'] | The Android destination URL for the short link for Android device targeting. maxLength: 32000. |
| geo | No; body/guard requirements still apply | JSON | Native field; use the reviewed provider reference. |
| doIndex | No; body/guard requirements still apply | boolean | Allow search engines to index your short link. Defaults to false if not provided. Learn more: https://d.to/noindex |
| utm_source | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | 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 | No; body/guard requirements still apply | ['string', 'null'] | The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. maxLength: 255. |
| ref | No; body/guard requirements still apply | ['string', 'null'] | The referral tag of the short link. If set, this will populate or override the ref query parameter in the destination URL. maxLength: 255. |
| testVariants | No; body/guard requirements still apply | ['array', 'null'] | An array of A/B test URLs and the percentage of traffic to send to each URL. minItems: 2. maxItems: 4. |
| testStartedAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the tests started. |
| testCompletedAt | No; body/guard requirements still apply | ['string', 'null'] | The date and time when the tests were or will be completed. |
| publicStats | No; body/guard requirements still apply | boolean | Deprecated: Use dashboard instead. Whether the short link's stats are publicly accessible. Defaults to false if not provided. Deprecated native compatibility field. |
| tagId | No; body/guard requirements still apply | ['string', 'null'] | Deprecated: Use tagIds instead. The unique ID of the tag assigned to the short link. Deprecated native compatibility field. |
| webhookIds | No; body/guard requirements still apply | ['array', 'null'] | 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
