我们的公共API允许您以编程方式缩短URL。不需要API密钥或身份验证。
发送单个对象或对象数组以缩短URL。
{
"domain": "clc.is",
"target_url": "https://example.com",
"slug": "custom", // 可选
"expired_url": "https://expired.example.com", // 可选
"expired_hours": 48 // 可选 (0 = 不过期)
}
{
"input": { ... },
"slug": "custom",
"url": "https://clc.is/custom",
"is_generated": false
}
返回一个可用域名的数组以缩短链接。
["clc.is", "alt1.com", "alt2.com"]
409 Conflict
— 如果slug已被占用400 Bad Request
— 缺少或无效的参数要一次提交最多5000个URL,请使用批量页面或将条目数组发送到/api/links
。