{"openapi":"3.1.0","info":{"title":"Mini Lnk API","version":"1.0.0","description":"Create short links. Every link needs a source_subject describing where it will be used (e.g. 'OECD report', 'Bluesky post'). If you cannot infer it, ask the user before calling."},"servers":[{"url":"https://minilnk.uk/api/v1"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"CreateLink":{"type":"object","required":["destination_url","source_subject"],"properties":{"destination_url":{"type":"string","format":"uri","description":"http(s) URL to redirect to"},"source_subject":{"type":"string","description":"Where the link is used, e.g. 'OECD report'"}}},"Link":{"type":"object","properties":{"link_id":{"type":"string","format":"uuid"},"short_url":{"type":"string","format":"uri"},"destination_url":{"type":"string"},"source_subject":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["active","disabled"]}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"}}}}}}},"security":[{"bearerAuth":[]}],"paths":{"/links":{"post":{"operationId":"createShortLink","summary":"Create a short link","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLink"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"401":{"description":"Invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error (e.g. source_subject_required)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited"}}}}}}