{"openapi":"3.1.0","info":{"title":"Post Grid Print and Mail (BYOK) API","version":"0.1.0","description":"Post Grid Print and Mail (BYOK) lets an AI assistant read your own Post Grid Print and Mail data through the Post Grid Print and Mail API with a key you supply (PostGrid Print and Mail API key (test or live)). Read-only: 10 tools (list_templates, get_template, list_letters, get_letter, list_postcards, list_self_mailers, list_trackers, list_webhooks, list_return_envelopes, list_events). The BYOK...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-postgrid.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-postgrid/docs"},"termsOfService":"https://connectorbay.com/byok-postgrid/terms"},"servers":[{"url":"https://byok-postgrid.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-postgrid/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_templates":{"post":{"operationId":"list_templates","summary":"List the HTML templates stored in the PostGrid account with description, live or test mode and dates. Use for \"Which mai","description":"List the HTML templates stored in the PostGrid account with description, live or test mode and dates. Use for \"Which mail templates do I have in PostGrid\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"skip":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of records to skip (for paging).","title":"Skip"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (default 10, keep at 100 or below).","title":"Limit"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Optional text filter applied to the description and other searchable fields.","title":"Search"}},"title":"list_templatesArguments","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_template":{"post":{"operationId":"get_template","summary":"Get one template's description, mode and dates by its id. Use for \"When was PostGrid template template_c6HSqnsD1h2zoeHJ6","description":"Get one template's description, mode and dates by its id. Use for \"When was PostGrid template template_c6HSqnsD1h2zoeHJ6Z9EEA last updated\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Id of the template, starting with 'template_'.","maxLength":200,"title":"Id","type":"string"}},"required":["id"],"title":"get_templateArguments","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_letters":{"post":{"operationId":"list_letters","summary":"List letter orders with status, send date, page count and description. Recipient and sender addresses are not returned. ","description":"List letter orders with status, send date, page count and description. Recipient and sender addresses are not returned. Use for \"What is the status of my recent PostGrid letters\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"skip":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of records to skip (for paging).","title":"Skip"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (default 10, keep at 100 or below).","title":"Limit"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Optional text filter applied to the description and other searchable fields.","title":"Search"}},"title":"list_lettersArguments","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_letter":{"post":{"operationId":"get_letter","summary":"Get the status, send date and page count of one letter order by its id (addresses are not returned). Use for \"Has PostGr","description":"Get the status, send date and page count of one letter order by its id (addresses are not returned). Use for \"Has PostGrid letter letter_s3x64gpEQaU5Jj3hFkMTWQ been sent yet\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Id of the letter, starting with 'letter_'.","maxLength":200,"title":"Id","type":"string"}},"required":["id"],"title":"get_letterArguments","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_postcards":{"post":{"operationId":"list_postcards","summary":"List postcard orders with size, status, send date and page count. Addresses are not returned. Use for \"How many postcard","description":"List postcard orders with size, status, send date and page count. Addresses are not returned. Use for \"How many postcards have I ordered through PostGrid and what are their statuses\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"skip":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of records to skip (for paging).","title":"Skip"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (default 10, keep at 100 or below).","title":"Limit"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Optional text filter applied to the description and other searchable fields.","title":"Search"}},"title":"list_postcardsArguments","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_self_mailers":{"post":{"operationId":"list_self_mailers","summary":"List self mailer orders with size, mailing class, status and send date. Addresses are not returned. Use for \"Which self ","description":"List self mailer orders with size, mailing class, status and send date. Addresses are not returned. Use for \"Which self mailers are scheduled in PostGrid\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"skip":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of records to skip (for paging).","title":"Skip"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (default 10, keep at 100 or below).","title":"Limit"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Optional text filter applied to the description and other searchable fields.","title":"Search"}},"title":"list_self_mailersArguments","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_trackers":{"post":{"operationId":"list_trackers","summary":"List QR or link trackers with redirect URL template, expiry in days and visit counts. Use for \"How many visits have my P","description":"List QR or link trackers with redirect URL template, expiry in days and visit counts. Use for \"How many visits have my PostGrid mail trackers recorded\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"skip":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of records to skip (for paging).","title":"Skip"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (default 10, keep at 100 or below).","title":"Limit"}},"title":"list_trackersArguments","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_webhooks":{"post":{"operationId":"list_webhooks","summary":"List configured webhooks with target URL, enabled state and subscribed event types. The signing secret is not returned. ","description":"List configured webhooks with target URL, enabled state and subscribed event types. The signing secret is not returned. Use for \"Which PostGrid webhooks are enabled\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"skip":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of records to skip (for paging).","title":"Skip"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (default 10, keep at 100 or below).","title":"Limit"}},"title":"list_webhooksArguments","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_return_envelopes":{"post":{"operationId":"list_return_envelopes","summary":"List return envelope products with the number still available and creation date. Use for \"How many return envelopes do I","description":"List return envelope products with the number still available and creation date. Use for \"How many return envelopes do I have available in PostGrid\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"skip":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of records to skip (for paging).","title":"Skip"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (default 10, keep at 100 or below).","title":"Limit"}},"title":"list_return_envelopesArguments","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_events":{"post":{"operationId":"list_events","summary":"List recent account events such as letter.created with id, type, mode and time. Event payloads and addresses are not ret","description":"List recent account events such as letter.created with id, type, mode and time. Event payloads and addresses are not returned. Use for \"What mail events happened recently in PostGrid\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"skip":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of records to skip (for paging).","title":"Skip"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (default 10, keep at 100 or below).","title":"Limit"}},"title":"list_eventsArguments","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}}}}