{"openapi":"3.1.0","info":{"title":"LinkForge REST API","version":"1.0.0","description":"Agency developer module (79€). Same Studio and bio engines as the dashboard and MCP — not a second publisher. Business (26€) keeps Studio + MCP; REST keys are Agency-only.\n\n## Auth\nSend `Authorization: Bearer lf_live_…` or `lf_test_…`. Keys are hashed at rest. Scopes are granted per key.\n\n## Live vs sandbox\n- **Live keys** share the Agency Studio cap of **800 publishes per UTC month** (all networks combined). REST itself also allows **2000 API calls per UTC day**.\n- **Sandbox keys** (`lf_test_`) cannot publish (`intent=publish` returns `sandbox_publish_blocked`). They may draft and schedule in Studio records, and may call the API up to **10000 times per UTC day**. Sandbox does not consume the 800 live publishes.\n\n## Pagination\nList endpoints accept `limit` (1–100, default 20) plus either `cursor` (`next_cursor` from the previous page) or `page` (1-based). Responses use the `Page` envelope: `data`, `next_cursor`, `limit`, `page`.\n\n## Errors\nEvery error is `{ \"error\": \"<code>\", \"code\": \"<code>\" }`. Typical statuses: 401 invalid key, 402 Agency required, 403 missing scope / sandbox publish, 404 missing resource, 429 REST or Studio quota.\n\n## Rate-limit headers\n`X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (next UTC midnight), `X-LinkForge-Environment`. 429 also sends `Retry-After`.\n\n## Idempotency\nPOST `/posts` accepts `Idempotency-Key` (header) or `idempotency_key` (body). Replays return the original post.\n\n## Webhooks\nHMAC: `X-LinkForge-Signature: sha256=<hex>` over `{timestamp}.{rawBody}`. Also `X-LinkForge-Timestamp`, `X-LinkForge-Event`, `X-LinkForge-Environment`."},"servers":[{"url":"https://linkforge.me/api/v1","description":"Live"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"spec","description":"Public OpenAPI document. No auth."},{"name":"posts","description":"Studio calendar — same engine as the dashboard."},{"name":"accounts","description":"Connected Studio networks."},{"name":"bio","description":"Public bio page: profile, links, themes, featured-sync."},{"name":"analytics","description":"Page views and link clicks."},{"name":"webhooks","description":"HTTPS endpoints + HMAC secrets."},{"name":"agency","description":"Workspaces, clients, members, roles (79€)."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"lf_live_… or lf_test_… API key. Keys are hashed at rest."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":120},"description":"Optional. Same as body `idempotency_key`. Header wins when both are sent.","example":"camp-2026-11-26-01"}},"schemas":{"Error":{"type":"object","required":["error","code"],"properties":{"error":{"type":"string","example":"api_key_invalid"},"code":{"type":"string","example":"api_key_invalid"}},"example":{"error":"api_key_invalid","code":"api_key_invalid"}},"Page":{"type":"object","required":["data","next_cursor","limit"],"properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true},"limit":{"type":"integer"},"page":{"type":"integer","nullable":true}},"example":{"data":[{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","title":"Spring drop","caption":"New merch is live.","platforms":["instagram","x"],"status":"scheduled","error":null,"scheduled_at":"2026-11-26T09:00:00.000Z","published_at":null,"published_url":null,"results":{},"media_url":"https://cdn.example.com/drop.jpg"}],"next_cursor":"MjAyNi0xMS0yNVQxMDowMDowMC4wMDBa","limit":20,"page":1}},"Post":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"caption":{"type":"string"},"platforms":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["draft","scheduled","processing","published","failed"]},"error":{"type":"string","nullable":true},"scheduled_at":{"type":"string","nullable":true},"published_at":{"type":"string","nullable":true},"published_url":{"type":"string","nullable":true},"results":{"type":"object"},"media_url":{"type":"string","nullable":true}},"example":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","title":"Spring drop","caption":"New merch is live.","platforms":["instagram","x"],"status":"scheduled","error":null,"scheduled_at":"2026-11-26T09:00:00.000Z","published_at":null,"published_url":null,"results":{},"media_url":"https://cdn.example.com/drop.jpg"}},"Link":{"type":"object","properties":{"id":{"type":"string"},"page_id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"description":{"type":"string","nullable":true},"icon":{"type":"string","nullable":true},"order_position":{"type":"integer"},"is_enabled":{"type":"boolean"},"click_count":{"type":"integer"},"created_at":{"type":"string","nullable":true}},"example":{"id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","page_id":"11111111-2222-3333-4444-555555555555","title":"Shop","url":"https://example.com/shop","description":"Merch","icon":null,"order_position":0,"is_enabled":true,"click_count":42,"created_at":"2026-11-01T12:00:00.000Z"}},"Profile":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"title":{"type":"string","nullable":true},"bio":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"avatar_url":{"type":"string","nullable":true},"is_published":{"type":"boolean"},"theme_id":{"type":"string","nullable":true},"custom_domain":{"type":"string","nullable":true}},"example":{"id":"11111111-2222-3333-4444-555555555555","slug":"studio-north","url":"https://linkforge.me/u/studio-north","title":"Studio North","bio":"Brand studio in Lyon.","description":"Campaigns and bio links.","avatar_url":"https://cdn.example.com/avatar.jpg","is_published":true,"theme_id":"harbor-fog","custom_domain":null}},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"environment":{"type":"string","enum":["live","sandbox"]},"is_enabled":{"type":"boolean"},"created_at":{"type":"string"},"secret_hint":{"type":"string"},"secret":{"type":"string","description":"Plaintext secret, only on create/rotate."}},"example":{"id":"22222222-3333-4444-5555-666666666666","url":"https://hooks.example.com/linkforge","events":["post.published","post.failed"],"environment":"live","is_enabled":true,"created_at":"2026-11-20T08:00:00.000Z","secret_hint":"whsec_ab…"}},"Workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"owner_id":{"type":"string"},"role":{"type":"string","enum":["owner","manager","editor","validator","client"],"nullable":true},"created_at":{"type":"string"}},"example":{"id":"33333333-4444-5555-6666-777777777777","name":"North Agency","slug":"north-agency","owner_id":"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee","role":"owner","created_at":"2026-10-01T10:00:00.000Z"}},"Client":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"display_name":{"type":"string"},"page_id":{"type":"string","nullable":true},"client_user_id":{"type":"string","nullable":true},"validation_required":{"type":"boolean"}},"example":{"id":"44444444-5555-6666-7777-888888888888","workspace_id":"33333333-4444-5555-6666-777777777777","display_name":"Atelier Jade","page_id":"11111111-2222-3333-4444-555555555555","client_user_id":"bbbbbbbb-cccc-dddd-eeee-ffffffffffff","validation_required":true}},"Member":{"type":"object","properties":{"user_id":{"type":"string"},"workspace_id":{"type":"string"},"role":{"type":"string","enum":["owner","manager","editor","validator","client"]},"email":{"type":"string","nullable":true},"created_at":{"type":"string"}},"example":{"user_id":"cccccccc-dddd-eeee-ffff-000000000000","workspace_id":"33333333-4444-5555-6666-777777777777","role":"editor","email":"editor@agency.example","created_at":"2026-10-02T10:00:00.000Z"}}}},"paths":{"/openapi":{"get":{"tags":["spec"],"summary":"Download this OpenAPI document","description":"Public. CORS `*`, no auth, not bot-blocked. Safe to fetch from a browser.","security":[],"responses":{"200":{"description":"OpenAPI 3.1 document","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string","example":"*"}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"openapi":"3.1.0","info":{"title":"LinkForge REST API","version":"1.0.0"}}}}}}}},"/posts":{"get":{"tags":["posts"],"summary":"List Studio posts","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Page size (max 100).","example":20},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from `next_cursor`. Ignored when `page` is set.","example":"MjAyNi0xMS0yNVQxMDowMDowMC4wMDBa"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page index. Alternative to cursor.","example":1},{"name":"status","in":"query","schema":{"type":"string","enum":["draft","scheduled","processing","published","failed"]},"example":"scheduled"},{"name":"platform","in":"query","schema":{"type":"string"},"example":"instagram"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Page"},{"type":"object","properties":{"posts":{"type":"array","items":{"$ref":"#/components/schemas/Post"}}}}]},"example":{"data":[{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","title":"Spring drop","caption":"New merch is live.","platforms":["instagram","x"],"status":"scheduled","error":null,"scheduled_at":"2026-11-26T09:00:00.000Z","published_at":null,"published_url":null,"results":{},"media_url":"https://cdn.example.com/drop.jpg"}],"next_cursor":"MjAyNi0xMS0yNVQxMDowMDowMC4wMDBa","limit":20,"page":1,"posts":[{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","title":"Spring drop","caption":"New merch is live.","platforms":["instagram","x"],"status":"scheduled","error":null,"scheduled_at":"2026-11-26T09:00:00.000Z","published_at":null,"published_url":null,"results":{},"media_url":"https://cdn.example.com/drop.jpg"}],"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"post":{"tags":["posts"],"summary":"Create a Studio post","description":"Same engine as the calendar. Sandbox keys cannot `publish`.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platforms":{"type":"array","items":{"type":"string"}},"title":{"type":"string"},"caption":{"type":"string"},"intent":{"type":"string","enum":["draft","schedule","publish"]},"scheduled_at":{"type":"string"},"media_url":{"type":"string"},"idempotency_key":{"type":"string"}}},"example":{"platforms":["instagram","x"],"title":"Spring drop","caption":"New merch is live.","intent":"schedule","scheduled_at":"2026-11-26T09:00:00.000Z","media_url":"https://cdn.example.com/drop.jpg","idempotency_key":"camp-2026-11-26-01"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"post":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","title":"Spring drop","caption":"New merch is live.","platforms":["instagram","x"],"status":"scheduled","error":null,"scheduled_at":"2026-11-26T09:00:00.000Z","published_at":null,"published_url":null,"results":{},"media_url":"https://cdn.example.com/drop.jpg"},"environment":"live"}}}},"400":{"description":"Validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"platform_required","code":"platform_required"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/posts/{id}":{"get":{"tags":["posts"],"summary":"Get one Studio post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"3f2c8b1a-4d55-4c1e-9b7a-0c1d2e3f4a5b"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"post":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","title":"Spring drop","caption":"New merch is live.","platforms":["instagram","x"],"status":"scheduled","error":null,"scheduled_at":"2026-11-26T09:00:00.000Z","published_at":null,"published_url":null,"results":{},"media_url":"https://cdn.example.com/drop.jpg"},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"patch":{"tags":["posts"],"summary":"Update caption, schedule, or intent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"3f2c8b1a-4d55-4c1e-9b7a-0c1d2e3f4a5b"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"caption":{"type":"string"},"scheduled_at":{"type":"string"},"intent":{"type":"string","enum":["draft","schedule","publish"]}}},"example":{"caption":"Updated caption","intent":"schedule","scheduled_at":"2026-11-27T09:00:00.000Z"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"post":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","title":"Spring drop","caption":"Updated caption","platforms":["instagram","x"],"status":"scheduled","error":null,"scheduled_at":"2026-11-26T09:00:00.000Z","published_at":null,"published_url":null,"results":{},"media_url":"https://cdn.example.com/drop.jpg"},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"delete":{"tags":["posts"],"summary":"Cancel a scheduled post or remove the Studio record","description":"Cancels scheduled posts and deletes the Studio row. Processing jobs cannot be deleted. This does not call network unpublish APIs; it removes the calendar item the product already supports deleting.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"3f2c8b1a-4d55-4c1e-9b7a-0c1d2e3f4a5b"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"deleted":"7c9e6679-7425-40de-944b-e07fc1f90ae7","environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"409":{"description":"Still processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"cannot_delete_processing","code":"cannot_delete_processing"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/accounts":{"get":{"tags":["accounts"],"summary":"List connected Studio accounts","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Page size (max 100).","example":20},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from `next_cursor`. Ignored when `page` is set.","example":"MjAyNi0xMS0yNVQxMDowMDowMC4wMDBa"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page index. Alternative to cursor.","example":1},{"name":"platform","in":"query","schema":{"type":"string"},"example":"instagram"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"data":[{"id":"acc_1","platform":"instagram","account_name":"@studio.north","status":"active","connected_at":"2026-09-01T00:00:00.000Z"}],"next_cursor":null,"limit":20,"page":1,"accounts":[{"id":"acc_1","platform":"instagram","account_name":"@studio.north","status":"active","connected_at":"2026-09-01T00:00:00.000Z"}],"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/bio":{"get":{"tags":["bio"],"summary":"Read bio-sync rules and featured posts","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"rules":{"page_id":"11111111-2222-3333-4444-555555555555","mode":"latest","platforms":["instagram"],"ttl_days":30,"max_items":6},"featured":[],"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"patch":{"tags":["bio"],"summary":"Save bio-sync rules or feature a published post","requestBody":{"content":{"application/json":{"schema":{"type":"object"},"example":{"action":"save","mode":"latest","platforms":["instagram"],"ttl_days":30,"max_items":6}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"rules":{"page_id":"11111111-2222-3333-4444-555555555555","mode":"latest","platforms":["instagram"],"ttl_days":30,"max_items":6},"featured":[],"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/bio/profile":{"get":{"tags":["bio"],"summary":"Read the public bio profile","responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"profile":{"id":"11111111-2222-3333-4444-555555555555","slug":"studio-north","url":"https://linkforge.me/u/studio-north","title":"Studio North","bio":"Brand studio in Lyon.","description":"Campaigns and bio links.","avatar_url":"https://cdn.example.com/avatar.jpg","is_published":true,"theme_id":"harbor-fog","custom_domain":null},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"patch":{"tags":["bio"],"summary":"Update title, bio, avatar, or publish flag","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"bio":{"type":"string"},"description":{"type":"string"},"avatar_url":{"type":"string","nullable":true},"is_published":{"type":"boolean"}}},"example":{"title":"Studio North","bio":"Brand studio in Lyon.","avatar_url":"https://cdn.example.com/avatar.jpg"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"profile":{"id":"11111111-2222-3333-4444-555555555555","slug":"studio-north","url":"https://linkforge.me/u/studio-north","title":"Studio North","bio":"Brand studio in Lyon.","description":"Campaigns and bio links.","avatar_url":"https://cdn.example.com/avatar.jpg","is_published":true,"theme_id":"harbor-fog","custom_domain":null},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/bio/links":{"get":{"tags":["bio"],"summary":"List bio links","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Page size (max 100).","example":20},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from `next_cursor`. Ignored when `page` is set.","example":"MjAyNi0xMS0yNVQxMDowMDowMC4wMDBa"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page index. Alternative to cursor.","example":1},{"name":"enabled","in":"query","schema":{"type":"boolean"},"example":true}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"data":[{"id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","page_id":"11111111-2222-3333-4444-555555555555","title":"Shop","url":"https://example.com/shop","description":"Merch","icon":null,"order_position":0,"is_enabled":true,"click_count":42,"created_at":"2026-11-01T12:00:00.000Z"}],"next_cursor":null,"limit":20,"page":1,"links":[{"id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","page_id":"11111111-2222-3333-4444-555555555555","title":"Shop","url":"https://example.com/shop","description":"Merch","icon":null,"order_position":0,"is_enabled":true,"click_count":42,"created_at":"2026-11-01T12:00:00.000Z"}],"page_id":"11111111-2222-3333-4444-555555555555","environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"post":{"tags":["bio"],"summary":"Create a bio link","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","url"],"properties":{"title":{"type":"string"},"url":{"type":"string"},"description":{"type":"string"},"is_enabled":{"type":"boolean"}}},"example":{"title":"Shop","url":"https://example.com/shop","description":"Merch"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"link":{"id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","page_id":"11111111-2222-3333-4444-555555555555","title":"Shop","url":"https://example.com/shop","description":"Merch","icon":null,"order_position":0,"is_enabled":true,"click_count":42,"created_at":"2026-11-01T12:00:00.000Z"},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/bio/links/reorder":{"post":{"tags":["bio"],"summary":"Reorder bio links","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}}}},"example":{"ids":["a1b2c3d4-e5f6-7890-abcd-ef1234567890","99999999-aaaa-bbbb-cccc-ddddeeeeffff"]}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"ids":["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],"links":[{"id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","page_id":"11111111-2222-3333-4444-555555555555","title":"Shop","url":"https://example.com/shop","description":"Merch","icon":null,"order_position":0,"is_enabled":true,"click_count":42,"created_at":"2026-11-01T12:00:00.000Z"}],"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/bio/links/{id}":{"get":{"tags":["bio"],"summary":"Get one bio link","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"3f2c8b1a-4d55-4c1e-9b7a-0c1d2e3f4a5b"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"link":{"id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","page_id":"11111111-2222-3333-4444-555555555555","title":"Shop","url":"https://example.com/shop","description":"Merch","icon":null,"order_position":0,"is_enabled":true,"click_count":42,"created_at":"2026-11-01T12:00:00.000Z"},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"patch":{"tags":["bio"],"summary":"Update a bio link","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"3f2c8b1a-4d55-4c1e-9b7a-0c1d2e3f4a5b"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"description":{"type":"string"},"is_enabled":{"type":"boolean"}}},"example":{"title":"Shop","is_enabled":true}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"link":{"id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","page_id":"11111111-2222-3333-4444-555555555555","title":"Shop","url":"https://example.com/shop","description":"Merch","icon":null,"order_position":0,"is_enabled":true,"click_count":42,"created_at":"2026-11-01T12:00:00.000Z"},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"delete":{"tags":["bio"],"summary":"Delete a bio link","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"3f2c8b1a-4d55-4c1e-9b7a-0c1d2e3f4a5b"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"deleted":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/bio/themes":{"get":{"tags":["bio"],"summary":"List public-page themes","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Page size (max 100).","example":20},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from `next_cursor`. Ignored when `page` is set.","example":"MjAyNi0xMS0yNVQxMDowMDowMC4wMDBa"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page index. Alternative to cursor.","example":1},{"name":"premium","in":"query","schema":{"type":"boolean"},"example":false}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"data":[{"id":"harbor-fog","name":"Harbor Fog","category":"free","is_premium":false,"required_plan":"free"}],"next_cursor":null,"limit":20,"page":1,"themes":[{"id":"harbor-fog","name":"Harbor Fog","category":"free","is_premium":false,"required_plan":"free"}],"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/bio/themes/{id}":{"post":{"tags":["bio"],"summary":"Apply a theme to the public page","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"harbor-fog"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"theme":{"id":"harbor-fog","name":"Harbor Fog","category":"free","is_premium":false},"profile":{"id":"11111111-2222-3333-4444-555555555555","slug":"studio-north","url":"https://linkforge.me/u/studio-north","title":"Studio North","bio":"Brand studio in Lyon.","description":"Campaigns and bio links.","avatar_url":"https://cdn.example.com/avatar.jpg","is_published":true,"theme_id":"harbor-fog","custom_domain":null},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/analytics":{"get":{"tags":["analytics"],"summary":"Page views, link clicks, featured-module clicks","parameters":[{"name":"period","in":"query","schema":{"type":"string","enum":["7d","30d","90d"]},"example":"7d"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"analytics":{"page_id":"11111111-2222-3333-4444-555555555555","slug":"studio-north","period":"7d","days":7,"total_views":120,"total_clicks":42,"featured_clicks":8,"links":[{"id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","page_id":"11111111-2222-3333-4444-555555555555","title":"Shop","url":"https://example.com/shop","description":"Merch","icon":null,"order_position":0,"is_enabled":true,"click_count":42,"created_at":"2026-11-01T12:00:00.000Z"}],"featured":[]},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/webhooks":{"get":{"tags":["webhooks"],"summary":"List webhook endpoints","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Page size (max 100).","example":20},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from `next_cursor`. Ignored when `page` is set.","example":"MjAyNi0xMS0yNVQxMDowMDowMC4wMDBa"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page index. Alternative to cursor.","example":1},{"name":"environment","in":"query","schema":{"type":"string","enum":["live","sandbox"]},"example":"live"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"data":[{"id":"22222222-3333-4444-5555-666666666666","url":"https://hooks.example.com/linkforge","events":["post.published","post.failed"],"environment":"live","is_enabled":true,"created_at":"2026-11-20T08:00:00.000Z","secret_hint":"whsec_ab…"}],"next_cursor":null,"limit":20,"page":1,"endpoints":[{"id":"22222222-3333-4444-5555-666666666666","url":"https://hooks.example.com/linkforge","events":["post.published","post.failed"],"environment":"live","is_enabled":true,"created_at":"2026-11-20T08:00:00.000Z","secret_hint":"whsec_ab…"}],"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"post":{"tags":["webhooks"],"summary":"Create a webhook endpoint","description":"Returns the plaintext `secret` once. HMAC stays `sha256` over `{timestamp}.{rawBody}`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"environment":{"type":"string","enum":["live","sandbox"]},"is_enabled":{"type":"boolean"}}},"example":{"url":"https://hooks.example.com/linkforge","events":["post.published","post.failed"]}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"endpoint":{"id":"22222222-3333-4444-5555-666666666666","url":"https://hooks.example.com/linkforge","events":["post.published","post.failed"],"environment":"live","is_enabled":true,"created_at":"2026-11-20T08:00:00.000Z","secret_hint":"whsec_ab…","secret":"whsec_abcdefghijklmnopqrstuv"},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/webhooks/{id}":{"get":{"tags":["webhooks"],"summary":"Get a webhook endpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"3f2c8b1a-4d55-4c1e-9b7a-0c1d2e3f4a5b"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"endpoint":{"id":"22222222-3333-4444-5555-666666666666","url":"https://hooks.example.com/linkforge","events":["post.published","post.failed"],"environment":"live","is_enabled":true,"created_at":"2026-11-20T08:00:00.000Z","secret_hint":"whsec_ab…"},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"delete":{"tags":["webhooks"],"summary":"Delete a webhook endpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"3f2c8b1a-4d55-4c1e-9b7a-0c1d2e3f4a5b"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"deleted":"22222222-3333-4444-5555-666666666666","environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/webhooks/{id}/rotate":{"post":{"tags":["webhooks"],"summary":"Rotate the HMAC secret","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"3f2c8b1a-4d55-4c1e-9b7a-0c1d2e3f4a5b"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"endpoint":{"id":"22222222-3333-4444-5555-666666666666","url":"https://hooks.example.com/linkforge","events":["post.published","post.failed"],"environment":"live","is_enabled":true,"created_at":"2026-11-20T08:00:00.000Z","secret_hint":"whsec_ab…","secret":"whsec_newsecretvalue123456"},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/workspaces":{"get":{"tags":["agency"],"summary":"List Agency workspaces","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Page size (max 100).","example":20},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from `next_cursor`. Ignored when `page` is set.","example":"MjAyNi0xMS0yNVQxMDowMDowMC4wMDBa"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page index. Alternative to cursor.","example":1}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"data":[{"id":"33333333-4444-5555-6666-777777777777","name":"North Agency","slug":"north-agency","owner_id":"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee","role":"owner","created_at":"2026-10-01T10:00:00.000Z"}],"next_cursor":null,"limit":20,"page":1,"workspaces":[{"id":"33333333-4444-5555-6666-777777777777","name":"North Agency","slug":"north-agency","owner_id":"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee","role":"owner","created_at":"2026-10-01T10:00:00.000Z"}],"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/workspaces/{id}":{"get":{"tags":["agency"],"summary":"Get one workspace","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"33333333-4444-5555-6666-777777777777"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"workspace":{"id":"33333333-4444-5555-6666-777777777777","name":"North Agency","slug":"north-agency","owner_id":"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee","role":"owner","created_at":"2026-10-01T10:00:00.000Z"},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/workspaces/{id}/clients":{"get":{"tags":["agency"],"summary":"List clients in a workspace","description":"Client-role members only see their own row. Staff see the desk. Does not bypass RLS-equivalent filters.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"33333333-4444-5555-6666-777777777777"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Page size (max 100).","example":20},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from `next_cursor`. Ignored when `page` is set.","example":"MjAyNi0xMS0yNVQxMDowMDowMC4wMDBa"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page index. Alternative to cursor.","example":1}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"data":[{"id":"44444444-5555-6666-7777-888888888888","workspace_id":"33333333-4444-5555-6666-777777777777","display_name":"Atelier Jade","page_id":"11111111-2222-3333-4444-555555555555","client_user_id":"bbbbbbbb-cccc-dddd-eeee-ffffffffffff","validation_required":true}],"next_cursor":null,"limit":20,"page":1,"clients":[{"id":"44444444-5555-6666-7777-888888888888","workspace_id":"33333333-4444-5555-6666-777777777777","display_name":"Atelier Jade","page_id":"11111111-2222-3333-4444-555555555555","client_user_id":"bbbbbbbb-cccc-dddd-eeee-ffffffffffff","validation_required":true}],"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"post":{"tags":["agency"],"summary":"Add or invite a client","description":"Owner/manager only (same as `agency_clients_write` / `agency_members_write`).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"33333333-4444-5555-6666-777777777777"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":"string"},"email":{"type":"string"},"page_id":{"type":"string"},"client_user_id":{"type":"string"}}},"example":{"display_name":"Atelier Jade","email":"jade@client.example"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"client":{"id":"44444444-5555-6666-7777-888888888888","workspace_id":"33333333-4444-5555-6666-777777777777","display_name":"Atelier Jade","page_id":"11111111-2222-3333-4444-555555555555","client_user_id":"bbbbbbbb-cccc-dddd-eeee-ffffffffffff","validation_required":true},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}},"/workspaces/{id}/members":{"get":{"tags":["agency"],"summary":"List workspace members and roles","description":"Client-role keys only see themselves. Staff see the roster.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"33333333-4444-5555-6666-777777777777"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Page size (max 100).","example":20},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from `next_cursor`. Ignored when `page` is set.","example":"MjAyNi0xMS0yNVQxMDowMDowMC4wMDBa"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page index. Alternative to cursor.","example":1}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"data":[{"user_id":"cccccccc-dddd-eeee-ffff-000000000000","workspace_id":"33333333-4444-5555-6666-777777777777","role":"editor","email":"editor@agency.example","created_at":"2026-10-02T10:00:00.000Z"}],"next_cursor":null,"limit":20,"page":1,"members":[{"user_id":"cccccccc-dddd-eeee-ffff-000000000000","workspace_id":"33333333-4444-5555-6666-777777777777","role":"editor","email":"editor@agency.example","created_at":"2026-10-02T10:00:00.000Z"}],"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}},"post":{"tags":["agency"],"summary":"Invite or assign a member role","description":"Owner/manager only. The invitee must already have a LinkForge user (email lookup). Roles: manager, editor, validator, client.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"33333333-4444-5555-6666-777777777777"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"user_id":{"type":"string"},"role":{"type":"string","enum":["owner","manager","editor","validator","client"]}}},"example":{"email":"editor@agency.example","role":"editor"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}}},"content":{"application/json":{"schema":{"type":"object"},"example":{"member":{"user_id":"cccccccc-dddd-eeee-ffff-000000000000","workspace_id":"33333333-4444-5555-6666-777777777777","role":"editor","email":"editor@agency.example","created_at":"2026-10-02T10:00:00.000Z"},"environment":"live"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"api_key_invalid","code":"api_key_invalid"}}}},"402":{"description":"Agency plan required (79€)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"agency_required","code":"agency_required","required_plan":"agency"}}}},"403":{"description":"Missing scope or sandbox cannot publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","code":"invalid_scope","required_scope":"posts:write"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_found","code":"not_found"}}}},"429":{"description":"Daily REST call cap reached","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer","example":2000},"description":"REST calls allowed today for this key environment."},"X-RateLimit-Remaining":{"schema":{"type":"integer","example":1999}},"X-RateLimit-Reset":{"schema":{"type":"string","format":"date-time"},"description":"UTC time when the daily REST call window resets."},"X-LinkForge-Environment":{"schema":{"type":"string","enum":["live","sandbox"]}},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the UTC day resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"usage_quota_reached","code":"usage_quota_reached","cap":2000,"used":2000}}}}}}}},"x-linkforge":{"scopes":["posts:read","posts:write","accounts:read","bio:read","bio:write","analytics:read","webhooks:manage","agency:read","agency:write"],"webhook_events":["post.published","post.failed","bio.link.clicked"],"live_daily_cap":2000,"sandbox_daily_cap":10000,"live_monthly_publish_cap":800,"hmac":"X-LinkForge-Signature: sha256=<hex> over `{timestamp}.{rawBody}`","public_openapi":"GET /api/v1/openapi — CORS *, no auth, Allow in robots.txt"}}