{"openapi":"3.1.2","info":{"title":"Achadu Developer API","version":"1.2.0","summary":"Automation, publishing, storefronts, DU Inbox, and analytics in one API.","description":"The Achadu public API exposes 121 account-scoped operations. The same contract powers REST, MCP, and CLI. Create a key in the Developer Console, grant only the required scopes, and keep the secret outside the browser.","contact":{"name":"Achadu Developers","email":"dev@achadu.com","url":"https://achadu.com/developers"}},"servers":[{"url":"https://achadu.com/api/v1","description":"Production"}],"security":[{"ApiKey":[]}],"tags":[{"name":"Account","description":"Account identity linked to the API key."},{"name":"Offers","description":"Catalog, curation, previews, and publishing."},{"name":"Groups","description":"Safe distribution destinations."},{"name":"Segments","description":"Niches, storefronts, and distribution rules."},{"name":"Coupons","description":"Coupons and eligibility."},{"name":"Commissions","description":"Attribution, currency, and reconciliation."},{"name":"Publications","description":"Operational publication history."},{"name":"Templates","description":"Reusable editorial templates."},{"name":"Schedules","description":"Scheduling, recurrence, and controlled execution."},{"name":"Monitors","description":"Recurring opportunity radar."},{"name":"Store","description":"Public store identity and theme."},{"name":"Journeys","description":"Graph-based DU automations."},{"name":"Inbox","description":"Conversations, messages, and privacy-safe CRM."},{"name":"Analytics","description":"Metrics by time, group, offer, source, and position."},{"name":"Links","description":"Conversion using the account affiliate credentials."},{"name":"Webhooks","description":"Signed events and delivery history."},{"name":"Integrations","description":"Connector status, diagnostics, and secure lifecycle."}],"paths":{"/me":{"get":{"tags":["Account"],"summary":"View account","description":"Returns the operation and actor linked to the key.","operationId":"account_get","x-achadu-scope":"account:read","responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/offers":{"get":{"tags":["Offers"],"summary":"List offers","description":"List offers with status, marketplace and text filters.","operationId":"offers_list","x-achadu-scope":"offers:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"status","in":"query","description":"Curated status.","schema":{"type":"string"}},{"name":"marketplace","in":"query","description":"Marketplace.","schema":{"type":"string"}},{"name":"query","in":"query","description":"Search by title or store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Offers"],"summary":"Create offer","description":"Creates a pending offer without publishing it. This operation is idempotent for the same natural resource identity.","operationId":"offer_create","x-achadu-scope":"offers:write","x-achadu-idempotent":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Original HTTPS URL for the product.","format":"uri","maxLength":2000},"title":{"type":"string","description":"Public title of the offer.","minLength":3,"maxLength":240},"marketplace":{"type":"string","description":"Source marketplace.","maxLength":40},"price":{"type":"number","description":"Current price."},"original_price":{"type":"number","description":"Previous price."},"currency":{"type":"string","description":"ISO 4217 currency.","minLength":3,"maxLength":8,"default":"BRL"},"image":{"type":"string","description":"HTTPS URL of the image.","format":"uri"},"store":{"type":"string","description":"Store name."},"category":{"type":"string","description":"Category."},"coupon":{"type":"string","description":"Coupon code."},"copy":{"type":"string","description":"Editorial text of the offer.","maxLength":6000},"status":{"type":"string","description":"Curated status."}},"required":["url","title"],"additionalProperties":false},"example":{"url":"https://example.com/product","title":"Air fryer 5L","marketplace":"string","price":329.9,"original_price":329.9,"currency":"BRL","image":"https://cdn.example.com/image.jpg","store":"string","category":"string","coupon":"string","copy":"string","status":"string"}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Offer"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/offers/{id}":{"get":{"tags":["Offers"],"summary":"View offer","description":"Returns the editorial and commercial details of an offer.","operationId":"offer_get","x-achadu-scope":"offers:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Offer"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Offers"],"summary":"Update offer","description":"Updates only the submitted fields.","operationId":"offer_update","x-achadu-scope":"offers:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Original HTTPS URL for the product.","format":"uri","maxLength":2000},"title":{"type":"string","description":"Public title of the offer.","minLength":3,"maxLength":240},"marketplace":{"type":"string","description":"Source marketplace.","maxLength":40},"price":{"type":"number","description":"Current price."},"original_price":{"type":"number","description":"Previous price."},"currency":{"type":"string","description":"ISO 4217 currency.","minLength":3,"maxLength":8,"default":"BRL"},"image":{"type":"string","description":"HTTPS URL of the image.","format":"uri"},"store":{"type":"string","description":"Store name."},"category":{"type":"string","description":"Category."},"coupon":{"type":"string","description":"Coupon code."},"copy":{"type":"string","description":"Editorial text of the offer.","maxLength":6000},"status":{"type":"string","description":"Curated status."}},"additionalProperties":false},"example":{"url":"https://example.com/product","title":"Air fryer 5L","marketplace":"string","price":329.9,"original_price":329.9,"currency":"BRL","image":"https://cdn.example.com/image.jpg","store":"string","category":"string","coupon":"string","copy":"string","status":"string"}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Offer"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Offers"],"summary":"Archive offer","description":"Removes the offer from the active flow without deleting the history.","operationId":"offer_archive","x-achadu-scope":"offers:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/offers/{id}/preview":{"post":{"tags":["Offers"],"summary":"Preview post","description":"Assemble the final message without sending it to any channel.","operationId":"offer_preview","x-achadu-scope":"offers:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"segment_id":{"type":"string","description":"Segment used in the preview."}},"additionalProperties":false},"example":{"segment_id":"segment_01J..."}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"object","additionalProperties":true},"event_id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/offers/{id}/publish":{"post":{"tags":["Offers"],"summary":"Post offer","description":"Queues the offer's publication to an authorized group or thread.","operationId":"offer_publish","x-achadu-scope":"publications:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"segment_id":{"type":"string","description":"Target segment."},"group_id":{"type":"string","description":"Target group."},"with_image":{"type":"boolean","description":"Deprecated and ignored. Offers are sent as text with a product link preview, never as photo attachments.","deprecated":true}},"additionalProperties":false},"example":{"segment_id":"segment_01J...","group_id":"group_01J...","with_image":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"object","additionalProperties":true},"event_id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/groups":{"get":{"tags":["Groups"],"summary":"List groups","description":"Lists groups without exposing JIDs, sessions, or credentials.","operationId":"groups_list","x-achadu-scope":"groups:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Group"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Groups"],"summary":"Create group destination","description":"Registers a group already authorized by the account connector.","operationId":"group_create","x-achadu-scope":"groups:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Group name.","minLength":2,"maxLength":160},"external_id":{"type":"string","description":"Identifier returned by the connector; never comes back in response.","minLength":2,"maxLength":240},"connection_id":{"type":"string","description":"Connection that manages the group."},"segment_id":{"type":"string","description":"Initial segment."},"role":{"type":"string","description":"Role: shipping, monitor, or both."},"capacity":{"type":"integer","description":"Operational capacity.","minimum":1,"maximum":1000000},"automation":{"type":"boolean","description":"Activates automation."}},"required":["name","external_id"],"additionalProperties":false},"example":{"name":"My integration","external_id":"external_01J...","connection_id":"connection_01J...","segment_id":"segment_01J...","role":"string","capacity":1,"automation":true}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Group"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/groups/{id}":{"get":{"tags":["Groups"],"summary":"View group","description":"Returns secure operational configuration of the group.","operationId":"group_get","x-achadu-scope":"groups:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Group"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Groups"],"summary":"Update group","description":"Updates name, segment, capacity and automation.","operationId":"group_update","x-achadu-scope":"groups:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Group name."},"role":{"type":"string","description":"Group role."},"segment_id":{"type":"string","description":"Segment."},"capacity":{"type":"integer","description":"Capacity."},"automation":{"type":"boolean","description":"Activates automation."},"active":{"type":"boolean","description":"Activate the group."}},"additionalProperties":false},"example":{"name":"My integration","role":"string","segment_id":"segment_01J...","capacity":1,"automation":true,"active":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Group"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Groups"],"summary":"Archive group","description":"Deactivate the destination without deleting the publication history.","operationId":"group_archive","x-achadu-scope":"groups:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/segments":{"get":{"tags":["Segments"],"summary":"List segments","description":"List niches and storefront configurations.","operationId":"segments_list","x-achadu-scope":"segments:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Segment"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Segments"],"summary":"Create segment","description":"Create a niche with your storefront setup.","operationId":"segment_create","x-achadu-scope":"segments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Segment name."},"slug":{"type":"string","description":"Public slug."},"description":{"type":"string","description":"Description."},"store_name":{"type":"string","description":"Storefront name."},"store_tagline":{"type":"string","description":"Phrase from the window."},"store_color":{"type":"string","description":"Main color."},"auto_expand":{"type":"boolean","description":"Enables automatic expansion."},"distribution":{"type":"string","description":"Distribution strategy."},"waitlist":{"type":"boolean","description":"Activates queue."}},"required":["name"],"additionalProperties":false},"example":{"name":"My integration","slug":"string","description":"string","store_name":"string","store_tagline":"string","store_color":"string","auto_expand":true,"distribution":"string","waitlist":true}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Segment"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/segments/{id}":{"get":{"tags":["Segments"],"summary":"View segment","description":"Returns a segment of the operation.","operationId":"segment_get","x-achadu-scope":"segments:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Segment"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Segments"],"summary":"Update segment","description":"Updates the segment's identity, distribution and showcase.","operationId":"segment_update","x-achadu-scope":"segments:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Segment name."},"slug":{"type":"string","description":"Public slug."},"description":{"type":"string","description":"Description."},"store_name":{"type":"string","description":"Storefront name."},"store_tagline":{"type":"string","description":"Phrase from the window."},"store_color":{"type":"string","description":"Main color."},"auto_expand":{"type":"boolean","description":"Enables automatic expansion."},"distribution":{"type":"string","description":"Distribution strategy."},"waitlist":{"type":"boolean","description":"Activates queue."}},"additionalProperties":false},"example":{"name":"My integration","slug":"string","description":"string","store_name":"string","store_tagline":"string","store_color":"string","auto_expand":true,"distribution":"string","waitlist":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Segment"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Segments"],"summary":"Delete segment","description":"Deletes only when there are no linked groups or calendars.","operationId":"segment_delete","x-achadu-scope":"segments:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coupons":{"get":{"tags":["Coupons"],"summary":"List coupons","description":"Lists active and verified coupons for the operation.","operationId":"coupons_list","x-achadu-scope":"coupons:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Coupon"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Coupons"],"summary":"Create coupon","description":"Register a coupon to use in offers.","operationId":"coupon_create","x-achadu-scope":"coupons:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"marketplace":{"type":"string","description":"Marketplace."},"code":{"type":"string","description":"Coupon code."},"description":{"type":"string","description":"Description."},"value":{"type":"string","description":"Value presented."},"minimum":{"type":"number","description":"Minimum order."},"valid_until":{"type":"string","description":"ISO validity."},"type":{"type":"string","description":"Coupon type."},"discount":{"type":"number","description":"Percentage or discount amount."},"cap":{"type":"number","description":"Discount ceiling."},"categories":{"type":"array","description":"Eligible categories.","items":{"type":"string"}},"verified":{"type":"boolean","description":"Mark the coupon as verified."},"active":{"type":"boolean","description":"Activate or archive the coupon."}},"required":["marketplace","code"],"additionalProperties":false},"example":{"marketplace":"string","code":"string","description":"string","value":"string","minimum":10,"valid_until":"string","type":"string","discount":10,"cap":10,"categories":[],"verified":true,"active":true}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Coupon"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coupons/{id}":{"get":{"tags":["Coupons"],"summary":"View coupon","description":"Returns rules and validity of a coupon.","operationId":"coupon_get","x-achadu-scope":"coupons:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Coupon"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Coupons"],"summary":"Update coupon","description":"Updates validity, discount and eligibility.","operationId":"coupon_update","x-achadu-scope":"coupons:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"marketplace":{"type":"string","description":"Marketplace."},"code":{"type":"string","description":"Coupon code."},"description":{"type":"string","description":"Description."},"value":{"type":"string","description":"Value presented."},"minimum":{"type":"number","description":"Minimum order."},"valid_until":{"type":"string","description":"ISO validity."},"type":{"type":"string","description":"Coupon type."},"discount":{"type":"number","description":"Percentage or discount amount."},"cap":{"type":"number","description":"Discount ceiling."},"categories":{"type":"array","description":"Eligible categories.","items":{"type":"string"}},"verified":{"type":"boolean","description":"Mark the coupon as verified."},"active":{"type":"boolean","description":"Activate or archive the coupon."}},"additionalProperties":false},"example":{"marketplace":"string","code":"string","description":"string","value":"string","minimum":10,"valid_until":"string","type":"string","discount":10,"cap":10,"categories":[],"verified":true,"active":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Coupon"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Coupons"],"summary":"Archive coupon","description":"Deactivate the coupon while preserving its history.","operationId":"coupon_archive","x-achadu-scope":"coupons:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/commissions":{"get":{"tags":["Commissions"],"summary":"List commissions","description":"Lists commissions assigned to the account.","operationId":"commissions_list","x-achadu-scope":"commissions:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Commission"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/commissions/summary":{"get":{"tags":["Commissions"],"summary":"Summarize commissions","description":"Groups amounts by currency and payment status.","operationId":"commissions_summary","x-achadu-scope":"commissions:read","parameters":[{"name":"days","in":"query","description":"Analysis window in days.","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommissionSummaryResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/commissions/{id}":{"get":{"tags":["Commissions"],"summary":"See commission","description":"Returns assignment and reconciliation of a commission.","operationId":"commission_get","x-achadu-scope":"commissions:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Commission"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/publications":{"get":{"tags":["Publications"],"summary":"List publications","description":"List shipments with filters by state, group and offer.","operationId":"publications_list","x-achadu-scope":"publications:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"status","in":"query","description":"Shipping status.","schema":{"type":"string"}},{"name":"group_id","in":"query","description":"Group.","schema":{"type":"string"}},{"name":"offer_id","in":"query","description":"Offer.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Publication"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/publications/{id}":{"get":{"tags":["Publications"],"summary":"View publication","description":"Returns the result of a publication without exposing the channel session.","operationId":"publication_get","x-achadu-scope":"publications:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Publication"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates":{"get":{"tags":["Templates"],"summary":"List templates","description":"List editorial templates for the account.","operationId":"templates_list","x-achadu-scope":"templates:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Template"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Templates"],"summary":"Create template","description":"Creates a reusable publishing template.","operationId":"template_create","x-achadu-scope":"templates:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Template name."},"body":{"type":"string","description":"Body with Achadu variables.","maxLength":12000},"marketplace":{"type":"string","description":"Optional marketplace."},"with_preview":{"type":"boolean","description":"Legacy preference. Offer messages always include a product link preview when available.","deprecated":true}},"required":["name","body"],"additionalProperties":false},"example":{"name":"My integration","body":"string","marketplace":"string","with_preview":true}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Template"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{id}":{"get":{"tags":["Templates"],"summary":"View template","description":"Returns the body and configuration of a template.","operationId":"template_get","x-achadu-scope":"templates:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Template"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Templates"],"summary":"Update template","description":"Updates the fields sent from the template.","operationId":"template_update","x-achadu-scope":"templates:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Template name."},"body":{"type":"string","description":"Body with Achadu variables.","maxLength":12000},"marketplace":{"type":"string","description":"Optional marketplace."},"with_preview":{"type":"boolean","description":"Legacy preference. Offer messages always include a product link preview when available.","deprecated":true}},"additionalProperties":false},"example":{"name":"My integration","body":"string","marketplace":"string","with_preview":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Template"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Templates"],"summary":"Delete template","description":"Deletes a template not used by schedules.","operationId":"template_delete","x-achadu-scope":"templates:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/schedules":{"get":{"tags":["Schedules"],"summary":"List appointments","description":"Lists future and recurring publications.","operationId":"schedules_list","x-achadu-scope":"schedules:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Schedule"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Schedules"],"summary":"Create schedule","description":"Program offer or text for an ISO date.","operationId":"schedule_create","x-achadu-scope":"schedules:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Type: offer or text."},"at":{"type":"string","description":"ISO 8601 date and time.","format":"date-time"},"segment_id":{"type":"string","description":"Target segment."},"group_id":{"type":"string","description":"Specific group."},"offer_id":{"type":"string","description":"Scheduled offer."},"text":{"type":"string","description":"Text for textual scheduling."},"image":{"type":"string","description":"Optional image.","format":"uri"},"recurrence":{"type":"string","description":"Recurrence rule."},"active":{"type":"boolean","description":"Activates scheduling."}},"required":["at"],"additionalProperties":false},"example":{"type":"string","at":"2026-09-01T15:00:00Z","segment_id":"segment_01J...","group_id":"group_01J...","offer_id":"offer_01J...","text":"string","image":"https://cdn.example.com/image.jpg","recurrence":"string","active":true}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Schedule"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/schedules/{id}":{"get":{"tags":["Schedules"],"summary":"View schedule","description":"Returns destination, content and recurrence.","operationId":"schedule_get","x-achadu-scope":"schedules:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Schedule"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Schedules"],"summary":"Update schedule","description":"Change time, destination, recurrence or status.","operationId":"schedule_update","x-achadu-scope":"schedules:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Type: offer or text."},"at":{"type":"string","description":"ISO 8601 date and time.","format":"date-time"},"segment_id":{"type":"string","description":"Target segment."},"group_id":{"type":"string","description":"Specific group."},"offer_id":{"type":"string","description":"Scheduled offer."},"text":{"type":"string","description":"Text for textual scheduling."},"image":{"type":"string","description":"Optional image.","format":"uri"},"recurrence":{"type":"string","description":"Recurrence rule."},"active":{"type":"boolean","description":"Activates scheduling."}},"additionalProperties":false},"example":{"type":"string","at":"2026-09-01T15:00:00Z","segment_id":"segment_01J...","group_id":"group_01J...","offer_id":"offer_01J...","text":"string","image":"https://cdn.example.com/image.jpg","recurrence":"string","active":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Schedule"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Schedules"],"summary":"Delete schedule","description":"Cancels and removes a future schedule.","operationId":"schedule_delete","x-achadu-scope":"schedules:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/schedules/{id}/run":{"post":{"tags":["Schedules"],"summary":"Run schedule","description":"It now runs the same safe routine as the scheduler.","operationId":"schedule_run","x-achadu-scope":"publications:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"object","additionalProperties":true},"event_id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors":{"get":{"tags":["Monitors"],"summary":"List radars","description":"Lists automatic offer discovery rules.","operationId":"monitors_list","x-achadu-scope":"monitors:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Monitor"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Monitors"],"summary":"Create radar","description":"Create a recurring search with commercial criteria.","operationId":"monitor_create","x-achadu-scope":"monitors:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Rule name."},"query":{"type":"string","description":"Monitored words."},"source":{"type":"string","description":"Source or marketplace."},"segment_id":{"type":"string","description":"Target segment."},"min_price":{"type":"number","description":"Minimum price."},"max_price":{"type":"number","description":"Maximum price."},"min_commission":{"type":"number","description":"Minimum commission."},"min_discount":{"type":"number","description":"Minimum discount."},"order":{"type":"string","description":"Ordering of results."},"limit":{"type":"integer","description":"Maximum per round.","minimum":1,"maximum":100},"interval_minutes":{"type":"integer","description":"Interval between searches.","minimum":15,"maximum":10080},"auto_approve":{"type":"boolean","description":"Automatically approves results."},"active":{"type":"boolean","description":"Activates monitoring."}},"required":["name","query"],"additionalProperties":false},"example":{"name":"My integration","query":"string","source":"string","segment_id":"segment_01J...","min_price":329.9,"max_price":329.9,"min_commission":10,"min_discount":10,"order":"string","limit":30,"interval_minutes":1,"auto_approve":true,"active":true}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Monitor"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}":{"get":{"tags":["Monitors"],"summary":"View radar","description":"Returns criteria and last result of a rule.","operationId":"monitor_get","x-achadu-scope":"monitors:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Monitor"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Monitors"],"summary":"Update radar","description":"Updates criteria, frequency and automation.","operationId":"monitor_update","x-achadu-scope":"monitors:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Rule name."},"query":{"type":"string","description":"Monitored words."},"source":{"type":"string","description":"Source or marketplace."},"segment_id":{"type":"string","description":"Target segment."},"min_price":{"type":"number","description":"Minimum price."},"max_price":{"type":"number","description":"Maximum price."},"min_commission":{"type":"number","description":"Minimum commission."},"min_discount":{"type":"number","description":"Minimum discount."},"order":{"type":"string","description":"Ordering of results."},"limit":{"type":"integer","description":"Maximum per round.","minimum":1,"maximum":100},"interval_minutes":{"type":"integer","description":"Interval between searches.","minimum":15,"maximum":10080},"auto_approve":{"type":"boolean","description":"Automatically approves results."},"active":{"type":"boolean","description":"Activates monitoring."}},"additionalProperties":false},"example":{"name":"My integration","query":"string","source":"string","segment_id":"segment_01J...","min_price":329.9,"max_price":329.9,"min_commission":10,"min_discount":10,"order":"string","limit":30,"interval_minutes":1,"auto_approve":true,"active":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Monitor"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Monitors"],"summary":"Delete radar","description":"Removes a monitoring rule.","operationId":"monitor_delete","x-achadu-scope":"monitors:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/store":{"get":{"tags":["Store"],"summary":"View store","description":"Returns only the public configuration of the store.","operationId":"store_get","x-achadu-scope":"store:read","responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Store"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Store"],"summary":"Update store","description":"Updates store identity, theme, networks and privacy.","operationId":"store_update","x-achadu-scope":"store:write","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Store name."},"tagline":{"type":"string","description":"Main sentence."},"logo":{"type":"string","description":"Logo URL.","format":"uri"},"cover":{"type":"string","description":"Cover URL.","format":"uri"},"favicon":{"type":"string","description":"Icon URL.","format":"uri"},"about":{"type":"string","description":"Store description."},"theme":{"type":"object","description":"Visual tokens.","additionalProperties":true},"social":{"type":"object","description":"Social links.","additionalProperties":true},"privacy":{"type":"object","description":"Public preferences.","additionalProperties":true},"badge":{"type":"boolean","description":"Displays seal."},"active":{"type":"boolean","description":"Publish the store."}},"additionalProperties":false},"example":{"name":"My integration","tagline":"string","logo":"https://cdn.example.com/image.jpg","cover":"https://cdn.example.com/image.jpg","favicon":"https://cdn.example.com/image.jpg","about":"string","theme":"string","social":"string","privacy":"string","badge":true,"active":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Store"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/journeys":{"get":{"tags":["Journeys"],"summary":"List journeys","description":"Lists DU flows and aggregate performance.","operationId":"journeys_list","x-achadu-scope":"journeys:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Journey"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Journeys"],"summary":"Create journey","description":"Creates initially safe visual automation.","operationId":"journey_create","x-achadu-scope":"journeys:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Journey name."},"description":{"type":"string","description":"Objective of the journey."},"trigger":{"type":"string","description":"Initial trigger."},"blocks":{"type":"array","description":"Flow blocks.","items":{"type":"object","additionalProperties":true}},"channels":{"type":"array","description":"Allowed channels.","items":{"type":"string"}},"segment_id":{"type":"string","description":"Eligible segment."},"active":{"type":"boolean","description":"Activate the journey."}},"required":["name","trigger"],"additionalProperties":false},"example":{"name":"My integration","description":"string","trigger":"string","blocks":[],"channels":[],"segment_id":"segment_01J...","active":true}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Journey"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/journeys/{id}":{"get":{"tags":["Journeys"],"summary":"See journey","description":"Returns journey blocks, channels, and metrics.","operationId":"journey_get","x-achadu-scope":"journeys:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Journey"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Journeys"],"summary":"Update journey","description":"Updates the graph and journey rules.","operationId":"journey_update","x-achadu-scope":"journeys:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Journey name."},"description":{"type":"string","description":"Objective of the journey."},"trigger":{"type":"string","description":"Initial trigger."},"blocks":{"type":"array","description":"Flow blocks.","items":{"type":"object","additionalProperties":true}},"channels":{"type":"array","description":"Allowed channels.","items":{"type":"string"}},"segment_id":{"type":"string","description":"Eligible segment."},"active":{"type":"boolean","description":"Activate the journey."}},"additionalProperties":false},"example":{"name":"My integration","description":"string","trigger":"string","blocks":[],"channels":[],"segment_id":"segment_01J...","active":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Journey"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Journeys"],"summary":"Delete journey","description":"Excludes only journeys that have never been run.","operationId":"journey_delete","x-achadu-scope":"journeys:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/journeys/{id}/activate":{"post":{"tags":["Journeys"],"summary":"Activate journey","description":"Activate or pause an existing journey.","operationId":"journey_activate","x-achadu-scope":"journeys:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean","description":"desired state; default true."}},"additionalProperties":false},"example":{"active":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Journey"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/conversations":{"get":{"tags":["Inbox"],"summary":"List conversations","description":"Lists DU Inbox operational metadata.","operationId":"conversations_list","x-achadu-scope":"inbox:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"status","in":"query","description":"Conversation status.","schema":{"type":"string"}},{"name":"channel","in":"query","description":"Source channel.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/conversations/{id}":{"get":{"tags":["Inbox"],"summary":"View conversation","description":"Returns conversation context without direct contact data.","operationId":"conversation_get","x-achadu-scope":"inbox:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Conversation"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Inbox"],"summary":"Update conversation","description":"Assigns, prioritizes or changes the DU mode.","operationId":"conversation_update","x-achadu-scope":"inbox:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"State."},"priority":{"type":"string","description":"Priority."},"assignee_id":{"type":"string","description":"Responsible."},"ai_mode":{"type":"string","description":"AI mode."},"unread":{"type":"integer","description":"Unread counter."},"action":{"type":"string","description":"Optional operational action."}},"additionalProperties":false},"example":{"status":"string","priority":"string","assignee_id":"assignee_01J...","ai_mode":"string","unread":1,"action":"string"}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Conversation"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/conversations/{id}/close":{"post":{"tags":["Inbox"],"summary":"End conversation","description":"End the conversation and record the event.","operationId":"conversation_close","x-achadu-scope":"inbox:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Conversation"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/conversations/{id}/messages":{"get":{"tags":["Inbox"],"summary":"List messages","description":"Lists the paginated history of a conversation.","operationId":"messages_list","x-achadu-scope":"inbox:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/conversations/{id}/reply":{"post":{"tags":["Inbox"],"summary":"Prepare response","description":"Registers an output response for delivery by the channel connector.","operationId":"message_reply","x-achadu-scope":"inbox:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Response content.","maxLength":6000},"type":{"type":"string","description":"Message type."},"media_url":{"type":"string","description":"Optional media.","format":"uri"},"offer_id":{"type":"string","description":"Contextual offer."},"use_du":{"type":"boolean","description":"Mark DU as author."}},"required":["content"],"additionalProperties":false},"example":{"content":"Message content","type":"string","media_url":"https://cdn.example.com/image.jpg","offer_id":"offer_01J...","use_du":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Message"},"request_id":{"type":"string"},"delivery_pending":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/contacts":{"get":{"tags":["Inbox"],"summary":"List contacts","description":"List your profile, internship and interest without revealing your phone number or email.","operationId":"contacts_list","x-achadu-scope":"inbox:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"query","in":"query","description":"Textual search.","schema":{"type":"string"}},{"name":"stage","in":"query","description":"CRM internship.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/summary":{"get":{"tags":["Analytics"],"summary":"Analytics summary","description":"Consolidates offers, publications, clicks and commissions.","operationId":"analytics_summary","x-achadu-scope":"analytics:read","parameters":[{"name":"days","in":"query","description":"Analysis window in days.","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSummaryResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/timeseries":{"get":{"tags":["Analytics"],"summary":"Time series","description":"Groups posts, failures and clicks by day.","operationId":"analytics_timeseries","x-achadu-scope":"analytics:read","parameters":[{"name":"days","in":"query","description":"Analysis window in days.","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsBreakdownResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/groups":{"get":{"tags":["Analytics"],"summary":"Performance by group","description":"Compares volume, delivery and error between groups.","operationId":"analytics_groups","x-achadu-scope":"analytics:read","parameters":[{"name":"days","in":"query","description":"Analysis window in days.","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsBreakdownResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/offers":{"get":{"tags":["Analytics"],"summary":"Performance by offer","description":"Sort offers by publication, click and commission.","operationId":"analytics_offers","x-achadu-scope":"analytics:read","parameters":[{"name":"days","in":"query","description":"Analysis window in days.","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}},{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsBreakdownResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/sources":{"get":{"tags":["Analytics"],"summary":"Performance by source","description":"Groups catalogue, clicks and revenue by marketplace.","operationId":"analytics_sources","x-achadu-scope":"analytics:read","parameters":[{"name":"days","in":"query","description":"Analysis window in days.","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsBreakdownResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/heatmap":{"get":{"tags":["Analytics"],"summary":"Interaction heatmap","description":"Aggregates clicks by page, element, day and time.","operationId":"analytics_heatmap","x-achadu-scope":"analytics:read","parameters":[{"name":"days","in":"query","description":"Analysis window in days.","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsBreakdownResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/links/convert":{"post":{"tags":["Links"],"summary":"Convert link","description":"Converts a URL using only this account's integrations. This operation is idempotent for the same natural resource identity.","operationId":"link_convert","x-achadu-scope":"links:write","x-achadu-idempotent":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Product HTTPS URL.","format":"uri","maxLength":2000}},"required":["url"],"additionalProperties":false},"example":{"url":"https://example.com/product"}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhooks","description":"List destinations and events, never the secret.","operationId":"webhooks_list","x-achadu-scope":"webhooks:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"summary":"Create webhook","description":"Creates an HTTPS destination and reveals the secret once.","operationId":"webhook_create","x-achadu-scope":"webhooks:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Destination name."},"url":{"type":"string","description":"Public HTTPS URL.","format":"uri"},"events":{"type":"array","description":"Events or *.","items":{"type":"string"}},"active":{"type":"boolean","description":"Activates the destination."}},"required":["name","url","events"],"additionalProperties":false},"example":{"name":"My integration","url":"https://example.com/product","events":["offer.created"],"active":true}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","secret","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string","description":"Revealed only in this response.","examples":["whsec_…"]},"created":{"type":"boolean"},"rotated":{"type":"boolean"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"get":{"tags":["Webhooks"],"summary":"View webhook","description":"Returns secure configuration of the target.","operationId":"webhook_get","x-achadu-scope":"webhooks:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Webhook"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Webhooks"],"summary":"Update webhook","description":"Update URL, events or state without changing the secret.","operationId":"webhook_update","x-achadu-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name."},"url":{"type":"string","description":"Public HTTPS URL.","format":"uri"},"events":{"type":"array","description":"Events or *.","items":{"type":"string"}},"active":{"type":"boolean","description":"Activates the destination."}},"additionalProperties":false},"example":{"name":"My integration","url":"https://example.com/product","events":["offer.created"],"active":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Webhook"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete webhook","description":"Removes destination and delivery history.","operationId":"webhook_delete","x-achadu-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"List deliveries","description":"Lists attempts, HTTP status and delivery errors.","operationId":"webhook_deliveries","x-achadu-scope":"webhooks:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/groups/{id}/activity":{"get":{"tags":["Groups"],"summary":"Check group activity","description":"Summarize entries, exits and publications without revealing participants.","operationId":"group_activity","x-achadu-scope":"groups:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}},{"name":"days","in":"query","description":"Analysis window in days.","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/GroupActivity"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/publications/{id}/retry":{"post":{"tags":["Publications"],"summary":"Retry publishing","description":"Creates a retry for a failed post.","operationId":"publication_retry","x-achadu-scope":"publications:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Publication"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/publications/{id}/cancel":{"post":{"tags":["Publications"],"summary":"Unpublish","description":"Cancels a pending publication without removing the history.","operationId":"publication_cancel","x-achadu-scope":"publications:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"Operational reason for cancellation.","maxLength":500}},"additionalProperties":false},"example":{"reason":"string"}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Publication"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/publications/{id}/attempts":{"get":{"tags":["Publications"],"summary":"List publication attempts","description":"Lists the safe timeline of creation, failure, retry, and cancellation.","operationId":"publication_attempts","x-achadu-scope":"publications:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicationAttempt"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/commissions/imports":{"post":{"tags":["Commissions"],"summary":"Import commissions in CSV","description":"Normalizes a CSV, deduplicates transactions, and produces an auditable receipt. This operation is idempotent for the same natural resource identity.","operationId":"commission_import","x-achadu-scope":"commissions:write","x-achadu-idempotent":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"marketplace":{"type":"string","description":"Marketplace or default network."},"filename":{"type":"string","description":"Original file name.","maxLength":240},"content":{"type":"string","description":"UTF-8 content of the CSV.","minLength":2,"maxLength":120000}},"required":["content"],"additionalProperties":false},"example":{"marketplace":"string","filename":"string","content":"Message content"}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/CommissionImportResult"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Commissions"],"summary":"List commission imports","description":"List import receipts without including credentials.","operationId":"commission_imports","x-achadu-scope":"commissions:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CommissionImport"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/commissions/imports/{id}":{"get":{"tags":["Commissions"],"summary":"See commission import","description":"Returns counts, normalized errors, and origin of an import.","operationId":"commission_import_get","x-achadu-scope":"commissions:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/CommissionImport"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/commissions/sync":{"post":{"tags":["Commissions"],"summary":"Sync commissions","description":"Query only authorized connectors and record one receipt per source.","operationId":"commissions_sync","x-achadu-scope":"commissions:write","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"sources":{"type":"array","description":"Sources that should be consulted.","items":{"type":"string"}},"from":{"type":"string","description":"Home ISO 8601.","format":"date-time"},"to":{"type":"string","description":"End ISO 8601.","format":"date-time"}},"additionalProperties":false},"example":{"sources":[],"from":"2026-09-01T15:00:00Z","to":"2026-09-01T15:00:00Z"}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/CommissionSyncResult"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/commissions/receipts":{"get":{"tags":["Commissions"],"summary":"List receipts","description":"Lists financial credits and reconciliation status.","operationId":"receipts_list","x-achadu-scope":"commissions:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Receipt"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Commissions"],"summary":"Register receipt","description":"Registers a credit received without automatically treating it as a commission. This operation is idempotent for the same natural resource identity.","operationId":"receipt_create","x-achadu-scope":"commissions:write","x-achadu-idempotent":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","description":"Source of payment."},"amount":{"type":"number","description":"Amount received.","minimum":0.0001},"currency":{"type":"string","description":"ISO 4217 currency.","default":"BRL"},"reference":{"type":"string","description":"Idempotent external reference."},"period_start":{"type":"string","description":"Start of period.","format":"date-time"},"period_end":{"type":"string","description":"End of period.","format":"date-time"},"paid_at":{"type":"string","description":"Credit date.","format":"date-time"},"notes":{"type":"string","description":"Internal notes.","maxLength":2000}},"required":["source","amount","paid_at"],"additionalProperties":false},"example":{"source":"string","amount":329.9,"currency":"BRL","reference":"string","period_start":"2026-09-01T15:00:00Z","period_end":"2026-09-01T15:00:00Z","paid_at":"2026-09-01T15:00:00Z","notes":"string"}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Receipt"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/commissions/receipts/{id}":{"get":{"tags":["Commissions"],"summary":"View receipt","description":"Returns the receipt and reconciled commissions.","operationId":"receipt_get","x-achadu-scope":"commissions:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Receipt"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/commissions/receipts/{id}/reconcile":{"post":{"tags":["Commissions"],"summary":"Reconcile receipt","description":"Automatically select or receive the commissions that form the credit.","operationId":"receipt_reconcile","x-achadu-scope":"commissions:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"commission_ids":{"type":"array","description":"Manually chosen IDs; omit for automatic reconciliation.","items":{"type":"string"}}},"additionalProperties":false},"example":{"commission_ids":[]}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Receipt"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}/run":{"post":{"tags":["Monitors"],"summary":"Run radar now","description":"Executes a round of the radar and the observed result persists.","operationId":"monitor_run","x-achadu-scope":"monitors:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/MonitorRun"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}/results":{"get":{"tags":["Monitors"],"summary":"Consult radar results","description":"Returns the last round and offers originated by this radar.","operationId":"monitor_results","x-achadu-scope":"monitors:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/MonitorResults"},"request_id":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/store/collections":{"get":{"tags":["Store"],"summary":"List store collections","description":"Lists editorial collections and their public order.","operationId":"store_collections","x-achadu-scope":"store:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StoreCollection"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Store"],"summary":"Create store collection","description":"Creates a publishable collection of offers.","operationId":"store_collection_create","x-achadu-scope":"store:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Public name of the collection.","minLength":2,"maxLength":120},"slug":{"type":"string","description":"Single public slug.","maxLength":80},"description":{"type":"string","description":"Collection description.","maxLength":1000},"image":{"type":"string","description":"HTTPS cover image.","format":"uri"},"offer_ids":{"type":"array","description":"Offers displayed in the collection.","items":{"type":"string"}},"active":{"type":"boolean","description":"Publish the collection."}},"required":["name"],"additionalProperties":false},"example":{"name":"My integration","slug":"string","description":"string","image":"https://cdn.example.com/image.jpg","offer_ids":[],"active":true}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/StoreCollection"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/store/collections/{id}":{"get":{"tags":["Store"],"summary":"View store collection","description":"Returns content and configuration of a collection.","operationId":"store_collection_get","x-achadu-scope":"store:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/StoreCollection"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Store"],"summary":"Update store collection","description":"Updates only sent fields from the collection.","operationId":"store_collection_update","x-achadu-scope":"store:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Public name of the collection.","minLength":2,"maxLength":120},"slug":{"type":"string","description":"Single public slug.","maxLength":80},"description":{"type":"string","description":"Collection description.","maxLength":1000},"image":{"type":"string","description":"HTTPS cover image.","format":"uri"},"offer_ids":{"type":"array","description":"Offers displayed in the collection.","items":{"type":"string"}},"active":{"type":"boolean","description":"Publish the collection."}},"additionalProperties":false},"example":{"name":"My integration","slug":"string","description":"string","image":"https://cdn.example.com/image.jpg","offer_ids":[],"active":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/StoreCollection"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Store"],"summary":"Delete store collection","description":"Remove the collection without deleting the offers.","operationId":"store_collection_delete","x-achadu-scope":"store:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/store/pages":{"get":{"tags":["Store"],"summary":"List store pages","description":"List landing pages and editorial content for the store.","operationId":"store_pages","x-achadu-scope":"store:read","parameters":[{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StorePage"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Store"],"summary":"Create store page","description":"Create a page in Markdown with its own SEO.","operationId":"store_page_create","x-achadu-scope":"store:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Public title of the page.","minLength":2,"maxLength":160},"slug":{"type":"string","description":"Single public slug.","maxLength":80},"summary":{"type":"string","description":"Page summary.","maxLength":500},"body":{"type":"string","description":"Page content in Markdown.","maxLength":50000},"cover":{"type":"string","description":"HTTPS cover image.","format":"uri"},"seo_title":{"type":"string","description":"Title for search engines.","maxLength":70},"seo_description":{"type":"string","description":"Description for search engines.","maxLength":180},"published":{"type":"boolean","description":"Publish the page."}},"required":["title"],"additionalProperties":false},"example":{"title":"Air fryer 5L","slug":"string","summary":"string","body":"string","cover":"https://cdn.example.com/image.jpg","seo_title":"string","seo_description":"string","published":true}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/StorePage"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/store/pages/{id}":{"get":{"tags":["Store"],"summary":"View store page","description":"Returns content, SEO and publishing status.","operationId":"store_page_get","x-achadu-scope":"store:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/StorePage"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Store"],"summary":"Update store page","description":"Update content, slug, SEO or post.","operationId":"store_page_update","x-achadu-scope":"store:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Public title of the page.","minLength":2,"maxLength":160},"slug":{"type":"string","description":"Single public slug.","maxLength":80},"summary":{"type":"string","description":"Page summary.","maxLength":500},"body":{"type":"string","description":"Page content in Markdown.","maxLength":50000},"cover":{"type":"string","description":"HTTPS cover image.","format":"uri"},"seo_title":{"type":"string","description":"Title for search engines.","maxLength":70},"seo_description":{"type":"string","description":"Description for search engines.","maxLength":180},"published":{"type":"boolean","description":"Publish the page."}},"additionalProperties":false},"example":{"title":"Air fryer 5L","slug":"string","summary":"string","body":"string","cover":"https://cdn.example.com/image.jpg","seo_title":"string","seo_description":"string","published":true}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/StorePage"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Store"],"summary":"Delete store page","description":"Removes a separate page from the store.","operationId":"store_page_delete","x-achadu-scope":"store:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/contacts/{id}":{"get":{"tags":["Inbox"],"summary":"See contact","description":"Returns profile, tags, and activity without direct identifiers.","operationId":"contact_get","x-achadu-scope":"inbox:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Contact"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Inbox"],"summary":"Update contact","description":"Updates name, stage, tags, and authorized preferences.","operationId":"contact_update","x-achadu-scope":"inbox:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Preferred name."},"stage":{"type":"string","description":"CRM internship."},"tags":{"type":"array","description":"CRM labels.","items":{"type":"string"}},"preferences":{"type":"object","description":"Authorized preferences.","additionalProperties":true}},"additionalProperties":false},"example":{"name":"My integration","stage":"string","tags":[],"preferences":"string"}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Contact"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/contacts/{id}/notes":{"get":{"tags":["Inbox"],"summary":"List contact notes","description":"Lists internal notes with author and date.","operationId":"contact_notes","x-achadu-scope":"inbox:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactNote"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Inbox"],"summary":"Create note in contact","description":"Records an internal note that is never sent to the contact.","operationId":"contact_note_create","x-achadu-scope":"inbox:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Note content.","minLength":1,"maxLength":4000}},"required":["content"],"additionalProperties":false},"example":{"content":"Message content"}}}},"responses":{"201":{"description":"Resource created.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/ContactNote"},"request_id":{"type":"string"},"created":{"type":"boolean"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/conversations/{id}/assign":{"post":{"tags":["Inbox"],"summary":"Assign conversation","description":"Assigns or removes the person responsible for the conversation.","operationId":"conversation_assign","x-achadu-scope":"inbox:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"assignee_id":{"type":"string","description":"Responsible; empty removes the assignment."}},"additionalProperties":false},"example":{"assignee_id":"assignee_01J..."}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Conversation"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/conversations/{id}/reopen":{"post":{"tags":["Inbox"],"summary":"Reopen conversation","description":"Reopens a closed conversation and records the event.","operationId":"conversation_reopen","x-achadu-scope":"inbox:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Conversation"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/messages/{id}":{"get":{"tags":["Inbox"],"summary":"View message","description":"Returns content and operational state of a message.","operationId":"message_get","x-achadu-scope":"inbox:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Message"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/messages/{id}/status":{"get":{"tags":["Inbox"],"summary":"Check message delivery","description":"Distinguish prepared, queued, sent, delivered and failed.","operationId":"message_status","x-achadu-scope":"inbox:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/MessageStatus"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/journeys/{id}/validate":{"post":{"tags":["Journeys"],"summary":"Validate journey","description":"Checks trigger, blocks, channels and references without running the flow.","operationId":"journey_validate","x-achadu-scope":"journeys:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/JourneyValidation"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/journeys/{id}/execute":{"post":{"tags":["Journeys"],"summary":"Run journey","description":"Starts an explicit execution for authorized contact or conversation.","operationId":"journey_execute","x-achadu-scope":"journeys:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_id":{"type":"string","description":"Target contact."},"conversation_id":{"type":"string","description":"Target talk."},"context":{"type":"object","description":"Non-context sensitive execution.","additionalProperties":true}},"additionalProperties":false},"example":{"contact_id":"contact_01J...","conversation_id":"conversation_01J...","context":"string"}}}},"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/JourneyExecution"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/journeys/{id}/executions":{"get":{"tags":["Journeys"],"summary":"List journey executions","description":"List status, step and times of executions.","operationId":"journey_executions","x-achadu-scope":"journeys:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Quantity per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"name":"offset","in":"query","description":"Pagination offset.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"status","in":"query","description":"Execution status.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","pagination","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/JourneyExecution"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/journey-executions/{id}":{"get":{"tags":["Journeys"],"summary":"View journey execution","description":"Returns the execution and its safe operating context.","operationId":"journey_execution_get","x-achadu-scope":"journeys:read","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/JourneyExecution"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-events":{"get":{"tags":["Webhooks"],"summary":"List webhook events","description":"Returns the versioned catalog of events and descriptions.","operationId":"webhook_events","x-achadu-scope":"webhooks:read","responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventCatalog"}},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-events/{event}/schema":{"get":{"tags":["Webhooks"],"summary":"Get event schema","description":"Returns the JSON Schema and an example for the current event version.","operationId":"webhook_event_schema","x-achadu-scope":"webhooks:read","parameters":[{"name":"event","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Webhook"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/rotate-secret":{"post":{"tags":["Webhooks"],"summary":"Rotate webhook secret","description":"Invalidates the previous secret and reveals the new one only once.","operationId":"webhook_rotate_secret","x-achadu-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","secret","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string","description":"Revealed only in this response.","examples":["whsec_…"]},"created":{"type":"boolean"},"rotated":{"type":"boolean"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"post":{"tags":["Webhooks"],"summary":"Test webhook","description":"Queues a signed test event to the target.","operationId":"webhook_test","x-achadu-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Webhook"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-deliveries/{id}/redeliver":{"post":{"tags":["Webhooks"],"summary":"Resend webhook delivery","description":"Creates an auditable retry for an existing deliverable.","operationId":"webhook_redeliver","x-achadu-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Webhook"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/integrations":{"get":{"tags":["Integrations"],"summary":"List integrations","description":"Lists connectors and secure state, without returning credentials.","operationId":"integrations_list","x-achadu-scope":"integrations:read","responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/integrations/{provider}":{"get":{"tags":["Integrations"],"summary":"See integration","description":"Returns capacity, health, and last validation of a connector.","operationId":"integration_get","x-achadu-scope":"integrations:read","parameters":[{"name":"provider","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Integration"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Integrations"],"summary":"Disconnect integration","description":"Removes the connector credentials for the key actor.","operationId":"integration_disconnect","x-achadu-scope":"integrations:write","parameters":[{"name":"provider","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["deleted","id","request_id"],"properties":{"deleted":{"type":"boolean"},"archived":{"type":"boolean"},"id":{"type":"string"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/integrations-health":{"get":{"tags":["Integrations"],"summary":"Check integration health","description":"Summarizes connectors that are configured, healthy, and needing attention.","operationId":"integrations_health","x-achadu-scope":"integrations:read","responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/IntegrationHealth"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/integrations/{provider}/test":{"post":{"tags":["Integrations"],"summary":"Validate integration","description":"Validates the available configuration and records the diagnosis.","operationId":"integration_test","x-achadu-scope":"integrations:write","parameters":[{"name":"provider","in":"path","required":true,"description":"Resource identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/IntegrationTest"},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/funnel":{"get":{"tags":["Analytics"],"summary":"Analyze funnel","description":"Groups impression, click, intent, purchase and commission by period.","operationId":"analytics_funnel","x-achadu-scope":"analytics:read","parameters":[{"name":"days","in":"query","description":"Analysis window in days.","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsBreakdownResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/revenue":{"get":{"tags":["Analytics"],"summary":"Analyze recipe","description":"Consolidates registered commission and receipts reconciled by currency.","operationId":"analytics_revenue","x-achadu-scope":"analytics:read","parameters":[{"name":"days","in":"query","description":"Analysis window in days.","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsBreakdownResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/attribution":{"get":{"tags":["Analytics"],"summary":"Analyze attribution","description":"Compares source, group, segment and conversion window.","operationId":"analytics_attribution","x-achadu-scope":"analytics:read","parameters":[{"name":"days","in":"query","description":"Analysis window in days.","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}},{"name":"model","in":"query","description":"Model: last_touch or recorded.","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsBreakdownResponse"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The current plan does not support this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 128 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded; wait for the next window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"Achadu API key","description":"Use `Authorization: Bearer ach_live_...`."}},"schemas":{"Error":{"type":"object","required":["error","request_id"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","examples":["invalid_request"]},"message":{"type":"string"},"required_scope":{"type":"string"}}},"request_id":{"type":"string","examples":["req_01hzy8fx6cx2"]}}},"Pagination":{"type":"object","required":["total","limit","offset","has_more"],"properties":{"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"}}},"Success":{"type":"object","description":"The `data` shape depends on the operation. List responses also include `pagination`.","properties":{"data":{},"pagination":{"$ref":"#/components/schemas/Pagination"},"created":{"type":"boolean"},"deleted":{"type":"boolean"},"request_id":{"type":"string"}},"required":["request_id"],"additionalProperties":true},"AccountResponse":{"type":"object","required":["account","request_id"],"properties":{"account":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"actor":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":"string","format":"email"},"role":{"type":"string"}}},"request_id":{"type":"string"}}},"Offer":{"type":"object","required":["id","title","url"],"properties":{"id":{"type":"string"},"marketplace":{"type":["string","null"]},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"affiliate_url":{"type":["string","null"],"format":"uri"},"price":{"type":["number","null"]},"original_price":{"type":["number","null"]},"currency":{"type":"string"},"image":{"type":["string","null"]},"store":{"type":["string","null"]},"category":{"type":["string","null"]},"coupon":{"type":["string","null"]},"commission":{"type":["number","null"]},"review_status":{"type":"string"},"published_at":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["string","null"]}}},"Group":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"role":{"type":["string","null"]},"members":{"type":["integer","null"]},"automation":{"type":"integer"},"active":{"type":"integer"},"capacity":{"type":["integer","null"]},"segment_id":{"type":["string","null"]},"segment_name":{"type":["string","null"]}}},"Segment":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":["string","null"]},"description":{"type":["string","null"]},"store_name":{"type":["string","null"]},"store_tagline":{"type":["string","null"]},"store_color":{"type":["string","null"]},"auto_expand":{"type":"integer"},"distribution":{"type":["string","null"]},"waitlist":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}}},"Coupon":{"type":"object","required":["id","marketplace","code"],"properties":{"id":{"type":"string"},"marketplace":{"type":"string"},"code":{"type":"string"},"description":{"type":["string","null"]},"discount":{"type":["number","null"]},"minimum":{"type":["number","null"]},"cap":{"type":["number","null"]},"valid_until":{"type":["string","null"]},"verified":{"type":"integer"},"active":{"type":"integer"}}},"Commission":{"type":"object","required":["id","marketplace","amount","currency","status"],"properties":{"id":{"type":"string"},"marketplace":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"order_id":{"type":["string","null"]},"offer_id":{"type":["string","null"]},"group_id":{"type":["string","null"]},"status":{"type":"string"},"attribution":{"type":["string","null"]},"payment_status":{"type":["string","null"]},"occurred_at":{"type":"string","format":"date-time"},"paid_at":{"type":["string","null"]}}},"Publication":{"type":"object","required":["id","state"],"properties":{"id":{"type":"string"},"state":{"type":"string"},"group_id":{"type":["string","null"]},"group_name":{"type":["string","null"]},"offer_id":{"type":["string","null"]},"offer_title":{"type":["string","null"]},"schedule_id":{"type":["string","null"]},"error":{"type":["string","null"]},"sent_at":{"type":["string","null"],"format":"date-time"}}},"Template":{"type":"object","required":["id","name","body"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"body":{"type":"string"},"has_preview":{"type":"integer"},"marketplace":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}},"Schedule":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string"},"segment_id":{"type":["string","null"]},"group_id":{"type":["string","null"]},"offer_id":{"type":["string","null"]},"text":{"type":["string","null"]},"image":{"type":["string","null"]},"run_at":{"type":["string","null"]},"next_run_at":{"type":["string","null"]},"recurrence":{"type":["string","null"]},"active":{"type":"integer"},"last_run_at":{"type":["string","null"]}}},"Monitor":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"source":{"type":"string"},"keywords":{"type":"string"},"segment_id":{"type":["string","null"]},"minimum_price":{"type":["number","null"]},"maximum_price":{"type":["number","null"]},"minimum_commission":{"type":["number","null"]},"minimum_discount":{"type":["number","null"]},"interval_minutes":{"type":"integer"},"auto_approve":{"type":"integer"},"active":{"type":"integer"},"last_result":{"type":["string","null"]}}},"Store":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"subdomain":{"type":["string","null"]},"domain":{"type":["string","null"]},"name":{"type":["string","null"]},"tagline":{"type":["string","null"]},"logo":{"type":["string","null"]},"cover":{"type":["string","null"]},"favicon":{"type":["string","null"]},"theme":{"type":["string","null"]},"social_links":{"type":["string","null"]},"privacy":{"type":["string","null"]},"active":{"type":"integer"},"domain_verified":{"type":"integer"}}},"Journey":{"type":"object","required":["id","name","trigger"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"trigger":{"type":"string"},"blocks":{"type":["array","string"]},"channels":{"type":["array","string"]},"segment_id":{"type":["string","null"]},"active":{"type":"integer"},"executions":{"type":"integer"},"conversions":{"type":"integer"}}},"Conversation":{"type":"object","required":["id","channel","status"],"properties":{"id":{"type":"string"},"channel":{"type":"string"},"subject":{"type":["string","null"]},"status":{"type":"string"},"priority":{"type":"string"},"intent":{"type":["string","null"]},"sentiment":{"type":"string"},"assignee_id":{"type":["string","null"]},"group_id":{"type":["string","null"]},"segment_id":{"type":["string","null"]},"ai_mode":{"type":"string"},"unread_count":{"type":"integer"},"closed_at":{"type":["string","null"]}}},"Message":{"type":"object","required":["id","conversation_id","direction","content"],"properties":{"id":{"type":"string"},"conversation_id":{"type":"string"},"direction":{"type":"string"},"author_type":{"type":"string"},"author_id":{"type":["string","null"]},"content":{"type":"string"},"type":{"type":"string"},"media_url":{"type":["string","null"]},"offer_id":{"type":["string","null"]},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"Contact":{"type":"object","description":"Privacy-safe CRM profile without a phone number, email address, or direct channel identifier.","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"stage":{"type":["string","null"]},"interests":{"type":["string","null"]},"lifetime_value":{"type":["number","null"]},"conversations":{"type":["integer","null"]},"last_interaction_at":{"type":["string","null"]}}},"ContactNote":{"type":"object","required":["id","contact_id","content","created_at"],"properties":{"id":{"type":"string"},"contact_id":{"type":"string"},"author_id":{"type":["string","null"]},"content":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"MessageStatus":{"type":"object","required":["id","conversation_id","status"],"properties":{"id":{"type":"string"},"conversation_id":{"type":"string"},"status":{"type":"string","enum":["prepared","queued","sent","delivered","failed","received"]},"delivery":{"type":["object","null"],"additionalProperties":true},"provider_message_id":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}}},"GroupActivity":{"type":"object","required":["group_id","joins","leaves","net_members","publications","days"],"properties":{"group_id":{"type":"string"},"group_name":{"type":["string","null"]},"joins":{"type":"integer"},"leaves":{"type":"integer"},"net_members":{"type":"integer"},"publications":{"type":"integer"},"days":{"type":"integer"}}},"PublicationAttempt":{"type":"object","required":["id","type","state","created_at"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["original","retry","cancel"]},"state":{"type":["string","null"]},"reason":{"type":["string","null"]},"data":{"type":["object","null"],"additionalProperties":true},"created_at":{"type":"string","format":"date-time"}}},"CommissionImport":{"type":"object","required":["id","source","status","created_at"],"properties":{"id":{"type":"string"},"source":{"type":"string"},"file":{"type":["string","null"]},"rows_read":{"type":"integer"},"new_items":{"type":"integer"},"duplicates":{"type":"integer"},"errors":{"type":"integer"},"details":{"type":"object","additionalProperties":true},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"Receipt":{"type":"object","required":["id","source","amount","currency","paid_at","status"],"properties":{"id":{"type":"string"},"source":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"reference":{"type":["string","null"]},"period_start":{"type":["string","null"],"format":"date-time"},"period_end":{"type":["string","null"],"format":"date-time"},"paid_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["new","reconciled","partial","mismatched"]},"reconciled_amount":{"type":"number"},"difference":{"type":["number","null"]},"commissions":{"type":"array","items":{"$ref":"#/components/schemas/Commission"}}}},"StoreCollection":{"type":"object","required":["id","name","slug","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"image":{"type":["string","null"],"format":"uri"},"offer_ids":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"position":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"StorePage":{"type":"object","required":["id","title","slug","published"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"summary":{"type":["string","null"]},"body":{"type":"string"},"cover":{"type":["string","null"],"format":"uri"},"seo_title":{"type":["string","null"]},"seo_description":{"type":["string","null"]},"published":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"JourneyExecution":{"type":"object","required":["id","journey_id","state","step","created_at"],"properties":{"id":{"type":"string"},"journey_id":{"type":"string"},"conversation_id":{"type":["string","null"]},"contact_id":{"type":["string","null"]},"state":{"type":"string"},"step":{"type":"integer"},"context":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}}},"CommissionImportResult":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"rows_read":{"type":"integer"},"new_items":{"type":"integer"},"duplicates":{"type":"integer"},"errors":{"type":"integer"},"file":{"type":["string","null"]}}},"CommissionSyncResult":{"type":"object","additionalProperties":true,"description":"Aggregated result by source, including imported items, duplicates, and errors."},"JourneyValidation":{"type":"object","required":["journey_id","valid","errors","warnings","block_count"],"properties":{"journey_id":{"type":"string"},"valid":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","additionalProperties":true}},"warnings":{"type":"array","items":{"type":"object","additionalProperties":true}},"block_count":{"type":"integer"}}},"MonitorRun":{"type":"object","required":["monitor_id","result"],"properties":{"monitor_id":{"type":"string"},"result":{"type":"object","additionalProperties":true}}},"MonitorResults":{"type":"object","required":["monitor_id","offers"],"properties":{"monitor_id":{"type":"string"},"last_run_at":{"type":["string","null"],"format":"date-time"},"last_result":{"type":["object","null"],"additionalProperties":true},"offers":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}}}},"Integration":{"type":"object","required":["id","configured","status"],"properties":{"id":{"type":"string"},"configured":{"type":"boolean"},"testable":{"type":"boolean"},"status":{"type":"string"},"reason":{"type":"string"},"updated_at":{"type":["string","null"],"format":"date-time"},"test":{"type":["object","null"],"additionalProperties":true},"import":{"type":["object","null"],"additionalProperties":true}}},"IntegrationHealth":{"type":"object","required":["summary","integrations","programs"],"properties":{"summary":{"type":"object","additionalProperties":true},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}},"programs":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"IntegrationTest":{"type":"object","required":["provider","valid","remote","message","latency_ms"],"properties":{"provider":{"type":"string"},"valid":{"type":"boolean"},"remote":{"type":"boolean","description":"True when the test reached the external provider."},"offers":{"type":["integer","null"]},"message":{"type":"string"},"latency_ms":{"type":"integer"}}},"Webhook":{"type":"object","required":["id","name","url","events","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"last_delivery_at":{"type":["string","null"]}}},"WebhookDelivery":{"type":"object","required":["id","event","event_id","status"],"properties":{"id":{"type":"string"},"webhook_id":{"type":"string"},"event":{"type":"string"},"event_id":{"type":"string"},"status":{"type":"string"},"http_status":{"type":["integer","null"]},"attempts":{"type":"integer"},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"sent_at":{"type":["string","null"]}}},"WebhookEventCatalog":{"type":"object","required":["event","version","category","description"],"properties":{"event":{"type":"string"},"version":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"}}},"CommissionSummaryResponse":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"object","properties":{"period_days":{"type":"integer"},"totals":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"status":{"type":"string"},"total":{"type":"number"},"count":{"type":"integer"}}}}}},"request_id":{"type":"string"}}},"AnalyticsSummaryResponse":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"object","properties":{"period_days":{"type":"integer"},"offers":{"type":"integer"},"publications":{"type":"integer"},"clicks":{"type":"integer"},"commissions":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"total":{"type":"number"},"count":{"type":"integer"}}}}}},"request_id":{"type":"string"}}},"AnalyticsBreakdownResponse":{"type":"object","required":["data","period_days","request_id"],"properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}},"period_days":{"type":"integer"},"request_id":{"type":"string"}}},"LinkResponse":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"marketplace":{"type":["string","null"]},"missing_commission":{"type":"boolean"},"warning":{"type":["string","null"]}}},"request_id":{"type":"string"}}},"WebhookEvent":{"type":"object","required":["id","type","created_at","data"],"properties":{"id":{"type":"string","examples":["evt_01hzy8fx6cx2"]},"type":{"type":"string","examples":["offer.created"]},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","additionalProperties":true}}}}},"webhooks":{"achaduEvent":{"post":{"summary":"Event sent to the registered destination","description":"Validate `x-achadu-signature` by calculating the HMAC-SHA256 of `<timestamp>.<raw body>` with the secret revealed at creation time.","parameters":[{"name":"x-achadu-event","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-achadu-event-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-achadu-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-achadu-signature","in":"header","required":true,"schema":{"type":"string","examples":["sha256=9c…"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Event accepted."}}}}},"externalDocs":{"description":"Guides, examples, and interactive explorer","url":"https://achadu.com/developers"}}