用于创建和管理短链接的 REST API

通过 REST API 创建、编辑和删除 short links。使用 JSON responses、API keys、OpenAPI / Swagger 文档和 webhook notifications,快速集成到 products、services 和 automation workflows 中。

# Create a short link $ curl -X POST https://lix.li/api/1.0/links -H "X-Api-Key: lix_live_XXXX" -H "Content-Type: application/json" -d '{"url": "https://example.com/very/long/page", "alias": "demo", "tags" : ["sale", "promo"]}'
# Response { "id": "9053352", "alias": "demo", "short_url": "https://lix.li/demo", "url": "https://example.com/very/long/page", "title": null, "group": null, "created_datetime": "2023-05-23T22:56:57+03:00", "tags": ["sale", "promo"] }

为什么开发者选择 Lix.li API

快速集成、清晰文档,以及专为真实 workflows 与 automation 场景打造的 API。

REST API

清晰的 REST conventions、明确的 HTTP methods 和 predictable response codes。无需非标准 patterns 或额外复杂性即可完成集成。

JSON Responses

所有 endpoints 均提供结构化 JSON responses。Predictable fields、一致的数据格式,以及简单的 client-side processing。

API Keys

通过 Bearer tokens 进行 authentication。可直接在 dashboard 中完成 key management、rotation 与 access revoke。

OpenAPI / Swagger

交互式文档,包含 request examples、responses,以及直接在 browser 中进行 API testing。

Predictable Endpoints

逻辑清晰的 resources 与 URL 结构:/links、/groups、/analytics、/webhooks。易读、易用、易维护。

快速集成

可通过标准 HTTP clients、backend applications、automation services 或 internal tools 使用 API。适用于 products、CRM、SaaS 和 backend workflows。

Lix.li API 能做什么

通过单一 REST API 创建 short links,并管理 analytics、domains、groups 与 automation。

Short Links API

通过 API 创建、编辑、删除和获取 short links。支持 bulk operations、pagination、filtering 和 link management。

Groups & Tags API

通过 API 使用 groups、tags、projects 和 workspaces 来组织 links。适用于 teams、campaigns 和大规模 integrations。

Automation API

将 link shortening 与 CRM、marketing platforms、internal services 和 automation workflows 集成。

Link Analytics API

通过 API 获取 clicks、countries、devices、browsers、traffic sources 和 UTM campaigns 数据。

Tracking Pixels API

通过 API 管理 Google、Hotjar、Yandex、TikTok 及其他 tracking pixels,并将其连接到 short links 与 workflows。

Custom Domains API

通过 API 连接并管理 branded domains。可在 products 和 campaigns 中使用自己的 short URLs。

Webhooks API

针对 clicks、link creation、updates 和 limits 的 real-time events。可通过 webhooks 与任何 service 集成。

通过 API 管理安全与有效期

通过 API 配置 passwords、expiration dates、click limits 和 access rules。

生态系统

探索其他平台的 SDK

从 PHP、JavaScript、Python 或 Go 使用相同的 Lix.li API,配备为每个生态系统量身定制的 SDK。

Python SDK
用于短链接、分组、分析和自动化的定型 Python 客户端。为现代 Python 应用和工作流构建。
Go SDK
具有定型结构、上下文支持和为 URL 缩短 API 集成的惯用错误处理的原生 Go SDK。
PHP SDK
具有定型 DTO、只读模型、专用异常和通过 Composer 优先安装的现代 PHP SDK。
JS SDK
基于 Promise 的 JavaScript SDK,适用于 Node.js 和浏览器环境。使用干净的开发体验创建和管理短链接。

易于理解的 API 文档

OpenAPI / Swagger、interactive testing、现成的 request examples,以及便于快速集成的清晰 documentation。

  • OpenAPI 3.0 specification
  • 用于 testing 的 Swagger UI
  • curl、Python 和 Node.js 示例
  • 每个 field 与 response code 的说明
  • Integration 支持
  • 简化的 API client generation
打开 API 文档
https://lix.li/api/1.0
POST /links 创建链接
GET /links 链接列表
GET /links/{id} 获取链接
PATCH /links/{id} 编辑链接
DELETE /links/{id} 删除链接
GET /analytics Analytics
GET /groups Groups
POST /webhooks 创建 Webhook

Short Links API 与 URL Shortener API 的使用场景

在真实业务场景中使用 short links API 的 products、services 和 automation workflows。

SaaS Products

用于 user interfaces、referral programs、onboarding flows、notifications 和 product workflows 中的 short links。

Marketing Platforms

为 campaigns、publications、channels 和广告自动创建 links,并结合 UTM tags、analytics 和 tracking pixels。

CRM Systems

用于 CRM 系统中的 personalized short links、customers、email sequences、deals 和 user workflow tracking。

Automation Workflows

与 Zapier、Make、n8n 及 internal workflows 集成。通过 API 自动完成 link creation、updates 和 management。

Internal Tools

在 admin panels、dashboards、service tools 和 internal products 中使用 short links,无需手动管理 URLs。

Analytics Pipelines

通过 API 获取 clicks、traffic 和 analytics 数据,用于 BI systems、custom dashboards、data pipelines 和内部报告。

开始使用 Short Links API

Documentation、request examples、Swagger UI,以及无需复杂配置的快速开始。几分钟内即可将 API 集成到您的 product、service 或 automation workflow 中。

关于 Short Links API 的常见问题

API 支持创建、编辑、删除和获取 short links,同时还能管理 groups、tags、custom domains、tracking pixels、analytics 和 webhook notifications。所有功能均通过 REST API 与 JSON responses 提供。
是的。API 使用标准 HTTP methods(GET、POST、PATCH、DELETE)、清晰的 URL 结构、semantic endpoints 和 predictable response codes。所有 responses 均以 JSON 格式返回。
JSON。每个 endpoint 都会返回包含 predictable fields 的 structured data。Errors 包含 code、message 和额外 context,便于 troubleshooting 与 debugging。
是的。提供 OpenAPI 3.0 specification,包含 interactive Swagger UI、request examples 以及可直接在 browser 中进行 API testing。
Authentication 使用 X-Api-key header 中的 tokens。API keys 可以在 dashboard 中创建、rotate 和 revoke。
API limits 取决于所选 plan。当前限制与 rate limits 状态可在 API responses 和 documentation 中查看。
Webhooks 会在发生 system events(例如 link creation、clicks、updates 或 limit events)时向您的 endpoint 发送 HTTP requests。这使您无需持续 polling API,也能获得 real-time data。
可以。Analytics endpoint 提供 clicks、countries、devices、browsers、traffic sources 等 metrics 数据,并支持按 dates、links、groups 和 data ranges 使用 filters。
提供 basic API access 用于 testing。可用 features 与 limits 取决于您的 plan。Advanced functionality 在付费 plans 中提供。
有。API 持续发展中:不断增加新的 endpoints、扩展 documentation、添加更多 webhook events 和 automation capabilities。所有 changes 都采用 versioning,以确保 compatibility。
支持 bank cards、Bitcoin (BTC)、TON 和 USDT (TRC20)。Enterprise customers 还可使用 invoice billing。