# Send Dub.co Links API to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "dub-links-api",
    "name": "Dub.co Links API",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ferminrp/dub-links-api",
    "canonicalUrl": "https://clawhub.ai/ferminrp/dub-links-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/dub-links-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=dub-links-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/openapi-spec.json"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "dub-links-api",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-02T18:16:41.796Z",
      "expiresAt": "2026-05-09T18:16:41.796Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=dub-links-api",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=dub-links-api",
        "contentDisposition": "attachment; filename=\"dub-links-api-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "dub-links-api"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/dub-links-api"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/dub-links-api",
    "downloadUrl": "https://openagent3.xyz/downloads/dub-links-api",
    "agentUrl": "https://openagent3.xyz/skills/dub-links-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/dub-links-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/dub-links-api/agent.md"
  }
}
```
## Documentation

### Dub Links API

Skill for integrating Dub Links API with strict scope limited to /links* endpoints.

### API Overview

Base URL: https://api.dub.co
Auth: Bearer token required
Header: Authorization: Bearer <DUB_API_KEY>
Response format: JSON
Scope: Links endpoints only
Docs: https://dub.co/docs/api-reference/endpoint/create-a-link
Token docs (onboarding): https://dub.co/docs/api-reference/tokens
Local snapshot: references/openapi-spec.json

### API Key Onboarding

Use this flow when the user does not have an API key yet:

Create a Dub account/workspace (if needed).
Go to the dashboard token section (per docs):

https://dub.co/docs/api-reference/tokens


Generate an API key and export it in shell:

export DUB_API_KEY="..."


Validate credentials with a Links endpoint:

curl -s -H "Authorization: Bearer $DUB_API_KEY" "https://api.dub.co/links/count" | jq '.'

Useful onboarding note: if initial signup is needed, this referral can be used:
https://refer.dub.co/agents

### 1) Create

POST /links
Creates a link in the authenticated workspace.
Minimum recommended body: url.

curl -s -X POST "https://api.dub.co/links" \\
  -H "Authorization: Bearer $DUB_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{"url":"https://example.com"}' | jq '.'

### 2) Update

PATCH /links/{linkId}
Updates an existing link by linkId.

curl -s -X PATCH "https://api.dub.co/links/{linkId}" \\
  -H "Authorization: Bearer $DUB_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{"url":"https://example.com/new"}' | jq '.'

### 3) Upsert

PUT /links/upsert
If a link with the same URL exists, returns/updates it; otherwise creates it.

curl -s -X PUT "https://api.dub.co/links/upsert" \\
  -H "Authorization: Bearer $DUB_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{"url":"https://example.com"}' | jq '.'

### 4) Delete

DELETE /links/{linkId}
Deletes a link by linkId.

curl -s -X DELETE "https://api.dub.co/links/{linkId}" \\
  -H "Authorization: Bearer $DUB_API_KEY" | jq '.'

### 5) Retrieve one

GET /links/info
Retrieves a link by one of these selectors:

domain + key
linkId
externalId

curl -s "https://api.dub.co/links/info?domain=acme.link&key=promo" \\
  -H "Authorization: Bearer $DUB_API_KEY" | jq '.'

### 6) List

GET /links
Returns paginated list with filters.
Common query params: domain, search, tagId, tagIds, tagNames, folderId, tenantId, page, pageSize, sortBy, sortOrder.

curl -s "https://api.dub.co/links?page=1&pageSize=20&sortBy=createdAt&sortOrder=desc" \\
  -H "Authorization: Bearer $DUB_API_KEY" | jq '.'

### 7) Count

GET /links/count
Returns number of links for the provided filters.

curl -s "https://api.dub.co/links/count?domain=acme.link" \\
  -H "Authorization: Bearer $DUB_API_KEY" | jq '.'

### 8) Bulk create

POST /links/bulk
Creates up to 100 links.
Body: array of objects (each item should include url).

curl -s -X POST "https://api.dub.co/links/bulk" \\
  -H "Authorization: Bearer $DUB_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '[{"url":"https://example.com/a"},{"url":"https://example.com/b"}]' | jq '.'

### 9) Bulk update

PATCH /links/bulk
Updates up to 100 links.
Body requires data; target selection via linkIds or externalIds.

curl -s -X PATCH "https://api.dub.co/links/bulk" \\
  -H "Authorization: Bearer $DUB_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{"linkIds":["lnk_123","lnk_456"],"data":{"archived":true}}' | jq '.'

### 10) Bulk delete

DELETE /links/bulk
Deletes up to 100 links.
Required query param: linkIds.

curl -s -X DELETE "https://api.dub.co/links/bulk?linkIds=lnk_123,lnk_456" \\
  -H "Authorization: Bearer $DUB_API_KEY" | jq '.'

### Key Fields

Common response fields (from LinkSchema):

id
domain
key
shortLink
url
createdAt
updatedAt
archived
externalId
tags
folderId

Result shapes by endpoint:

GET /links: array of links
GET /links/count: number
Bulk endpoints: array/object depending on operation

### Recommended Workflow

Detect intent: create/update/upsert/delete/get/list/count/bulk.
Validate minimum inputs (url, linkId, filters, bulk ids).
Execute request with curl -s and Bearer header.
Parse with jq and verify logical operation result.
Respond first with a useful snapshot:

id, shortLink, url, and archived status when relevant.


For lists, provide a short table with relevant columns.
Keep strict scope on /links*.

### Error Handling

401/403: missing, invalid, or unauthorized token.
404: link not found for linkId or GET /links/info criteria.
422: invalid payload (missing/invalid fields).
429: rate limited; respect Retry-After if present.
Network/timeout: retry up to 2 times with short delay.
Unexpected JSON: return minimal raw output and warn about inconsistency.

### Presenting Results

Recommended output format:

Executive summary (action + result).
Short table for multiple links:

id | domain | key | shortLink | url | createdAt


For bulk operations:

requested total, processed total, errors if any.


Clarify data is scoped to the authenticated workspace.

### Out of Scope

This skill must not use:

Analytics, events, conversions, partners, customers, commissions, payouts endpoints.
Domains, folders, tags endpoints.
/tokens/* endpoints (including /tokens/embed/referrals).

The tokens page is used only for API key onboarding, not as operational scope.

### OpenAPI Spec

Use references/openapi-spec.json as the stable local source for methods, paths, parameters, and schemas.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ferminrp
- Version: 1.0.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-02T18:16:41.796Z
- Expires at: 2026-05-09T18:16:41.796Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/dub-links-api)
- [Send to Agent page](https://openagent3.xyz/skills/dub-links-api/agent)
- [JSON manifest](https://openagent3.xyz/skills/dub-links-api/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/dub-links-api/agent.md)
- [Download page](https://openagent3.xyz/downloads/dub-links-api)