{"openapi":"3.1.0","info":{"title":"Jupid API","version":"1.0.0"},"servers":[{"url":"/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Partner embed JWT or an existing Jupid MCP OAuth access token."}}},"paths":{"/organizations/{organization_id}/accounts":{"post":{"operationId":"upsertAccounts","summary":"Create or update accounts","description":"Create or update up to 500 accounts in an API source by external_id. Repeated external IDs update the same accounts. Balances use currency units, not cents.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"external_id":{"type":"string"}},"required":["id","external_id"],"additionalProperties":false}}},"required":["accounts"],"additionalProperties":false}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accounts":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":256},"name":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["depository","credit","loan","investment","brokerage","other"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"current_balance":{"type":"number","minimum":-9999999999999.99,"maximum":9999999999999.99,"multipleOf":0.01}},"required":["external_id","name","type","currency","current_balance"],"additionalProperties":false}}},"required":["source_id","accounts"],"additionalProperties":false}}}}},"get":{"operationId":"listAccounts","summary":"List Jupid accounts and integrations","description":"List connected Jupid data sources and accounts with safe balances and sync status.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"includeInactive","in":"query","required":false,"description":"Include inactive accounts in the account list.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Include inactive accounts in the account list.","type":"boolean"}}}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/accounts/{account_id}/transactions":{"post":{"operationId":"upsertTransactions","summary":"Create or update transactions","description":"Create or update up to 500 transactions in a connected API source by external_id, unique within the source. Amounts use currency units: positive incoming, negative outgoing. Date is YYYY-MM-DD in UTC. Processing continues in the background.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"account_id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"external_id":{"type":"string"}},"required":["id","external_id"],"additionalProperties":false}}},"required":["transactions"],"additionalProperties":false}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transactions":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"number","minimum":-9999999999999.99,"maximum":9999999999999.99,"multipleOf":0.01},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"description":{"type":"string","minLength":1,"maxLength":4096},"pending":{"type":"boolean"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["external_id","amount","date","description"],"additionalProperties":false}}},"required":["transactions"],"additionalProperties":false}}}}}},"/organizations/{organization_id}/accounts/{account_id}":{"delete":{"operationId":"deleteAccount","summary":"Disconnect account","description":"Disconnect one account, retaining its transaction history. Requires an organization owner. Revokes the source when no active accounts remain. Repeated deletion succeeds.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"account_id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deleted":{"type":"boolean","const":true}},"required":["account_id","deleted"],"additionalProperties":false}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/transactions/{transaction_id}":{"delete":{"operationId":"deleteTransaction","summary":"Delete transaction","description":"Soft-delete one transaction. Repeated deletion succeeds.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"transaction_id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transaction_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deleted":{"type":"boolean","const":true}},"required":["transaction_id","deleted"],"additionalProperties":false}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}},"get":{"operationId":"getTransaction","summary":"Get transaction details","description":"Get detailed safe information about a transaction by ID.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"transaction_id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","description":"The transaction ID to look up."}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/profile":{"get":{"operationId":"getProfile","summary":"Get Jupid profile and data summary","description":"Get the current Jupid user profile, company summary, and data coverage counts.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/categories":{"get":{"operationId":"listCategories","summary":"List categories","description":"List the classification categories available to the user. Does not expose prompts or category editing.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/outstanding-issues":{"get":{"operationId":"listOutstandingIssues","summary":"List outstanding issues","description":"List open Jupid questions that need user context before processing can continue.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"objectType","in":"query","required":false,"description":"Filter by issue object type.","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Filter by issue object type.","type":"string","enum":["transaction","counterparty","company"]}},{"name":"limit","in":"query","required":false,"description":"Maximum number of issues to return. Default 20, max 50.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Maximum number of issues to return. Default 20, max 50.","default":20,"type":"integer","exclusiveMinimum":0,"maximum":50}}}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/outstanding-issues/{id}/answers":{"post":{"operationId":"answerOutstandingIssue","summary":"Answer outstanding issue","description":"Answer one open Jupid issue by hook ID. Use only when the user explicitly provides the answer. Returns status only.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","description":"The outstanding issue hook ID."}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"answer":{"type":"string","description":"The factual answer to save as context."},"selectedOption":{"description":"Selected option, if the issue offered choices.","type":["string","null"]}},"required":["answer"]}}}}}},"/organizations/{organization_id}/agent-connection":{"get":{"operationId":"getAgentConnectionInfo","summary":"Get Jupid agent connection info","description":"Get Jupid MCP setup details for connecting external AI agents.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/billing":{"get":{"operationId":"getBillingStatus","summary":"Get Jupid billing status","description":"Get your personal Jupid billing status. Billing changes must be managed in the web app.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/reports/cashflow":{"get":{"operationId":"getCashflowReport","summary":"Get cash-flow report","description":"Get a cash-flow report by period, category tree, and counterparty attribution.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"startDate","in":"query","required":true,"description":"Start date, YYYY-MM-DD or ISO 8601 datetime (inclusive)","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","description":"Start date, YYYY-MM-DD or ISO 8601 datetime (inclusive)"}},{"name":"endDate","in":"query","required":true,"description":"End date, YYYY-MM-DD or ISO 8601 datetime (inclusive; a date-only value covers that whole day, UTC)","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","description":"End date, YYYY-MM-DD or ISO 8601 datetime (inclusive; a date-only value covers that whole day, UTC)"}},{"name":"dateField","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":"processed_at","type":"string","enum":["authorized_at","processed_at"]}},{"name":"periodGrouping","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":"month","type":"string","enum":["quarter","month","week","day"]}},{"name":"periodLimit","in":"query","required":false,"description":"Max number of newest periods in per-period breakdowns. Totals always cover the whole date range; when basis.truncated is true, raise periodLimit to make period sums reconcile with totals","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":12,"description":"Max number of newest periods in per-period breakdowns. Totals always cover the whole date range; when basis.truncated is true, raise periodLimit to make period sums reconcile with totals","type":"integer","minimum":1,"maximum":9007199254740991}}}},{"name":"categoryNames","in":"query","required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":[],"type":"array","items":{"type":"string"}}}}},{"name":"categoryPaths","in":"query","required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":[],"type":"array","items":{"type":"array","items":{"type":"string"}}}}}},{"name":"ontologyId","in":"query","required":false,"description":"Report on a specific ontology id; defaults to the Schedule C tax ontology","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Report on a specific ontology id; defaults to the Schedule C tax ontology","type":"string"}},{"name":"ontologyKey","in":"query","required":false,"description":"Report on a specific ontology key; defaults to the Schedule C tax ontology","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Report on a specific ontology key; defaults to the Schedule C tax ontology","type":"string"}},{"name":"counterpartyIds","in":"query","required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":[],"type":"array","items":{"type":"string"}}}}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/reports/pnl":{"get":{"operationId":"getPnlReport","summary":"Get P&L report","description":"Get a Schedule C P&L report with revenue, COGS, operating expenses, margins, and category tree.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"startDate","in":"query","required":true,"description":"Start date, YYYY-MM-DD or ISO 8601 datetime (inclusive)","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","description":"Start date, YYYY-MM-DD or ISO 8601 datetime (inclusive)"}},{"name":"endDate","in":"query","required":true,"description":"End date, YYYY-MM-DD or ISO 8601 datetime (inclusive; a date-only value covers that whole day, UTC)","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","description":"End date, YYYY-MM-DD or ISO 8601 datetime (inclusive; a date-only value covers that whole day, UTC)"}},{"name":"dateField","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":"processed_at","type":"string","enum":["authorized_at","processed_at"]}},{"name":"periodGrouping","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":"month","type":"string","enum":["quarter","month","week","day"]}},{"name":"periodLimit","in":"query","required":false,"description":"Max number of newest periods in per-period breakdowns. Totals always cover the whole date range; when basis.truncated is true, raise periodLimit to make period sums reconcile with totals","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":12,"description":"Max number of newest periods in per-period breakdowns. Totals always cover the whole date range; when basis.truncated is true, raise periodLimit to make period sums reconcile with totals","type":"integer","minimum":1,"maximum":9007199254740991}}}},{"name":"categoryNames","in":"query","required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":[],"type":"array","items":{"type":"string"}}}}},{"name":"categoryPaths","in":"query","required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":[],"type":"array","items":{"type":"array","items":{"type":"string"}}}}}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/transactions":{"get":{"operationId":"searchTransactions","summary":"Search transactions","description":"Search transactions by text, date, account, counterparty, category path, signed amount, and attention state.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"query","in":"query","required":false,"description":"Merchant, description, category, or context keywords only. Omit for latest/recent/last N transaction lists.","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Merchant, description, category, or context keywords only. Omit for latest/recent/last N transaction lists.","type":"string"}},{"name":"accountIds","in":"query","required":false,"description":"Filter by account IDs.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Filter by account IDs.","type":"array","items":{"type":"string"}}}}},{"name":"counterpartyId","in":"query","required":false,"description":"Filter by counterparty ID.","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Filter by counterparty ID.","type":"string"}},{"name":"categoryPath","in":"query","required":false,"description":"Filter by structured category path from listCategories.","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Filter by structured category path from listCategories.","type":"string"}},{"name":"dateFrom","in":"query","required":false,"description":"Start date in ISO format. Use only for explicit date periods.","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Start date in ISO format. Use only for explicit date periods.","type":"string"}},{"name":"dateTo","in":"query","required":false,"description":"End date in ISO format. Date-only values are inclusive.","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"End date in ISO format. Date-only values are inclusive.","type":"string"}},{"name":"dateField","in":"query","required":false,"description":"Which transaction date to filter by. Default primary.","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Which transaction date to filter by. Default primary.","type":"string","enum":["primary","authorized","processed"]}},{"name":"amountFrom","in":"query","required":false,"description":"Minimum signed USD amount. Use for income/minimum amount filters. Omit instead of using 0.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Minimum signed USD amount. Use for income/minimum amount filters. Omit instead of using 0.","type":"number"}}}},{"name":"amountTo","in":"query","required":false,"description":"Maximum signed USD amount. Expenses over $500 use -500. Omit instead of using 0.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Maximum signed USD amount. Expenses over $500 use -500. Omit instead of using 0.","type":"number"}}}},{"name":"needsAttention","in":"query","required":false,"description":"Only return transactions needing user attention.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Only return transactions needing user attention.","type":"boolean"}}}},{"name":"limit","in":"query","required":false,"description":"Maximum number of results to return. Default 20, max 50.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Maximum number of results to return. Default 20, max 50.","default":20,"type":"integer","exclusiveMinimum":0,"maximum":50}}}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/counterparties":{"get":{"operationId":"searchCounterparties","summary":"Search vendors and clients","description":"Search counterparties by name, relationship, type, and transaction stats.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"query","in":"query","required":false,"description":"Search counterparties by name and public metadata.","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Search counterparties by name and public metadata.","type":"string"}},{"name":"relationship","in":"query","required":false,"description":"Filter by business relationship, for example investor, payroll, contractor, or client.","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Filter by business relationship, for example investor, payroll, contractor, or client.","type":"string","enum":["client","service","partner","contractor","investor","owner","lifestyle","supplier","utility","landlord","lender","insurer","payment_processor","marketplace","regulator","tax_authority","donation_recipient","payroll","unknown"]}},{"name":"type","in":"query","required":false,"description":"Filter by entity type.","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Filter by entity type.","type":"string","enum":["company","person","government","non-profit","educational","financial","healthcare","religious","charity","association","cooperative","partnership","trust","estate"]}},{"name":"limit","in":"query","required":false,"description":"Maximum number of results to return. Default 20, max 50.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Maximum number of results to return. Default 20, max 50.","default":20,"type":"integer","exclusiveMinimum":0,"maximum":50}}}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/organizations/{organization_id}/counterparties/{counterparty_id}":{"get":{"operationId":"getCounterparty","summary":"Get vendor or client details","description":"Get safe detailed information about a counterparty by ID.","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Jupid-Partner","in":"header","required":false,"description":"Required with a partner embed JWT; omit for MCP OAuth.","schema":{"type":"string"}},{"name":"counterparty_id","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","description":"The counterparty ID to look up."}}],"responses":{"200":{"description":"The shared Jupid operation result, matching its MCP tool.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}},"/auth/partner":{"post":{"operationId":"provisionPartner","summary":"Synchronize a partner user’s complete business access","description":"Use a partner embed JWT with business_id and the complete businesses roster. Omitted businesses revoke this user’s access. Repeating provisioning reuses user, organization and source IDs. This endpoint does not accept MCP OAuth.","parameters":[{"name":"X-Jupid-Partner","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"IDs to use for account and transaction synchronization.","content":{"application/json":{"schema":{"type":"object","required":["user_id","organization_id","source_id","organizations"],"properties":{"user_id":{"type":"string","format":"uuid"},"organization_id":{"type":["string","null"],"format":"uuid"},"source_id":{"type":["string","null"],"format":"uuid"},"organizations":{"type":"array","items":{"type":"object","required":["business_id","organization_id","source_id","role"],"properties":{"business_id":{"type":"string"},"organization_id":{"type":"string","format":"uuid"},"source_id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["owner","member"]}}}}}}}}},"400":{"description":"Operation rejected. The error message is safe to display.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"The authenticated caller cannot access this business or operation.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"413":{"description":"Request body exceeds 1 MiB. Send a smaller batch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"415":{"description":"The request body must use application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"422":{"description":"Invalid input. Correct the request before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Request failed. Retry the same batch with backoff; IDs are stable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}}}}}}}}}}}