{"openapi":"3.1.0","info":{"title":"LinkDevi Agent API","version":"1.4.0","description":"Saved campaigns, local MCP, honest lifetime redirect counters and source-labelled conversion reports. Bearer credentials share workspace quotas. Remote OAuth and payment verification are not included."},"servers":[{"url":"https://linkdevi.com"}],"externalDocs":{"description":"LinkDevi API guide and end-to-end quickstart","url":"https://linkdevi.com/docs/api"},"paths":{"/api/v1/links/audit":{"get":{"operationId":"auditSavedLinks","security":[{"bearerAuth":[]}],"description":"Requires links:read. Read-only inventory inspection of at most the latest 500 saved workspace links, ordered by creation time and ID. No destination requests or mutations. Potential duplicate destinations preserve query order, fragments and UTM values. Duplicate coverage is limited to the sample; hasMore identifies additional uninspected links. Also flags expiry within seven days, expiry, inactive links, click limits and invalid stored addresses. No query parameters. Twelve audit requests/workspace/minute shared with the website; normal bearer limits also apply. Not a new tool in the published local MCP/SDK package.","responses":{"200":{"description":"Bounded inventory findings, never a destination health/safety claim.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version":{"type":"string","const":"link-inventory-audit-v1"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"readOnly":{"type":"boolean","const":true},"networkRequestsToDestinations":{"type":"boolean","const":false},"coverage":{"type":"object","properties":{"sample":{"type":"string","const":"latest_saved_links"},"maxLinks":{"type":"number","const":500},"scanned":{"type":"integer","minimum":0,"maximum":500},"hasMore":{"type":"boolean"},"duplicateScope":{"type":"string","const":"within_this_sample_only"}},"required":["sample","maxLinks","scanned","hasMore","duplicateScope"],"additionalProperties":false},"summary":{"type":"object","properties":{"linksWithFindings":{"type":"integer","minimum":0,"maximum":500},"duplicateGroups":{"type":"integer","minimum":0,"maximum":250},"expired":{"type":"integer","minimum":0,"maximum":500},"expiringWithin7Days":{"type":"integer","minimum":0,"maximum":500}},"required":["linksWithFindings","duplicateGroups","expired","expiringWithin7Days"],"additionalProperties":false},"findings":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"linkId":{"type":"string"},"shortUrl":{"type":["string","null"]},"codes":{"type":"array","items":{"type":"string","enum":["DUPLICATE_DESTINATION","EXPIRED","EXPIRING_SOON","INACTIVE","CLICK_LIMIT_REACHED","INVALID_DESTINATION","INVALID_SHORT_ADDRESS","UNVERIFIED_DOMAIN"]}},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["linkId","shortUrl","codes","expiresAt"],"additionalProperties":false}},"duplicateGroups":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"totalLinks":{"type":"integer","minimum":0,"maximum":9007199254740991},"linkIds":{"maxItems":20,"type":"array","items":{"type":"string"}},"truncated":{"type":"boolean"}},"required":["totalLinks","linkIds","truncated"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["version","generatedAt","readOnly","networkRequestsToDestinations","coverage","summary","findings","duplicateGroups","limitations"],"additionalProperties":false}}}},"400":{"description":"Unsupported query parameter."},"401":{"description":"Invalid credential."},"403":{"description":"Missing links:read."},"429":{"description":"Shared request budget; respect Retry-After."},"503":{"description":"Tool data/admission unavailable; not an empty clean audit."}}}},"/api/v1/campaigns/{campaignId}/print-pack":{"get":{"operationId":"readCampaignQrPrintPack","security":[{"bearerAuth":[]}],"parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,100}$"}}],"description":"Requires links:read. Returns an A4 HTML print pack and SVG data URLs for at most eight existing campaign channels in the credential's workspace. Uses each saved link's stored short domain; no new link, stored QR record or persistent file. Missing, inactive, expired, exhausted or invalid addresses are excluded and labelled in unavailable. No destination is fetched. No query parameters. Twelve print-pack requests/workspace/minute shared with the website; normal bearer limits apply. The HTML has no script or external image requests. Print a proof and test each QR before production printing. Not a new tool in the published local MCP/SDK package.","responses":{"200":{"description":"Printable saved channels, unavailable reasons and standalone HTML.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version":{"type":"string","const":"campaign-qr-print-v1"},"campaignId":{"type":"string"},"name":{"type":"string"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createsResources":{"type":"boolean","const":false},"paper":{"type":"string","const":"A4"},"cards":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["facebook","instagram","tiktok","line","email","print","youtube","x"]},"label":{"type":"string"},"linkId":{"type":"string"},"shortUrl":{"type":"string"},"qrDataUrl":{"type":"string"}},"required":["channel","label","linkId","shortUrl","qrDataUrl"],"additionalProperties":false}},"unavailable":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"channel":{"type":"string"},"reason":{"type":"string","enum":["missing_link","inactive","expired","click_limit_reached","invalid_short_address","unverified_domain"]}},"required":["channel","reason"],"additionalProperties":false}},"html":{"type":"string"}},"required":["version","campaignId","name","generatedAt","createsResources","paper","cards","unavailable","html"],"additionalProperties":false}}}},"400":{"description":"Unsupported query parameter."},"401":{"description":"Invalid credential."},"403":{"description":"Missing links:read."},"404":{"description":"Campaign not found in this workspace."},"409":{"description":"Saved campaign data requires review."},"429":{"description":"Shared request budget; respect Retry-After."},"503":{"description":"Tool data/admission unavailable."}}}},"/api/v1/analytics/report":{"get":{"operationId":"readDatedClickReport","security":[{"bearerAuth":[]}],"description":"Requires analytics:read and a paid workspace. Bounded, read-only report from retained raw click events, deduplicated by event_id. UTC calendar dates; at most 90 inclusive days. all/unflagged/flagged bot policies. Same service as the web report. Completeness, historical coverage and ingestion watermark are unverified; latest observed event is not complete-through. No sales or unique-people claims. Workspace report budget is 12 requests/minute across web/API, one uncached query at a time, cache up to 30 seconds; regular bearer request limits also apply. This is a REST endpoint, not an additional tool in the published local MCP package.","parameters":[{"in":"query","name":"startDate","schema":{"type":"string","format":"date"},"description":"Inclusive UTC calendar date; defaults to 29 days before today."},{"in":"query","name":"endDate","schema":{"type":"string","format":"date"},"description":"Inclusive UTC calendar date; defaults to today; no future date."},{"in":"query","name":"traffic","schema":{"type":"string","enum":["all","unflagged","flagged"],"default":"all"}},{"in":"query","name":"linkId","schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,100}$"},"description":"Optional saved link owned by the credential's workspace."}],"responses":{"200":{"description":"Observed or no-observed-events report; neither establishes completeness.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"metricVersion":{"type":"string","const":"recorded-events-v1"},"period":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"timezone":{"type":"string","const":"UTC"},"startInclusive":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"endExclusive":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["startDate","endDate","timezone","startInclusive","endExclusive"],"additionalProperties":false},"selection":{"type":"object","properties":{"traffic":{"type":"string","enum":["all","unflagged","flagged"]},"linkId":{"type":["string","null"]}},"required":["traffic","linkId"],"additionalProperties":false},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"quality":{"type":"object","properties":{"status":{"type":"string","enum":["observed","no_observed_events","unavailable"]},"completeness":{"type":"string","const":"unverified"},"coverageStart":{"type":"null"},"completeThrough":{"type":"null"},"firstObservedEventAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"latestObservedEventAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"cachedForSeconds":{"type":"number","const":30}},"required":["status","completeness","coverageStart","completeThrough","firstObservedEventAt","latestObservedEventAt","cachedForSeconds"],"additionalProperties":false},"metrics":{"anyOf":[{"type":"object","properties":{"recordedEvents":{"type":"integer","minimum":0,"maximum":9007199254740991},"botFlaggedEvents":{"type":"integer","minimum":0,"maximum":9007199254740991},"unflaggedEvents":{"type":"integer","minimum":0,"maximum":9007199254740991},"uniqueMarkedEvents":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicateRowsExcluded":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recordedEvents","botFlaggedEvents","unflaggedEvents","uniqueMarkedEvents","duplicateRowsExcluded"],"additionalProperties":false},{"type":"null"}]},"series":{"maxItems":90,"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"recordedEvents":{"type":"integer","minimum":0,"maximum":9007199254740991},"botFlaggedEvents":{"type":"integer","minimum":0,"maximum":9007199254740991},"uniqueMarkedEvents":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["day","recordedEvents","botFlaggedEvents","uniqueMarkedEvents"],"additionalProperties":false}},"breakdowns":{"type":"object","properties":{"countries":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"recordedEvents":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["label","recordedEvents"],"additionalProperties":false}},"devices":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"recordedEvents":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["label","recordedEvents"],"additionalProperties":false}},"referrers":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"recordedEvents":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["label","recordedEvents"],"additionalProperties":false}}},"required":["countries","devices","referrers"],"additionalProperties":false},"definitions":{"type":"object","properties":{"recordedEvents":{"type":"string","const":"Stored click events deduplicated by event_id within the workspace and requested window. Queue loss and missing events cannot be reconstructed."},"traffic":{"type":"string","const":"flagged means detected by user-agent or IP bot rules; unflagged means not flagged, not verified human. Bot classification is heuristic."},"uniqueMarkedEvents":{"type":"string","const":"Count of stored is_unique flags on unflagged events after event-ID deduplication. Legacy per-link/IP-hash/UTC-day Redis markers; not unique people or distinct visitors across links/days. Historical client-IP and marker availability may affect accuracy."},"freshness":{"type":"string","const":"latestObservedEventAt is an event timestamp in this window, not ingestion time or a completeness watermark. Late events may change results. No observed events does not establish zero actual traffic."},"retention":{"type":"string","const":"Queries read retained raw events, not lifetime counters or rollups. The configured source TTL is two years; actual historical retention and ingestion coverage are unverified."},"attribution":{"type":"string","const":"No conversions, sales, revenue or ROI are inferred from this report."}},"required":["recordedEvents","traffic","uniqueMarkedEvents","freshness","retention","attribution"],"additionalProperties":false},"sources":{"type":"object","properties":{"dashboard":{"type":"string"},"sessionJson":{"type":"string"},"apiJson":{"type":"string"},"documentation":{"type":"string"}},"required":["dashboard","sessionJson","apiJson","documentation"],"additionalProperties":false}},"required":["metricVersion","period","selection","generatedAt","quality","metrics","series","breakdowns","definitions","sources"],"additionalProperties":false}}}},"400":{"description":"Invalid dates, filter, repeated or unknown parameter."},"401":{"description":"Invalid or expired credential."},"403":{"description":"Missing analytics:read scope or paid analytics entitlement."},"404":{"description":"Saved link not in this workspace."},"429":{"description":"Shared report/request budget or workspace query concurrency reached. Respect Retry-After."},"503":{"description":"Dependency or bounded query unavailable. Report metrics are null, never fabricated zero."}}}},"/api/v1/campaign-presets":{"get":{"operationId":"listCampaignPresets","security":[{"bearerAuth":[]}],"description":"Requires links:read. Returns at most 100 active templates in the credential's workspace; shared API request limits apply. Read-only: creates no campaign, link or quota reservation. Not an additional local MCP tool. Owners/admins manage templates on the website.","responses":{"200":{"description":"Active workspace templates.","content":{"application/json":{"schema":{"type":"object","required":["items","limit","createsResources"],"properties":{"items":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"pattern":"^[^\\u0000-\\u001f\\u007f]*$"},"brandName":{"type":"string","maxLength":100,"pattern":"^[^\\u0000-\\u001f\\u007f]*$"},"utmPrefix":{"type":"string","maxLength":60,"pattern":"^(?:[a-z0-9]+(?:-[a-z0-9]+)*)?$"},"domain":{"type":"string"},"channels":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["facebook","instagram","tiktok","line","email","print","youtube","x"]}},"id":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":1},"archived":{"const":false},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","brandName","utmPrefix","domain","channels","version","archived","updatedAt"]}},"limit":{"const":100},"createsResources":{"const":false}}}}}},"401":{"description":"Invalid or expired credential."},"403":{"description":"Missing links:read scope."},"429":{"description":"Shared request limit reached."},"503":{"description":"Dependency unavailable."}}}},"/api/conv":{"post":{"operationId":"recordConversion","security":[{"bearerAuth":[]}],"description":"Requires conversions:write, never embed the key in a browser. Prefer receipt plus stable event_id; legacy click_id lookup may be pending. Same event ID/body replays once; different payload conflicts. Values are server-reported, never payment-verified. 16 KiB body; shared 100,000 new events/workspace/UTC-month ceiling. See /help/conversions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"click_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"receipt":{"type":"string","maxLength":2048},"event_id":{"type":"string","pattern":"^[a-zA-Z0-9_.:-]{1,100}$"},"type":{"default":"conversion","type":"string","enum":["conversion","purchase","signup","lead","download","custom"]},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"currency":{"default":"USD","type":"string","pattern":"^[A-Z]{3}$"},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":false,"dependentRequired":{"receipt":["event_id"]},"anyOf":[{"required":["receipt","event_id"]},{"required":["click_id"]}]}}}},"responses":{"200":{"description":"Identical replay; original conversionId, no new webhook."},"201":{"description":"New server-reported conversion committed."},"400":{"description":"Invalid body or expired receipt."},"401":{"description":"Invalid credential."},"403":{"description":"Missing scope or tracking disabled."},"404":{"description":"Click pending/absent or link absent."},"409":{"description":"Event ID conflict or legacy click already recorded."},"413":{"description":"Body exceeds 16 KiB."},"429":{"description":"Request or monthly event limit reached."},"503":{"description":"Dependency unavailable."}}}},"/api/v1/conversions":{"get":{"operationId":"listRecordedConversions","security":[{"bearerAuth":[]}],"description":"Requires analytics:read. Returns source-labelled recorded events, not verified sales. No metadata, request hashes, receipts or cross-currency totals. createdAt is recording time. Browser/server reports remain separate namespaces.","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":9999,"default":1}}],"responses":{"200":{"description":"Up to twenty workspace records plus pagination and explicit measurement contract."},"401":{"description":"Invalid credential."},"403":{"description":"Missing analytics:read."},"429":{"description":"Request limit reached."},"503":{"description":"Report unavailable; do not interpret as zero."}}}},"/api/v1/agent":{"post":{"operationId":"callAgentAction","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"capabilities"}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"link_qr"},"linkId":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,100}$"},"size":{"default":300,"type":"integer","minimum":100,"maximum":512}},"required":["action","linkId"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"preview_campaign"},"campaign":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"url":{"type":"string","maxLength":2048},"utmCampaign":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"domain":{"type":"string"},"channels":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["facebook","instagram","tiktok","line","email","print","youtube","x"]}}},"required":["requestId","name","url","utmCampaign","domain","channels"],"additionalProperties":false}},"required":["action","campaign"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"create_campaign"},"campaign":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"url":{"type":"string","maxLength":2048},"utmCampaign":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"domain":{"type":"string"},"channels":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["facebook","instagram","tiktok","line","email","print","youtube","x"]}}},"required":["requestId","name","url","utmCampaign","domain","channels"],"additionalProperties":false}},"required":["action","campaign"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"list_campaigns"},"page":{"default":1,"type":"integer","minimum":1,"maximum":10000}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"campaign_stats"},"campaignId":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,100}$"}},"required":["action","campaignId"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Read, preview or replay result. Missing channels are unavailable, not zero."},"201":{"description":"New campaign created; one link slot consumed per channel."},"400":{"description":"Invalid input or JSON."},"401":{"description":"Credential missing, expired or revoked."},"403":{"description":"Missing scope or workspace quota exhausted."},"404":{"description":"Resource absent in this workspace."},"409":{"description":"Same requestId with changed campaign intent."},"413":{"description":"Body exceeds 16 KiB."},"429":{"description":"Workspace/key request limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Dependency or admission store unavailable."}},"description":"Actions: capabilities, preview_campaign, create_campaign, list_campaigns, link_qr, campaign_stats. Use links:read for reads/preview/QR; links:write for creation. Reuse a UUID requestId with identical campaign data after a timeout. Preview does not reserve quota."}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"x-counter-definition":{"metricVersion":"legacy-redirect-counter-v1","metric":"recorded_redirects","period":"lifetime","botPolicy":"includes_automated_traffic","uniquePeople":false,"conversionsIncluded":false,"completeness":"best_effort_counter","coverageStart":null,"warning":"Recorded redirects can include bots and previews; failed counter updates may be missing. Not unique people, conversions, revenue, or a dated time series."}}