{"openapi":"3.1.0","info":{"title":"Zenskar (BYOK) API","version":"0.1.0","description":"Zenskar (BYOK) lets an AI assistant read your own Zenskar data through the Zenskar API with a key you supply (Zenskar API key). Read-only: 10 tools (list_customers, list_invoices, list_payments, list_credit_notes, list_contracts, list_plans, list_ledger_accounts, list_accounting_periods, get_balance_sheet, get_income_statement). 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-zenskar.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-zenskar/docs"},"termsOfService":"https://connectorbay.com/byok-zenskar/terms"},"servers":[{"url":"https://byok-zenskar.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-zenskar/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_customers":{"post":{"operationId":"list_customers","summary":"List billing customers with name, external id, auto-charge flag and creation time. Email, phone and addresses are not re","description":"List billing customers with name, external id, auto-charge flag and creation time. Email, phone and addresses are not returned. Use for \"Which customers do I bill in Zenskar\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Free-text search over customer fields.","title":"Search"},"customer_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by customer name.","title":"Customer Name"},"external_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by the external id you stored.","title":"External Id"},"order":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Sort field, prefix with '-' for descending, for example '-created_at'.","title":"Order"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100; the API default is 10).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor taken from the 'next' or 'previous' field of the previous answer, to page through results.","title":"Cursor"}},"title":"list_customersArguments","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_invoices":{"post":{"operationId":"list_invoices","summary":"List invoices with number, status, totals, amount due, due date and the customer and contract they belong to. Use for \"W","description":"List invoices with number, status, totals, amount due, due date and the customer and contract they belong to. Use for \"Which Zenskar invoices have an amount due\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"customer_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only invoices of this customer id.","title":"Customer Id"},"contract_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only invoices of this contract id.","title":"Contract Id"},"status":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Invoice status to filter by, for example draft, active or paid.","title":"Status"},"invoice_number":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by invoice number.","title":"Invoice Number"},"order":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Sort field, prefix with '-' for descending (default -created_at).","title":"Order"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100; the API default is 10).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor taken from the 'next' or 'previous' field of the previous answer, to page through results.","title":"Cursor"}},"title":"list_invoicesArguments","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_payments":{"post":{"operationId":"list_payments","summary":"List payments with type, amount, refunded amount, currency, status, payment method and timestamp. Customer emails are no","description":"List payments with type, amount, refunded amount, currency, status, payment method and timestamp. Customer emails are not returned. Use for \"Which payments did Zenskar record this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"customer_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only payments of this customer id.","title":"Customer Id"},"status":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Payment status to filter by.","title":"Status"},"type":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Payment type to filter by.","title":"Type"},"currency_code":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Currency code such as USD.","title":"Currency Code"},"sort_key":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Field to sort by.","title":"Sort Key"},"sort_type":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction: asc or desc.","title":"Sort Type"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100; the API default is 10).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor taken from the 'next' or 'previous' field of the previous answer, to page through results.","title":"Cursor"}},"title":"list_paymentsArguments","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_credit_notes":{"post":{"operationId":"list_credit_notes","summary":"List credit notes with number, status, amount, currency, repayment method and linked invoice and customer. Use for \"Whic","description":"List credit notes with number, status, amount, currency, repayment method and linked invoice and customer. Use for \"Which credit notes were issued in Zenskar\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"customer_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only credit notes of this customer id.","title":"Customer Id"},"invoice_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only credit notes of this invoice id.","title":"Invoice Id"},"status":{"anyOf":[{"enum":["in_progress","issued","void","paid"],"type":"string"},{"type":"null"}],"default":null,"description":"Credit note status: in_progress, issued, void or paid.","title":"Status"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100; the API default is 10).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor taken from the 'next' or 'previous' field of the previous answer, to page through results.","title":"Cursor"}},"title":"list_credit_notesArguments","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_contracts":{"post":{"operationId":"list_contracts","summary":"List customer contracts with name, status, currency, start and end dates, plan and customer. Use for \"Which Zenskar cont","description":"List customer contracts with name, status, currency, start and end dates, plan and customer. Use for \"Which Zenskar contracts are active\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"customer_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only contracts of this customer id.","title":"Customer Id"},"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by contract name.","title":"Name"},"status":{"anyOf":[{"enum":["draft","active","paused","expired","disputed"],"type":"string"},{"type":"null"}],"default":null,"description":"Contract status: draft, active, paused, expired or disputed.","title":"Status"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100; the API default is 10).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor taken from the 'next' or 'previous' field of the previous answer, to page through results.","title":"Cursor"}},"title":"list_contractsArguments","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_plans":{"post":{"operationId":"list_plans","summary":"List pricing plans with name, description, status (draft or active) and schedule duration. Use for \"What plans exist in ","description":"List pricing plans with name, description, status (draft or active) and schedule duration. Use for \"What plans exist in Zenskar\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by plan name.","title":"Name"},"status":{"anyOf":[{"enum":["draft","active"],"type":"string"},{"type":"null"}],"default":null,"description":"Plan status: draft or active.","title":"Status"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100; the API default is 10).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor taken from the 'next' or 'previous' field of the previous answer, to page through results.","title":"Cursor"}},"title":"list_plansArguments","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_ledger_accounts":{"post":{"operationId":"list_ledger_accounts","summary":"List ledger accounts of the revenue ledger with category (assets, liabilities, equity, income, expenses), balance normal","description":"List ledger accounts of the revenue ledger with category (assets, liabilities, equity, income, expenses), balance normality and parent flag. Use for \"Which ledger accounts does Zenskar keep\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by account name.","title":"Name"},"account_category":{"anyOf":[{"enum":["Assets","Liabilities","Equity","Income","Expenses"],"type":"string"},{"type":"null"}],"default":null,"description":"Account category: Assets, Liabilities, Equity, Income or Expenses.","title":"Account Category"},"is_parent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to list only parent accounts.","title":"Is Parent"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100; the API default is 10).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor taken from the 'next' or 'previous' field of the previous answer, to page through results.","title":"Cursor"}},"title":"list_ledger_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_accounting_periods":{"post":{"operationId":"list_accounting_periods","summary":"List closed accounting periods with start, end, status and closing time. Use for \"Which accounting periods are closed in","description":"List closed accounting periods with start, end, status and closing time. Use for \"Which accounting periods are closed in Zenskar\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"order":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Sort order, for example '-period_end' (default).","title":"Order"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100; the API default is 10).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor taken from the 'next' or 'previous' field of the previous answer, to page through results.","title":"Cursor"}},"title":"list_accounting_periodsArguments","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_balance_sheet":{"post":{"operationId":"get_balance_sheet","summary":"Get the balance sheet from the revenue ledger for a date range and cadence, optionally grouped. The answer is returned a","description":"Get the balance sheet from the revenue ledger for a date range and cadence, optionally grouped. The answer is returned as the API sends it. Use for \"What did the Zenskar balance sheet look like at the end of September\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Start date (yyyy-MM-dd).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"End date (yyyy-MM-dd).","title":"End Date"},"cadence":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":"month","description":"Period size, for example month.","title":"Cadence"},"currency":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Currency code to report in, such as USD.","title":"Currency"},"customer_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Limit the figures to one customer id.","title":"Customer Id"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100; the API default is 10).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor taken from the 'next' or 'previous' field of the previous answer, to page through results.","title":"Cursor"}},"title":"get_balance_sheetArguments","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_income_statement":{"post":{"operationId":"get_income_statement","summary":"Get the income statement from the revenue ledger for a date range and cadence, optionally grouped. The answer is returne","description":"Get the income statement from the revenue ledger for a date range and cadence, optionally grouped. The answer is returned as the API sends it. Use for \"What was the Zenskar income statement for Q3\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Start date (yyyy-MM-dd).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"End date (yyyy-MM-dd).","title":"End Date"},"cadence":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":"month","description":"Period size, for example month.","title":"Cadence"},"currency":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Currency code to report in, such as USD.","title":"Currency"},"customer_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Limit the figures to one customer id.","title":"Customer Id"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100; the API default is 10).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor taken from the 'next' or 'previous' field of the previous answer, to page through results.","title":"Cursor"}},"title":"get_income_statementArguments","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}}}}