{"openapi":"3.1.0","info":{"title":"GEO Short Link Agent API","version":"1.0.0","description":"为已配置的跳转规则创建带内部归因信息的静态短链。"},"paths":{"/api/agent/short-links":{"post":{"summary":"创建或幂等返回短链","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShortLink"},"example":{"project":"wdcloud","rule_key":"register","platform":"github","item":"readme-main","visitor_type":"public","publish_date":"2026-08-21","enabled":true}}}},"responses":{"200":{"description":"相同 Idempotency-Key 的已有结果"},"201":{"description":"创建成功"},"401":{"description":"Bearer 密钥无效"},"404":{"description":"规则不存在"},"409":{"description":"slug 冲突或幂等参数冲突"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key"}},"schemas":{"CreateShortLink":{"type":"object","additionalProperties":false,"required":["project","rule_key","platform","item","visitor_type","publish_date","enabled"],"properties":{"project":{"type":"string","example":"wdcloud"},"rule_key":{"type":"string","example":"register"},"slug":{"type":"string","description":"可选；不传时由服务生成 10 位随机 slug。"},"platform":{"type":"string","example":"github"},"item":{"type":"string","example":"readme-main"},"visitor_type":{"type":"string","enum":["public","internal","smoke","test"]},"publish_date":{"type":"string","format":"date"},"enabled":{"type":"boolean"}}}}}}