{"openapi":"3.1.0","info":{"title":"Afriex (BYOK) API","version":"0.1.0","description":"Afriex (BYOK) lets an AI assistant read your own Afriex data through the Afriex API with a key you supply (Afriex Business live API key (needs the matching read permissions)). Read-only: 10 tools (get_wallet_balance, get_exchange_rates, list_transactions, get_transaction, quote_withdrawal, list_institutions, list_payment_batches, get_payment_batch, list_batch_sessions,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-afriex.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-afriex/docs"},"termsOfService":"https://connectorbay.com/byok-afriex/terms"},"servers":[{"url":"https://byok-afriex.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-afriex/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_wallet_balance":{"post":{"operationId":"get_wallet_balance","summary":"Get a business wallet's balances as a currency-to-amount map: the payout wallet by default, or the fee or collection wal","description":"Get a business wallet's balances as a currency-to-amount map: the payout wallet by default, or the fee or collection wallet. Use for \"What is my Afriex payout wallet balance in USD and NGN\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"currencies":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated currency codes, for example USD,NGN. All supported currencies when omitted.","title":"Currencies"},"wallet_type":{"anyOf":[{"enum":["DEPOSIT","WITHDRAW","FEE"],"type":"string"},{"type":"null"}],"default":"WITHDRAW","description":"Wallet to read: WITHDRAW (payout, default), DEPOSIT (collection) or FEE.","title":"Wallet Type"}},"title":"get_wallet_balanceArguments","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_exchange_rates":{"post":{"operationId":"get_exchange_rates","summary":"Get current exchange rates between currencies, optionally for one payment channel. Use for \"What is the USD to NGN rate ","description":"Get current exchange rates between currencies, optionally for one payment channel. Use for \"What is the USD to NGN rate on Afriex\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"from_symbols":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated base currencies, for example USD,EUR.","title":"From Symbols"},"to_symbols":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated target currencies, for example NGN,GHS.","title":"To Symbols"},"channel":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Optional payment channel (uppercase) so channel promotions apply, for example BANK_ACCOUNT or MOBILE_MONEY.","title":"Channel"}},"title":"get_exchange_ratesArguments","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 transactions (deposits and withdrawals) with amounts, currencies, channel, status, rate, fee and times, filterable ","description":"List transactions (deposits and withdrawals) with amounts, currencies, channel, status, rate, fee and times, filterable by status, type, channel, currency, reference and date range. Use for \"Which Afriex withdrawals failed this week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Zero-based page number.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items per page (maximum 100).","title":"Limit"},"status":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated statuses to include, for example PENDING,FAILED.","title":"Status"},"type":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated transaction types, for example DEPOSIT,WITHDRAW.","title":"Type"},"channel":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated payment channels, for example BANK_ACCOUNT,MOBILE_MONEY.","title":"Channel"},"currency":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated 3-letter currency codes (source or destination).","title":"Currency"},"reference":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Your own reference set when the transaction was created.","title":"Reference"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only transactions created on or after this ISO 8601 date-time.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only transactions created on or before this ISO 8601 date-time.","title":"To Date"}},"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}},"/v1/tools/get_transaction":{"post":{"operationId":"get_transaction","summary":"Get one transaction by id with amounts, currencies, status, rate, fee and the meta block (narration, failure reason). Us","description":"Get one transaction by id with amounts, currencies, status, rate, fee and the meta block (narration, failure reason). Use for \"What happened to Afriex transaction tx_123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"transaction_id":{"description":"Afriex transaction id.","maxLength":200,"title":"Transaction Id","type":"string"}},"required":["transaction_id"],"title":"get_transactionArguments","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/quote_withdrawal":{"post":{"operationId":"quote_withdrawal","summary":"Price a withdrawal without creating anything: the rate, fee and amounts for a given currency pair and channel. Give eith","description":"Price a withdrawal without creating anything: the rate, fee and amounts for a given currency pair and channel. Give either source_amount or destination_amount. Use for \"How much would it cost to send 100 USD to Nigeria through Afriex\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"source_currency":{"description":"Currency debited from your wallet, for example USD.","maxLength":3,"title":"Source Currency","type":"string"},"destination_currency":{"description":"Currency the recipient receives, for example NGN.","maxLength":3,"title":"Destination Currency","type":"string"},"source_amount":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Amount you send. Use this or destination_amount, not both.","title":"Source Amount"},"destination_amount":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Amount the recipient receives. Use this or source_amount, not both.","title":"Destination Amount"},"destination_channel":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Channel the funds would be sent over, for example BANK_ACCOUNT or MOBILE_MONEY.","title":"Destination Channel"},"destination_country":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Destination ISO 3166-1 alpha-2 country code, needed with destination_channel.","title":"Destination Country"}},"required":["source_currency","destination_currency"],"title":"quote_withdrawalArguments","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_institutions":{"post":{"operationId":"list_institutions","summary":"List banks or mobile money providers Afriex supports in a country, with institution id, name and code. Use for \"Which Ni","description":"List banks or mobile money providers Afriex supports in a country, with institution id, name and code. Use for \"Which Nigerian banks can I pay out to through Afriex\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"channel":{"description":"Channel: BANK_ACCOUNT, SWIFT or MOBILE_MONEY.","enum":["BANK_ACCOUNT","SWIFT","MOBILE_MONEY"],"title":"Channel","type":"string"},"country_code":{"description":"ISO 3166-1 alpha-2 country code, for example NG, GH, KE, ZA, US, GB.","maxLength":2,"title":"Country Code","type":"string"}},"required":["channel","country_code"],"title":"list_institutionsArguments","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_payment_batches":{"post":{"operationId":"list_payment_batches","summary":"List the payment batches of the business (needs a key with the PAYMENT_BATCH.READ permission). Use for \"What Afriex paym","description":"List the payment batches of the business (needs a key with the PAYMENT_BATCH.READ permission). Use for \"What Afriex payment batches do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Zero-based page number.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many items per page (maximum 100).","title":"Limit"}},"title":"list_payment_batchesArguments","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_payment_batch":{"post":{"operationId":"get_payment_batch","summary":"Get one payment batch by id with its name and source payment method channel and currency (needs PAYMENT_BATCH.READ). Use","description":"Get one payment batch by id with its name and source payment method channel and currency (needs PAYMENT_BATCH.READ). Use for \"Show Afriex payment batch batch_1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"batch_id":{"description":"Id of the payment batch.","maxLength":200,"title":"Batch Id","type":"string"}},"required":["batch_id"],"title":"get_payment_batchArguments","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_batch_sessions":{"post":{"operationId":"list_batch_sessions","summary":"List the runs (sessions) of a payment batch with timestamps (needs TRANSACTION.HISTORY.READ). Use for \"When was Afriex b","description":"List the runs (sessions) of a payment batch with timestamps (needs TRANSACTION.HISTORY.READ). Use for \"When was Afriex batch batch_1 last run\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"batch_id":{"description":"Id of the payment batch.","maxLength":200,"title":"Batch Id","type":"string"},"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Zero-based page number.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many items per page (maximum 100).","title":"Limit"}},"required":["batch_id"],"title":"list_batch_sessionsArguments","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_sme_registration_status":{"post":{"operationId":"get_sme_registration_status","summary":"Get the business's SME registration status and review outcome for dedicated virtual accounts (needs COMPLIANCE.KYB.READ)","description":"Get the business's SME registration status and review outcome for dedicated virtual accounts (needs COMPLIANCE.KYB.READ). Use for \"Is my Afriex SME registration approved\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_sme_registration_statusArguments","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}}}}