{"openapi":"3.1.0","info":{"title":"Torii (BYOK) API","version":"0.1.0","description":"Torii (BYOK) lets an AI assistant read your own Torii data through the Torii API with a key you supply (Torii API key (admin-created)). Read-only: 7 tools (get_organization, list_apps, search_apps, get_app, list_contracts, get_contract, list_transactions). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only ever sent to...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-torii.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-torii/docs"},"termsOfService":"https://connectorbay.com/byok-torii/terms"},"servers":[{"url":"https://byok-torii.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-torii/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/get_organization":{"post":{"operationId":"get_organization","summary":"Show the Torii organization the key belongs to: id and company name. Use for \"Which Torii organization is this key for\".","description":"Show the Torii organization the key belongs to: id and company name. Use for \"Which Torii organization is this key for\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_organizationArguments","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_apps":{"post":{"operationId":"list_apps","summary":"List the SaaS apps Torii discovered with state, category, vendor, primary owner and active user count. Choose columns wi","description":"List the SaaS apps Torii discovered with state, category, vendor, primary owner and active user count. Choose columns with fields; sort and page with cursor. Use for \"Which SaaS apps do we use, and how many active users does each have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"fields":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":"id,name,state,category,url,vendor,activeUsersCount,primaryOwner","description":"Comma-separated fields to return per app. Allowed include id, name, state, category, url, imageUrl, description, tags, vendor, primaryOwner, activeUsersCount, lastVisitTime, creationTime and custom app fields.","title":"Fields"},"q":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Free-text search over apps.","title":"Q"},"sort":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated sort fields, each with :asc or :desc, for example 'name:asc'.","title":"Sort"},"include_licenses":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include an aggregated license summary per app.","title":"Include Licenses"},"size":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results to return (1 to 1000).","title":"Size"},"cursor":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor: the nextCursor value of the previous answer.","title":"Cursor"}},"title":"list_appsArguments","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_apps":{"post":{"operationId":"search_apps","summary":"Search Torii's app catalog by name and return the best matches (up to 50). Use for \"Is Notion in the Torii app catalog\".","description":"Search Torii's app catalog by name and return the best matches (up to 50). Use for \"Is Notion in the Torii app catalog\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"description":"Search text, for example an app name.","maxLength":100,"title":"Q","type":"string"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":5,"description":"How many matches to return (1 to 50).","title":"Limit"}},"required":["q"],"title":"search_appsArguments","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_app":{"post":{"operationId":"get_app","summary":"Get one app by id with its fields (name, state, category, vendor, owner, user counts). Use for \"Show details for Torii a","description":"Get one app by id with its fields (name, state, category, vendor, owner, user counts). Use for \"Show details for Torii app 1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"app_id":{"description":"Torii app id.","title":"App Id","type":"integer"},"fields":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":"id,name,state,category,url,vendor,activeUsersCount,primaryOwner","description":"Comma-separated fields to return. Allowed include id, name, state, category, url, vendor, primaryOwner, activeUsersCount, description, tags.","title":"Fields"}},"required":["app_id"],"title":"get_appArguments","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 software contracts with name, app id, owner and status; request more columns with fields (including custom contract","description":"List software contracts with name, app id, owner and status; request more columns with fields (including custom contract fields). Use for \"Which software contracts do we have in Torii\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"fields":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":"id,name,idApp,owner,status","description":"Comma-separated fields to return. Allowed include id, idApp, name, owner, status, createdBy and custom contract fields.","title":"Fields"},"q":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Free-text search over contracts.","title":"Q"},"sort":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated sort fields, each with :asc or :desc.","title":"Sort"},"size":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results to return (1 to 1000).","title":"Size"},"cursor":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor: the nextCursor value of the previous answer.","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/get_contract":{"post":{"operationId":"get_contract","summary":"Get one contract by id with name, app id, owner and status. Use for \"Show Torii contract 5\".","description":"Get one contract by id with name, app id, owner and status. Use for \"Show Torii contract 5\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"contract_id":{"description":"Torii contract id.","title":"Contract Id","type":"integer"},"fields":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":"id,name,idApp,owner,status","description":"Comma-separated fields to return. Allowed include id, idApp, name, owner, status, createdBy and custom contract fields.","title":"Fields"}},"required":["contract_id"],"title":"get_contractArguments","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 expense transactions mapped to apps with date, amount, source, description, app and department. Filter by app; sort","description":"List expense transactions mapped to apps with date, amount, source, description, app and department. Filter by app; sort by date or amount. Use for \"What did we spend on Slack according to Torii transactions\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id_app":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only transactions mapped to this app id.","title":"Id App"},"q":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Free-text search on the transaction description.","title":"Q"},"sort":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Sort, for example 'transactionDate:desc'. Sortable: id, transactionDate, amount, description, source, appName.","title":"Sort"},"fields":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":"id,idApp,appName,transactionDate,amount,source,description,department","description":"Comma-separated fields to return. Allowed include id, idApp, appName, transactionDate, amount, source, description, department, domain, mappingStatus.","title":"Fields"},"size":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results to return (1 to 1000).","title":"Size"},"cursor":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor: the nextCursor value of the previous answer.","title":"Cursor"}},"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}}}}