# Zi.Ink

> Shorten links on zi.ink or your own domain, change or delete them, and see how often they're clicked.

App · 11 actions. Web page: https://docs.lodol.com/docs/integrations/zi-ink

## Actions

### Delete link

Delete a short link.

**Inputs**

- Short code (`slug`, text, required): The link's short code, the part after the slash, such as abc1234.
- Custom domain (`domain_id`, text): The custom domain the link is on. Leave empty for a zi.ink link.

**Outputs**

- `data` (object): The response from Zi.Ink.

**Example output**

```json
{
  "data": {
    "message": "Link deleted successfully",
    "success": true
  }
}
```

### Delete links in bulk

Delete several short links on one domain at once.

**Inputs**

- Short codes (`slugs`, list, required): The short codes of the links to delete.
- Custom domain (`domain_id`, text): The custom domain the links are on. Leave empty for zi.ink links.

**Outputs**

- `data` (object): The response from Zi.Ink.

**Example output**

```json
{
  "data": {
    "deleted": 2,
    "failed": 0,
    "failedSlugs": [
      "xyz5678"
    ],
    "success": true
  }
}
```

### Get account

Get the signed-in account's name, email and plan.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Zi.Ink.

**Example output**

```json
{
  "data": {
    "user": {
      "created_at": "2026-01-01T00:00:00.000Z",
      "email": "user@example.com",
      "name": "John Doe",
      "picture": "https://example.com/avatar.jpg",
      "plan_tier": "enterprise"
    }
  }
}
```

### Get bulk shorten job

Check how far a bulk shorten job has got, and get its short links once it's done.

**Inputs**

- Job ID (`jobId`, text, required): The job ID from Shorten links in bulk.

**Outputs**

- `data` (object): The response from Zi.Ink.

**Example output**

```json
{
  "data": {
    "failed": 0,
    "jobId": "bulk-1769661366024-abc123",
    "processed": 3,
    "progress": 100,
    "results": [
      {
        "original_url": "https://example.com/page1",
        "short_url": "https://zi.ink/abc123",
        "slug": "abc123",
        "success": true
      }
    ],
    "status": "completed",
    "successful": 3,
    "total": 3
  }
}
```

### Get link

Get one short link, with how many times it was clicked.

**Inputs**

- Short code (`slug`, text, required): The link's short code, the part after the slash, such as abc1234.
- Custom domain (`domain_id`, text): The custom domain the link is on. Leave empty for a zi.ink link.

**Outputs**

- `data` (object): The response from Zi.Ink.

**Example output**

```json
{
  "data": {
    "link": {
      "clicks": 42,
      "created_at": "2026-01-27T10:00:00.000Z",
      "id": 746,
      "long_url": "https://example.com",
      "password_protected": false,
      "short_url": "https://zi.ink/abc1234",
      "slug": "abc1234",
      "user_id": 1
    }
  }
}
```

### Get link clicks

Get a short link's clicks over recent days, by country, referrer, browser and device.

**Inputs**

- Short code (`slug`, text, required): The link's short code, the part after the slash, such as abc1234.
- Days (`days`, number): How many days back to count, up to 365. Zi.Ink uses 7 when empty. From 1 to 365.

**Outputs**

- `data` (object): The response from Zi.Ink.

**Example output**

```json
{
  "data": {
    "by_browser": [
      {
        "browser": "Chrome",
        "clicks": 400
      }
    ],
    "by_country": [
      {
        "clicks": 300,
        "country": "US"
      }
    ],
    "by_device": [
      {
        "clicks": 350,
        "device": "desktop"
      }
    ],
    "by_referrer": [
      {
        "clicks": 200,
        "referrer": "direct"
      }
    ],
    "created_at": "2026-01-27T10:00:00.000Z",
    "long_url": "https://example.com",
    "slug": "abc1234",
    "total_clicks": 533
  }
}
```

### List custom domains

List your custom domains, with the IDs used to make links on them.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Zi.Ink.

**Example output**

```json
{
  "data": {
    "domains": [
      {
        "domain": "yourdomain.com",
        "id": "72fa7279-65ca-4fa6-9407-63f1d711fb68",
        "status": "active",
        "subscription_status": "active"
      }
    ]
  }
}
```

### List links

List your short links, one page at a time.

**Inputs**

- Page (`page`, number): Which page to read, starting at 1. At least 1.
- Page size (`limit`, number): How many links a page holds, up to 100. Zi.Ink uses 20 when empty. From 1 to 100.

**Outputs**

- `data` (object): The response from Zi.Ink.

**Example output**

```json
{
  "data": {
    "limit": 20,
    "links": [
      {
        "created_at": "2026-01-27T10:00:00.000Z",
        "domain_expired": false,
        "domain_name": "zi.ink",
        "id": 1,
        "long_url": "https://example.com",
        "password_protected": false,
        "short_url": "https://zi.ink/abc1234",
        "slug": "abc1234",
        "user_id": 1
      }
    ],
    "page": 1,
    "total": 150,
    "totalPages": 8
  }
}
```

### Shorten link

Make a short link to a web address, optionally with your own short code or custom domain.

**Inputs**

- Web address (`long_url`, text, required): The address to shorten, such as https://example.com/page.
- Short code (`custom_slug`, text): Your own short code: 3 to 50 letters, numbers, hyphens or underscores. Leave empty for a random one.
- Custom domain (`domain_id`, text): Make the link on one of your custom domains. Leave empty for zi.ink.

**Outputs**

- `data` (object): The response from Zi.Ink.

**Example output**

```json
{
  "data": {
    "domain": "yourdomain.com",
    "short_url": "https://zi.ink/abc1234",
    "slug": "abc1234",
    "success": true
  }
}
```

### Shorten links in bulk

Shorten up to 100 web addresses at once. Ten or fewer come back straight away; more are shortened in the background.

**Inputs**

- Web addresses (`urls`, list, required): The addresses to shorten, up to 100.
- Custom domain (`domain_id`, text): Make every link on one of your custom domains. Leave empty for zi.ink.

**Outputs**

- `data` (object): The response from Zi.Ink.

**Example output**

```json
{
  "data": {
    "failed": 0,
    "jobId": "bulk-1770004251559-ous1bln",
    "message": "Bulk processing completed in sync mode",
    "processed": 3,
    "results": [
      {
        "original_url": "https://example.com/page1",
        "short_url": "https://zi.ink/abc123",
        "slug": "abc123",
        "success": true
      }
    ],
    "status": "completed",
    "success": true,
    "successful": 3,
    "total": 3
  }
}
```

### Update link

Change where a short link goes, when it expires, or its password. Needs the Enterprise plan.

**Inputs**

- Short code (`slug`, text, required): The link's short code, the part after the slash, such as abc1234.
- Custom domain (`domain_id`, text): The custom domain the link is on. Leave empty for a zi.ink link.
- New web address (`long_url`, text): The address the link should send people to now.
- Expires (`expires_at`, date and time): When the link stops working.
- Password protected (`password_enabled`, true/false): Turn on to ask for a password, off to remove it.
- Password (`password`, text): The password people must enter. Needed when turning protection on.

**Outputs**

- `data` (object): The response from Zi.Ink.

**Example output**

```json
{
  "data": {
    "link": {
      "expires_at": "2026-12-31T23:59:59.000Z",
      "long_url": "https://new-destination.com",
      "password_protected": true,
      "slug": "abc1234"
    },
    "message": "Link updated successfully",
    "success": true
  }
}
```
