{"openapi":"3.1.0","info":{"title":"GlueLetter (BYOK) API","version":"0.1.0","description":"GlueLetter (BYOK) lets an AI assistant read your own GlueLetter data through the GlueLetter API with a key you supply (GlueLetter API key (My Account page; Enterprise plan or API add-on)). Read-only: 12 tools (list_clients, list_newsletters_metadata, list_newsletters, get_newsletter, list_campaigns, get_campaign, search_campaigns, get_growth, list_audiences, list_links, list_topics,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-glueletter.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-glueletter/docs"},"termsOfService":"https://connectorbay.com/byok-glueletter/terms"},"servers":[{"url":"https://byok-glueletter.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-glueletter/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_clients":{"post":{"operationId":"list_clients","summary":"List the GlueLetter clients (organizations) the key can read, with id and name; use the client_id in every other tool. U","description":"List the GlueLetter clients (organizations) the key can read, with id and name; use the client_id in every other tool. Use for \"Which GlueLetter clients can I read\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_clientsArguments","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_newsletters_metadata":{"post":{"operationId":"list_newsletters_metadata","summary":"List the newsletters configured for a client (id, name, description) without statistics. Use for \"Which newsletters do I","description":"List the newsletters configured for a client (id, name, description) without statistics. Use for \"Which newsletters do I have in GlueLetter\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"client_id":{"description":"GlueLetter client id (the client_id from list_clients).","maxLength":60,"title":"Client Id","type":"string"}},"required":["client_id"],"title":"list_newsletters_metadataArguments","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_newsletters":{"post":{"operationId":"list_newsletters","summary":"List newsletters with sends, opens, open rate, clicks, click rate and unsubscribes for a period against the period befor","description":"List newsletters with sends, opens, open rate, clicks, click rate and unsubscribes for a period against the period before. Use for \"How are my newsletters performing this month in GlueLetter\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"client_id":{"description":"GlueLetter client id (the client_id from list_clients).","maxLength":60,"title":"Client Id","type":"string"},"audience_id":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Audience id to filter by, or 0 for all readers (default 0).","title":"Audience Id"},"days_back":{"anyOf":[{"maximum":3650,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Use the last N days (then start_date and end_date are not needed).","title":"Days Back"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"First day, YYYY-MM-DD (give this with end_date, or use days_back).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Last day, YYYY-MM-DD.","title":"End Date"}},"required":["client_id"],"title":"list_newslettersArguments","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_newsletter":{"post":{"operationId":"get_newsletter","summary":"Get one newsletter's sends, opens, clicks, unsubscribes and calculated metrics for a period. Use for \"How did GlueLetter","description":"Get one newsletter's sends, opens, clicks, unsubscribes and calculated metrics for a period. Use for \"How did GlueLetter newsletter 1 do last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"newsletter_id":{"description":"Newsletter id (the id from list_newsletters_metadata).","title":"Newsletter Id","type":"integer"},"client_id":{"description":"GlueLetter client id (the client_id from list_clients).","maxLength":60,"title":"Client Id","type":"string"},"audience_id":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Audience id to filter by, or 0 for all readers (default 0).","title":"Audience Id"},"days_back":{"anyOf":[{"maximum":3650,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Use the last N days (then start_date and end_date are not needed).","title":"Days Back"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"First day, YYYY-MM-DD (give this with end_date, or use days_back).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Last day, YYYY-MM-DD.","title":"End Date"}},"required":["newsletter_id","client_id"],"title":"get_newsletterArguments","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_campaigns":{"post":{"operationId":"list_campaigns","summary":"List newsletter campaigns (issues) with subject, publish date, sends, opens, clicks, unsubscribes and conversions for a ","description":"List newsletter campaigns (issues) with subject, publish date, sends, opens, clicks, unsubscribes and conversions for a period. Use for \"Which GlueLetter campaigns got the most clicks last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"client_id":{"description":"GlueLetter client id (the client_id from list_clients).","maxLength":60,"title":"Client Id","type":"string"},"newsletter_ids":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only these newsletter ids, comma separated.","title":"Newsletter Ids"},"audience_id":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Audience id to filter by, or 0 for all readers (default 0).","title":"Audience Id"},"days_back":{"anyOf":[{"maximum":3650,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Use the last N days (then start_date and end_date are not needed).","title":"Days Back"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"First day, YYYY-MM-DD (give this with end_date, or use days_back).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Last day, YYYY-MM-DD.","title":"End Date"}},"required":["client_id"],"title":"list_campaignsArguments","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_campaign":{"post":{"operationId":"get_campaign","summary":"Get one campaign's engagement, top links and conversion totals. Use for \"How did GlueLetter campaign 1 perform\".","description":"Get one campaign's engagement, top links and conversion totals. Use for \"How did GlueLetter campaign 1 perform\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"campaign_id":{"description":"Campaign id (the id from list_campaigns).","title":"Campaign Id","type":"integer"},"client_id":{"description":"GlueLetter client id (the client_id from list_clients).","maxLength":60,"title":"Client Id","type":"string"},"audience_id":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Audience id to filter by, or 0 for all readers (default 0).","title":"Audience Id"}},"required":["campaign_id","client_id"],"title":"get_campaignArguments","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/search_campaigns":{"post":{"operationId":"search_campaigns","summary":"Find published campaigns whose subject line contains some text. Use for \"Which GlueLetter campaigns mention the election","description":"Find published campaigns whose subject line contains some text. Use for \"Which GlueLetter campaigns mention the election in the subject\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"client_id":{"description":"GlueLetter client id (the client_id from list_clients).","maxLength":60,"title":"Client Id","type":"string"},"search":{"description":"Text to look for in subject lines.","maxLength":200,"title":"Search","type":"string"},"max_results":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Maximum campaigns (1 to 1000, default 10).","title":"Max Results"}},"required":["client_id","search"],"title":"search_campaignsArguments","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_growth":{"post":{"operationId":"get_growth","summary":"Get audience growth for a period: change in sends, unsubscribes and first-time readers per newsletter and in total, with","description":"Get audience growth for a period: change in sends, unsubscribes and first-time readers per newsletter and in total, with daily series. Use for \"Is my GlueLetter audience growing\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"client_id":{"description":"GlueLetter client id (the client_id from list_clients).","maxLength":60,"title":"Client Id","type":"string"},"days_back":{"anyOf":[{"maximum":3650,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Use the last N days (then start_date and end_date are not needed).","title":"Days Back"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"First day, YYYY-MM-DD (give this with end_date, or use days_back).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Last day, YYYY-MM-DD.","title":"End Date"},"newsletter_ids":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only these newsletter ids, comma separated.","title":"Newsletter Ids"}},"required":["client_id"],"title":"get_growthArguments","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_audiences":{"post":{"operationId":"list_audiences","summary":"List the audience groups configured for the client (id, title, description). Use for \"Which audience groups exist in Glu","description":"List the audience groups configured for the client (id, title, description). Use for \"Which audience groups exist in GlueLetter\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"client_id":{"description":"GlueLetter client id (the client_id from list_clients).","maxLength":60,"title":"Client Id","type":"string"}},"required":["client_id"],"title":"list_audiencesArguments","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_links":{"post":{"operationId":"list_links","summary":"List the linked web pages readers clicked with title, authors, clicks and click rate; page titles and URLs of articles y","description":"List the linked web pages readers clicked with title, authors, clicks and click rate; page titles and URLs of articles you link to. Use for \"Which links got the most clicks in my newsletters\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"client_id":{"description":"GlueLetter client id (the client_id from list_clients).","maxLength":60,"title":"Client Id","type":"string"},"newsletter_ids":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only these newsletter ids, comma separated.","title":"Newsletter Ids"},"audience_id":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Audience id to filter by, or 0 for all readers (default 0).","title":"Audience Id"},"days_back":{"anyOf":[{"maximum":3650,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Use the last N days (then start_date and end_date are not needed).","title":"Days Back"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"First day, YYYY-MM-DD (give this with end_date, or use days_back).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Last day, YYYY-MM-DD.","title":"End Date"},"max_results":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Maximum links (1 to 1000, default 50).","title":"Max Results"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only links whose title or URL contains this text.","title":"Search"}},"required":["client_id"],"title":"list_linksArguments","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_topics":{"post":{"operationId":"list_topics","summary":"List the topics of the linked content with campaigns, links, clicks and click rate. Use for \"Which topics do my readers ","description":"List the topics of the linked content with campaigns, links, clicks and click rate. Use for \"Which topics do my readers click most\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"client_id":{"description":"GlueLetter client id (the client_id from list_clients).","maxLength":60,"title":"Client Id","type":"string"},"newsletter_ids":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only these newsletter ids, comma separated.","title":"Newsletter Ids"},"audience_id":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Audience id to filter by, or 0 for all readers (default 0).","title":"Audience Id"},"days_back":{"anyOf":[{"maximum":3650,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Use the last N days (then start_date and end_date are not needed).","title":"Days Back"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"First day, YYYY-MM-DD (give this with end_date, or use days_back).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Last day, YYYY-MM-DD.","title":"End Date"},"max_results":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":500,"description":"Maximum topics (1 to 1000, default 500).","title":"Max Results"}},"required":["client_id"],"title":"list_topicsArguments","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_ad_campaigns":{"post":{"operationId":"list_ad_campaigns","summary":"Summarise the newsletter ad campaigns: totals and per campaign sends, opens, impressions, clicks and click rate. Use for","description":"Summarise the newsletter ad campaigns: totals and per campaign sends, opens, impressions, clicks and click rate. Use for \"How are my GlueLetter newsletter ads doing\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"client_id":{"description":"GlueLetter client id (the client_id from list_clients).","maxLength":60,"title":"Client Id","type":"string"},"newsletter_ids":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only these newsletter ids, comma separated.","title":"Newsletter Ids"},"days_back":{"anyOf":[{"maximum":3650,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Use the last N days (then start_date and end_date are not needed).","title":"Days Back"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"First day, YYYY-MM-DD (give this with end_date, or use days_back).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Last day, YYYY-MM-DD.","title":"End Date"}},"required":["client_id"],"title":"list_ad_campaignsArguments","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}}}}