KosmoKrator

marketing

Dub.co Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Dub.co KosmoKrator integration.

7 functions 6 read 1 write Bearer token auth

Lua Namespace

Agents call this integration through app.integrations.dub.*. Use lua_read_doc("integrations.dub") inside KosmoKrator to discover the same reference at runtime.

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Dub.co Integration

Available Tools

List short links with pagination, search, and filtering by domain or tag.

Parameters:

  • page (integer, optional) — Page number for pagination (default: 1).
  • pageSize (integer, optional) — Number of results per page (default: 50).
  • search (string, optional) — Search query to filter links by URL, key, or title.
  • domain (string, optional) — Filter links by domain (e.g., “lnkd.in”, “dub.sh”).
  • tagId (string, optional) — Filter links by tag ID.

Get details of a specific short link by its ID.

Parameters:

  • id (string, required) — The link ID.

Create a new short link.

Parameters:

  • url (string, required) — The destination URL to shorten.
  • domain (string, optional) — The domain for the short link.
  • key (string, optional) — The custom key (back-half) for the short link.
  • title (string, optional) — Optional title for the link.
  • description (string, optional) — Optional description for the link.
  • tags (array, optional) — Array of tag names to assign.

dub_list_domains

List all domains configured in the workspace.

Parameters:

  • page (integer, optional) — Page number for pagination (default: 1).
  • pageSize (integer, optional) — Number of results per page (default: 50).

dub_get_domain

Get details of a specific domain by ID or slug.

Parameters:

  • id (string, required) — The domain ID or slug.

dub_list_tags

List link tags with pagination and search.

Parameters:

  • page (integer, optional) — Page number for pagination (default: 1).
  • pageSize (integer, optional) — Number of results per page (default: 50).
  • search (string, optional) — Search query to filter tags by name.

dub_get_current_user

Get the profile of the currently authenticated user.

Parameters: None.

Raw agent markdown
# Dub.co Integration

## Available Tools

### dub_list_links
List short links with pagination, search, and filtering by domain or tag.

**Parameters:**
- `page` (integer, optional) — Page number for pagination (default: 1).
- `pageSize` (integer, optional) — Number of results per page (default: 50).
- `search` (string, optional) — Search query to filter links by URL, key, or title.
- `domain` (string, optional) — Filter links by domain (e.g., "lnkd.in", "dub.sh").
- `tagId` (string, optional) — Filter links by tag ID.

### dub_get_link
Get details of a specific short link by its ID.

**Parameters:**
- `id` (string, required) — The link ID.

### dub_create_link
Create a new short link.

**Parameters:**
- `url` (string, required) — The destination URL to shorten.
- `domain` (string, optional) — The domain for the short link.
- `key` (string, optional) — The custom key (back-half) for the short link.
- `title` (string, optional) — Optional title for the link.
- `description` (string, optional) — Optional description for the link.
- `tags` (array, optional) — Array of tag names to assign.

### dub_list_domains
List all domains configured in the workspace.

**Parameters:**
- `page` (integer, optional) — Page number for pagination (default: 1).
- `pageSize` (integer, optional) — Number of results per page (default: 50).

### dub_get_domain
Get details of a specific domain by ID or slug.

**Parameters:**
- `id` (string, required) — The domain ID or slug.

### dub_list_tags
List link tags with pagination and search.

**Parameters:**
- `page` (integer, optional) — Page number for pagination (default: 1).
- `pageSize` (integer, optional) — Number of results per page (default: 50).
- `search` (string, optional) — Search query to filter tags by name.

### dub_get_current_user
Get the profile of the currently authenticated user.

**Parameters:** None.

Metadata-Derived Lua Example

local result = app.integrations.dub.dub_list_links({
  page = 1,
  pageSize = 1,
  search = "example_search",
  domain = "example_domain",
  tagId = "example_tagId"
})
print(result)

Functions

dub_list_domains

List all domains configured in your Dub.co workspace.

Operation
Read read
Full name
dub.dub_list_domains
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
pageSize integer no Number of results per page (default: 50).

dub_get_domain

Get details of a specific domain by its ID or slug.

Operation
Read read
Full name
dub.dub_get_domain
ParameterTypeRequiredDescription
id string yes The domain ID or slug (e.g., "dub.sh", "clx...").

dub_list_tags

List link tags in your Dub.co workspace. Supports pagination and search.

Operation
Read read
Full name
dub.dub_list_tags
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
pageSize integer no Number of results per page (default: 50).
search string no Search query to filter tags by name.

dub_get_current_user

Get the profile of the currently authenticated Dub.co user. Useful for verifying the connection and checking workspace membership.

Operation
Read read
Full name
dub.dub_get_current_user
ParameterTypeRequiredDescription
No parameters.