TopRank Skills

Home / Claw Skills / Autres / dub-links-api
Official OpenClaw rules 15%

dub-links-api

Integrates Dub Links API endpoints to create, update, delete, retrieve, list, count, and run bulk operations on short links. Use when the user asks for "dub links api", "create link dub", "upsert link dub", "list links", "count links", "bulk links", or lookups by linkId/domain+key/externalId.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 dub-links-api 技能。 若已安装,则直接安装 dub-links-api 技能。

Overview

Skill Key
ferminrp/dub-links-api
Author
ferminrp
Source Repo
openclaw/skills
Version
-
Source Path
skills/ferminrp/dub-links-api
Latest Commit SHA
14af9803922dd83dd83b70a88a17493b73fa3efb

Extracted Content

SKILL.md excerpt

# 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:

1. Create a Dub account/workspace (if needed).
2. Go to the dashboard token section (per docs):
   - `https://dub.co/docs/api-reference/tokens`
3. Generate an API key and export it in shell:
   - `export DUB_API_KEY="..."`
4. 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`

## Links Endpoints

### 1) Create

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

```bash
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`.

```bash
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.

```bash
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...

Related Claw Skills