> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dashlink.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Links

> Create, read, update and delete Shortlinks. Deletion is bulk-only: to delete a single link, pass a one-element array.

A Shortlink is the core resource. It has a destination, a domain, and a path —
the *back half* — and every visit to it is recorded.

```bash theme={null}
curl -X POST https://api.dashlink.ai/api/v1/shortlinks/create_shortlink \
  -H "X-API-Key: dlk_live_..." \
  -F "destination_url=https://example.com/spring-sale" \
  -F "title=Spring sale"
```

> [!NOTE]
>
> **Deleting is bulk-only.** There is no single-link delete. Pass a one-element
> array to `bulk_delete_shortlinks`, or call `bulk_edit` with `action="delete"`.
> See [Bulk operations](https://docs.dashlink.ai/guides/links/bulk-operations.md).

> [!NOTE]
>
> `create_shortlink` and `update_shortlink` take `multipart/form-data`, because
> both can carry a preview image. Send the other fields as form fields alongside it.

## Endpoints

| Endpoint | Method | Description |
| - | - | - |
| [`/api/v1/shortlinks/create_shortlink`](https://docs.dashlink.ai/api-reference/links/create-shortlink) | `POST` | Create a Shortlink |
| [`/api/v1/shortlinks/update_shortlink`](https://docs.dashlink.ai/api-reference/links/update-shortlink) | `POST` | Update a Shortlink |
| [`/api/v1/shortlinks/get_shortlink`](https://docs.dashlink.ai/api-reference/links/get-shortlink) | `GET` | Retrieve a Shortlink |
| [`/api/v1/shortlinks/get_shortlinks`](https://docs.dashlink.ai/api-reference/links/get-shortlinks) | `GET` | List Shortlinks |
| [`/api/v1/shortlinks/search_shortlinks`](https://docs.dashlink.ai/api-reference/links/search-shortlinks) | `GET` | Search Shortlinks |
| [`/api/v1/shortlinks/bulk_create_shortlinks`](https://docs.dashlink.ai/api-reference/links/bulk-create-shortlinks) | `POST` | Create Shortlinks in bulk |
| [`/api/v1/shortlinks/bulk_update_shortlinks`](https://docs.dashlink.ai/api-reference/links/bulk-update-shortlinks) | `POST` | Update Shortlinks in bulk |
| [`/api/v1/shortlinks/bulk_delete_shortlinks`](https://docs.dashlink.ai/api-reference/links/bulk-delete-shortlinks) | `POST` | Delete Shortlinks in bulk |
| [`/api/v1/shortlinks/bulk_edit`](https://docs.dashlink.ai/api-reference/links/bulk-edit) | `POST` | Delete, enable or disable Shortlinks in bulk |
| [`/api/v1/shortlinks/add_tags`](https://docs.dashlink.ai/api-reference/links/add-tags) | `POST` | Add tags to a Shortlink |
| [`/api/v1/shortlinks/remove_tags`](https://docs.dashlink.ai/api-reference/links/remove-tags) | `POST` | Remove tags from a Shortlink |
| [`/api/v1/shortlinks/upload_preview_image`](https://docs.dashlink.ai/api-reference/links/upload-preview-image) | `POST` | Upload a link preview image |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.