{"openapi":"3.1.0","info":{"title":"Pleo (BYOK) API","version":"0.1.0","description":"Pleo (BYOK) lets an AI assistant read your own Pleo data through the Pleo API with a key you supply (Pleo Standalone API key (enabled on request by Pleo)). Read-only: 6 tools (list_companies, search_accounting_entries, search_vendors, search_chart_of_accounts, search_tax_codes, list_export_jobs). The BYOK key travels with each request, is used for that one call only and is never stored, logged or...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-pleo.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-pleo/docs"},"termsOfService":"https://connectorbay.com/byok-pleo/terms"},"servers":[{"url":"https://byok-pleo.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-pleo/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_companies":{"post":{"operationId":"list_companies","summary":"List the companies of a Pleo organisation with name and registration number. Use for \"Which companies are in my Pleo org","description":"List the companies of a Pleo organisation with name and registration number. Use for \"Which companies are in my Pleo organisation\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"Pleo organisation id (UUID).","maxLength":64,"title":"Organization Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many results to skip, for paging (cannot be combined with after or before).","title":"Offset"}},"required":["organization_id"],"title":"list_companiesArguments","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_accounting_entries":{"post":{"operationId":"search_accounting_entries","summary":"Search expense accounting entries (card spend, reimbursements) with date, family, status, export and review status, acco","description":"Search expense accounting entries (card spend, reimbursements) with date, family, status, export and review status, account, tax code, team and amounts. Read-only query despite POST. Use for \"What expenses were recorded in Pleo last month and which are still unexported\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"company_id":{"description":"Pleo company id (a UUID) whose data to read.","maxLength":64,"title":"Company Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: pagination.endCursor of the previous answer.","title":"After"},"include_deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include deleted entries.","title":"Include Deleted"},"performed_at_start":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only entries performed on or after this ISO 8601 time.","title":"Performed At Start"},"performed_at_end":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only entries performed on or before this ISO 8601 time.","title":"Performed At End"},"settled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only settled entries, false for only unsettled ones.","title":"Settled"},"has_note":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only entries with a note, false for only those without.","title":"Has Note"},"has_account":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only entries with an account assigned, false for those without.","title":"Has Account"}},"required":["company_id"],"title":"search_accounting_entriesArguments","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_vendors":{"post":{"operationId":"search_vendors","summary":"Search vendors by name with code, country, accounting system and company. Read-only query despite POST. Use for \"Which v","description":"Search vendors by name with code, country, accounting system and company. Read-only query despite POST. Use for \"Which vendors do we have in Pleo\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"company_id":{"description":"Pleo company id (a UUID) whose data to read.","maxLength":64,"title":"Company Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many results to skip, for paging (cannot be combined with after or before).","title":"Offset"},"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only vendors whose name matches this text.","title":"Name"}},"required":["company_id"],"title":"search_vendorsArguments","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_chart_of_accounts":{"post":{"operationId":"search_chart_of_accounts","summary":"Search the chart of accounts of a company: code, name, archived flag and linked tax code. Read-only query despite POST. ","description":"Search the chart of accounts of a company: code, name, archived flag and linked tax code. Read-only query despite POST. Use for \"Show the Pleo chart of accounts for my company\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"company_id":{"description":"Pleo company id (UUID).","maxLength":200,"title":"Company Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many results to skip, for paging (cannot be combined with after or before).","title":"Offset"},"exclude_if_assigned_to_category":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to leave out accounts already assigned to a bookkeeping category.","title":"Exclude If Assigned To Category"},"exclude_if_assigned_to_contra_account":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to leave out accounts already assigned to a contra account.","title":"Exclude If Assigned To Contra Account"},"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only accounts whose name matches this text.","title":"Name"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only archived accounts, false for only active ones.","title":"Archived"}},"required":["company_id"],"title":"search_chart_of_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/search_tax_codes":{"post":{"operationId":"search_tax_codes","summary":"Search tax codes of a company (the type filter is inclusive, exclusive or reverse). Read-only query despite POST. Use fo","description":"Search tax codes of a company (the type filter is inclusive, exclusive or reverse). Read-only query despite POST. Use for \"Which tax codes are configured in Pleo\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"company_id":{"description":"Pleo company id (a UUID) whose data to read.","maxLength":64,"title":"Company Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many results to skip, for paging (cannot be combined with after or before).","title":"Offset"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only archived tax codes, false for only active ones.","title":"Archived"},"type":{"anyOf":[{"enum":["inclusive","exclusive","reverse"],"type":"string"},{"type":"null"}],"default":null,"description":"Only tax codes of this type.","title":"Type"}},"required":["company_id"],"title":"search_tax_codesArguments","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_export_jobs":{"post":{"operationId":"list_export_jobs","summary":"List accounting export jobs of a company with status, target system, item count and times. Use for \"Did the last Pleo ac","description":"List accounting export jobs of a company with status, target system, item count and times. Use for \"Did the last Pleo accounting exports succeed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"company_id":{"description":"Pleo company id (a UUID) whose data to read.","maxLength":64,"title":"Company Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many results to skip, for paging (cannot be combined with after or before).","title":"Offset"}},"required":["company_id"],"title":"list_export_jobsArguments","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}}}}