{"openapi":"3.1.0","info":{"title":"Awin (BYOK) API","version":"0.1.0","description":"Awin (BYOK) lets an AI assistant read your own Awin data through the Awin API with a key you supply (Awin API token (personal, covers all accounts you can access)). Read-only: 7 tools (list_accounts, list_programmes, get_programme_details, list_commission_groups, list_transactions, list_transaction_queries, get_link_builder_quota). The BYOK key travels with each request, is used for that one call...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-awin.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-awin/docs"},"termsOfService":"https://connectorbay.com/byok-awin/terms"},"servers":[{"url":"https://byok-awin.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-awin/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_accounts":{"post":{"operationId":"list_accounts","summary":"List the Awin publisher and advertiser accounts the token's user can access with account id, name, type and the user's r","description":"List the Awin publisher and advertiser accounts the token's user can access with account id, name, type and the user's role. Use for \"Which Awin accounts can I access\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"type":{"anyOf":[{"enum":["publisher","advertiser"],"type":"string"},{"type":"null"}],"default":null,"description":"Only accounts of this type.","title":"Type"}},"title":"list_accountsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_programmes":{"post":{"operationId":"list_programmes","summary":"List advertiser programmes and the publisher's relationship with each (joined, pending, suspended, rejected, not joined)","description":"List advertiser programmes and the publisher's relationship with each (joined, pending, suspended, rejected, not joined), optionally by country. Use for \"Which Awin programmes have I joined\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"publisher_id":{"description":"Your Awin publisher account id (a number, from list_accounts or the Awin UI URL).","title":"Publisher Id","type":"integer"},"relationship":{"anyOf":[{"enum":["joined","pending","suspended","rejected","notjoined"],"type":"string"},{"type":"null"}],"default":null,"description":"Only programmes with this relationship.","title":"Relationship"},"country_code":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Only programmes in this country, two-letter ISO code such as 'GB'.","title":"Country Code"}},"required":["publisher_id"],"title":"list_programmesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_programme_details":{"post":{"operationId":"get_programme_details","summary":"Get KPIs (approval percentage, conversion rate, EPC, validation days, average payment time) and the commission range of ","description":"Get KPIs (approval percentage, conversion rate, EPC, validation days, average payment time) and the commission range of one advertiser programme. Use for \"What are the EPC and approval rate of Awin programme 1001\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"publisher_id":{"description":"Your Awin publisher account id (a number, from list_accounts or the Awin UI URL).","title":"Publisher Id","type":"integer"},"advertiser_id":{"description":"Awin advertiser (programme) id, a number from list_programmes.","title":"Advertiser Id","type":"integer"},"relationship":{"anyOf":[{"enum":["joined","pending","suspended","rejected","notjoined","any"],"type":"string"},{"type":"null"}],"default":"joined","description":"Relationship filter, default joined.","title":"Relationship"}},"required":["publisher_id","advertiser_id"],"title":"get_programme_detailsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_commission_groups":{"post":{"operationId":"list_commission_groups","summary":"List the commission groups and rates (percentage or fixed amount) a publisher gets in one advertiser programme. Use for ","description":"List the commission groups and rates (percentage or fixed amount) a publisher gets in one advertiser programme. Use for \"What commission rates do I get from Awin programme 1001\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"publisher_id":{"description":"Your Awin publisher account id (a number, from list_accounts or the Awin UI URL).","title":"Publisher Id","type":"integer"},"advertiser_id":{"description":"Awin advertiser (programme) id, a number from list_programmes.","title":"Advertiser Id","type":"integer"},"effective_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Rates valid on this ISO 8601 time, for example 2026-10-15T23:59:59Z; default is now.","title":"Effective Date"}},"required":["publisher_id","advertiser_id"],"title":"list_commission_groupsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_transactions":{"post":{"operationId":"list_transactions","summary":"List the publisher's transactions (sales and leads) with status, commission and sale amounts in a date range of at most ","description":"List the publisher's transactions (sales and leads) with status, commission and sale amounts in a date range of at most 31 days; at most 50 are returned. Use for \"What Awin transactions did I have in the last 30 days\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"publisher_id":{"description":"Your Awin publisher account id (a number, from list_accounts or the Awin UI URL).","title":"Publisher Id","type":"integer"},"start_date":{"description":"Start of the range, ISO 8601 such as 2026-09-16T00:00:00Z.","maxLength":200,"title":"Start Date","type":"string"},"end_date":{"description":"End of the range, ISO 8601 such as 2026-10-15T23:59:59Z; at most 31 days after start_date.","maxLength":200,"title":"End Date","type":"string"},"date_type":{"anyOf":[{"enum":["transaction","validation","amendment"],"type":"string"},{"type":"null"}],"default":"transaction","description":"Which date the range applies to.","title":"Date Type"},"status":{"anyOf":[{"enum":["pending","approved","declined","deleted"],"type":"string"},{"type":"null"}],"default":null,"description":"Only transactions with this status.","title":"Status"},"advertiser_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Only transactions of this advertiser id.","title":"Advertiser Id"},"timezone":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":"UTC","description":"Time zone name such as 'UTC' or 'Europe/London' (see Awin's list of supported zones).","title":"Timezone"}},"required":["publisher_id","start_date","end_date"],"title":"list_transactionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_transaction_queries":{"post":{"operationId":"list_transaction_queries","summary":"List the publisher's transaction queries (disputes about missing or wrong commission) with status in a date range, paged","description":"List the publisher's transaction queries (disputes about missing or wrong commission) with status in a date range, paged. Use for \"Which of my Awin transaction queries are still pending\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"publisher_id":{"description":"Your Awin publisher account id (a number, from list_accounts or the Awin UI URL).","title":"Publisher Id","type":"integer"},"start_date":{"description":"Start of the range, ISO 8601 such as 2026-09-16T00:00:00Z.","maxLength":200,"title":"Start Date","type":"string"},"end_date":{"description":"End of the range, ISO 8601 such as 2026-10-15T23:59:59Z.","maxLength":200,"title":"End Date","type":"string"},"date_type":{"anyOf":[{"enum":["enquiryDate","transactionDate","validationDate"],"type":"string"},{"type":"null"}],"default":null,"description":"Which date the range applies to.","title":"Date Type"},"page_size":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Results per page (1 to 500, default 100).","title":"Page Size"},"page_number":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page Number"},"timezone":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":"UTC","description":"Time zone name such as 'UTC' or 'Europe/London' (see Awin's list of supported zones).","title":"Timezone"}},"required":["publisher_id","start_date","end_date"],"title":"list_transaction_queriesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_link_builder_quota":{"post":{"operationId":"get_link_builder_quota","summary":"Show how many short links the publisher account may generate in 24 hours and how many were used. Use for \"How many Awin ","description":"Show how many short links the publisher account may generate in 24 hours and how many were used. Use for \"How many Awin short links can I still generate today\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"publisher_id":{"description":"Your Awin publisher account id (a number, from list_accounts or the Awin UI URL).","title":"Publisher Id","type":"integer"}},"required":["publisher_id"],"title":"get_link_builder_quotaArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}