### Example API Access Token format Source: https://docs.rho.co/docs/v1/auth Tokens are generated with the rhobat_ prefix. ```text rhobat_4f9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f ``` -------------------------------- ### GET /accounts Source: https://docs.rho.co/api/v1/openapi/accounts/listaccounts Returns a paginated list of accounts for the authenticated business. ```APIDOC ## GET /accounts ### Description Returns a paginated list of accounts for the authenticated business. ### Method GET ### Endpoint /accounts ### Parameters #### Query Parameters - **sort_by** (string) - Optional - Sort field - **order** (string) - Optional - Sort direction - **page_size** (integer) - Optional - Number of accounts per page; max 100 - **page_token** (string) - Optional - Opaque cursor returned as next_page_token in the previous response ### Response #### Success Response (200) - **accounts** (array) - List of accounts - **accounts.id** (string) - Global account identifier - **accounts.account_type** (string) - Enum: "checking", "credit", "investment", "savings", "rewards" - **accounts.balance** (object) - Current balance in account currency - **accounts.balance.amount** (integer) - Minor units (e.g. cents for USD) - **accounts.balance.currency** (string) - ISO 4217 currency code (e.g. USD) - **accounts.account_number_last_4** (string) - Last 4 digits of account number - **accounts.routing_number_last_4** (string) - Last 4 digits of routing number - **accounts.account_name** (string) - Account name - **page** (object) - Pagination metadata - **page.next_page_token** (string) - Pass as page_token to fetch the next page; null on the last page ``` -------------------------------- ### Paginated Response Structure Source: https://docs.rho.co/docs/v1/pagination Example of a JSON response containing a resource array and a page object with the next_page_token. ```json { "transactions": [ { "id": "…", "amount": { "amount": 1299, "currency": "USD" }, "…": "…" }, { "id": "…", "amount": { "amount": 4500, "currency": "USD" }, "…": "…" } ], "page": { "next_page_token": "eyJvIjoxMDAsImQiOiIyMDI2LTA1LTE0In0" } } ``` -------------------------------- ### GET /accounts/{account_id} Source: https://docs.rho.co/api/v1/openapi/accounts/getaccount Retrieves a single account by its identifier. ```APIDOC ## GET /accounts/{account_id} ### Description Returns a single account by its identifier. ### Method GET ### Endpoint /accounts/{account_id} ### Parameters #### Path Parameters - **account_id** (string) - Required - Global account identifier ### Response #### Success Response (200) - **id** (string) - Global account identifier - **account_type** (string) - Enum: "checking", "credit", "investment", "savings", "rewards" - **balance** (object) - Current balance in account currency - **balance.amount** (integer) - Minor units (e.g. cents for USD) - **balance.currency** (string) - ISO 4217 currency code (e.g. USD) - **account_number_last_4** (string) - Optional - **routing_number_last_4** (string) - Optional - **account_name** (string) - Optional ``` -------------------------------- ### GET /statements Source: https://docs.rho.co/api/v1/openapi/statements Returns a paginated list of finalized statements for the authenticated business, ordered by newest close date first. ```APIDOC ## GET /statements ### Description Returns a paginated list of finalized statements for the authenticated business, newest close date first. Spans all statement types and all accounts in one aggregated surface. ### Method GET ### Endpoint /statements ``` -------------------------------- ### GET /oauth2/auth Source: https://docs.rho.co/docs/v1/partner-auth Redirects the customer to the Rho authorization server to initiate the OAuth 2.0 flow. ```APIDOC ## GET https://auth.rho.co/oauth2/auth ### Description Redirect the customer's browser to the Rho authorization URL to begin the consent process. ### Method GET ### Endpoint https://auth.rho.co/oauth2/auth ### Parameters #### Query Parameters - **response_type** (string) - Required - Must be 'code'. - **client_id** (string) - Required - The client ID issued during onboarding. - **redirect_uri** (string) - Required - Must exactly match a registered redirect URI. - **scope** (string) - Required - Space-separated subset of your registered scopes. - **state** (string) - Required - An opaque value your app verifies on the redirect back. - **code_challenge** (string) - Required - PKCE challenge. - **code_challenge_method** (string) - Required - Must be 'S256'. - **audience** (string) - Required - The Rho API audience: 'https://rhoapi.rho.co'. ``` -------------------------------- ### GET /statements/{id} Source: https://docs.rho.co/api/v1/openapi/statements Returns a single statement by its global identifier. ```APIDOC ## GET /statements/{id} ### Description Returns a single statement by its global identifier. ### Method GET ### Endpoint /statements/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The global identifier of the statement. ``` -------------------------------- ### GET /transactions/{id} Source: https://docs.rho.co/api/v1/openapi/transactions Retrieves the details of a single transaction using its global identifier. ```APIDOC ## GET /transactions/{id} ### Description Returns a single transaction by its global identifier. ### Method GET ### Endpoint /transactions/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The global identifier of the transaction. ``` -------------------------------- ### GET /api/v1/transactions/{transaction_id}/files/{file_id} Source: https://docs.rho.co/docs/v1/transactions Retrieves a fresh, short-lived signed URL for a specific transaction attachment. ```APIDOC ## GET /api/v1/transactions/{transaction_id}/files/{file_id} ### Description Request a fresh, short-lived URL for a transaction attachment. Transaction responses contain stable metadata but not signed URLs, so this endpoint should be called when the file is needed. ### Method GET ### Endpoint https://rhoapi.rho.co/api/v1/transactions/{transaction_id}/files/{file_id} ### Parameters #### Path Parameters - **transaction_id** (string) - Required - The unique identifier for the transaction. - **file_id** (string) - Required - The unique identifier for the file from the attachments list. ### Response #### Success Response (200) - **file_id** (string) - The unique identifier of the file. - **file_name** (string) - The name of the file. - **download_url** (string) - The short-lived signed URL for downloading the file. ``` -------------------------------- ### GET /transactions/{transaction_id}/files/{file_id} Source: https://docs.rho.co/api/v1/openapi/transactions/gettransactionfile Retrieves file metadata and a fresh, short-lived signed download URL for a specific transaction attachment. ```APIDOC ## GET /transactions/{transaction_id}/files/{file_id} ### Description Returns file metadata and a fresh, short-lived signed download URL. ### Method GET ### Endpoint /transactions/{transaction_id}/files/{file_id} ### Parameters #### Path Parameters - **transaction_id** (string) - Required - Transaction identifier returned in the transaction id field - **file_id** (string) - Required - Stable identifier from transaction.attachments[].file_id ### Response #### Success Response (200) - **file_id** (string) - Stable attachment identifier - **file_name** (string) - Original file name - **download_url** (string) - Fresh, short-lived signed download URL #### Error Responses (400, 401, 403, 404, 500, 503) - **type** (string) - A URI reference that identifies the problem type. - **title** (string) - A short, human-readable summary of the problem type. - **status** (integer) - The HTTP status code. - **detail** (string) - A human-readable explanation specific to this occurrence of the problem. ``` -------------------------------- ### GET /transactions Source: https://docs.rho.co/api/v1/openapi/transactions Retrieves a paginated list of transactions with support for filtering by account, type, status, date range, and search text. ```APIDOC ## GET /transactions ### Description Returns a paginated list of transactions. ### Method GET ### Endpoint /transactions ``` -------------------------------- ### GET /api/v1/transactions Source: https://docs.rho.co/docs/v1/transactions Retrieve a list of transactions with support for filtering by status, date range, transaction type, user, and card. ```APIDOC ## GET /api/v1/transactions ### Description Retrieve a list of transactions. This endpoint supports pagination and various filters to narrow down results by date, status, user, or transaction type. ### Method GET ### Endpoint https://rhoapi.rho.co/api/v1/transactions ### Parameters #### Query Parameters - **status** (string) - Optional - Filter by transaction status (e.g., 'settled') - **posted_after** (string) - Optional - Filter transactions posted after this timestamp (ISO 8601) - **posted_before** (string) - Optional - Filter transactions posted before this timestamp (ISO 8601) - **page_size** (integer) - Optional - Number of results per page - **transaction_type** (string) - Optional - Filter by type (e.g., 'card_refund', 'card_credit', 'card_debit') - **account_type** (string) - Optional - Filter by account type (e.g., 'credit') - **user_id** (string) - Optional - Filter by user UUID - **card_id** (string) - Optional - Filter by card ID ``` -------------------------------- ### Perform a minimal API request Source: https://docs.rho.co/docs/v1/getting-started Use this command to fetch account data from the production environment using your API token. ```bash curl https://rhoapi.rho.co/api/v1/accounts \ -H "Authorization: Bearer $RHO_API_TOKEN" ``` -------------------------------- ### Paginate with cURL Source: https://docs.rho.co/docs/v1/pagination Demonstrates fetching the first page and using the next_page_token for subsequent requests. ```bash # First page curl "https://rhoapi.rho.co/api/v1/transactions?page_size=100" \ -H "Authorization: Bearer $RHO_API_TOKEN" # Subsequent page - pass the next_page_token from the previous response curl "https://rhoapi.rho.co/api/v1/transactions?page_size=100&page_token=eyJvIjoxMDAsImQiOiIyMDI2LTA1LTE0In0" \ -H "Authorization: Bearer $RHO_API_TOKEN" ``` -------------------------------- ### Perform a request in the sandbox environment Source: https://docs.rho.co/docs/v1/getting-started Use the sandbox endpoint to test integrations with fictional data. Any non-empty bearer token is accepted. ```bash curl https://rhoapi-sandbox.rho.co/api/v1/accounts \ -H "Authorization: Bearer sandbox" ``` -------------------------------- ### Authenticate sandbox requests Source: https://docs.rho.co/docs/v1/auth Sandbox environments accept any non-empty bearer token for testing purposes. ```bash curl https://rhoapi-sandbox.rho.co/api/v1/transactions \ -H "Authorization: Bearer sandbox" ``` -------------------------------- ### Authentication error response format Source: https://docs.rho.co/docs/v1/auth Failures return an application/problem+json document detailing the error. ```json { "type": "about:blank", "title": "Unauthorized", "status": 401, "detail": "Token is revoked or has expired" } ``` -------------------------------- ### Sandbox Server URL Source: https://docs.rho.co/api/v1/openapi The base URL for sandbox testing environment requests. ```text https://rhoapi-sandbox.rho.co/api/v1 ``` -------------------------------- ### Iterate Through Pages in Python Source: https://docs.rho.co/docs/v1/pagination A loop pattern to fetch all pages by updating the page_token until it returns null. ```python import os import requests def list_all_transactions(account_id: str): token = os.environ["RHO_API_TOKEN"] page_token = None while True: params = {"account_id": account_id, "page_size": 100} if page_token is not None: params["page_token"] = page_token resp = requests.get( "https://rhoapi.rho.co/api/v1/transactions", params=params, headers={"Authorization": f"Bearer {token}"}, timeout=30, ) resp.raise_for_status() body = resp.json() yield from body["transactions"] page_token = body["page"]["next_page_token"] if page_token is None: return ``` -------------------------------- ### Redirect to Rho Authorization URL Source: https://docs.rho.co/docs/v1/partner-auth Initiate the OAuth flow by redirecting the user to the Rho authorization server with required PKCE parameters. ```bash GET https://auth.rho.co/oauth2/auth? response_type=code& client_id=& redirect_uri=& scope=accounts:read%20transactions:read%20offline_access& state=& code_challenge=& code_challenge_method=S256& audience=https%3A%2F%2Frhoapi.rho.co ``` -------------------------------- ### Download Transaction Attachment Source: https://docs.rho.co/docs/v1/transactions Retrieves a fresh, short-lived signed URL for a transaction attachment. Do not persist the returned URL as it is intended for immediate use. ```bash curl "https://rhoapi.rho.co/api/v1/transactions/{transaction_id}/files/{file_id}" \ -H "Authorization: Bearer $RHO_API_TOKEN" ``` -------------------------------- ### Retrieve account list via cURL Source: https://docs.rho.co/docs/v1/accounts Fetches a paginated list of accounts using the Rho API. Ensure the RHO_API_TOKEN environment variable is set before execution. ```bash curl 'https://rhoapi.rho.co/api/v1/accounts?page_size=100' \ -H "Authorization: Bearer $RHO_API_TOKEN" ``` -------------------------------- ### Production Server URL Source: https://docs.rho.co/api/v1/openapi The base URL for production API requests. ```text https://rhoapi.rho.co/api/v1 ``` -------------------------------- ### Receive Authorization Code Source: https://docs.rho.co/docs/v1/partner-auth The callback URL structure received at your redirect URI after user approval. ```text https://yourapp.example.com/callback?code=&state= ``` -------------------------------- ### Add Rho API MCP server to Claude Code Source: https://docs.rho.co/docs/v1/mcp Use this command to register the Rho API MCP server with the Claude Code CLI, providing the required authorization header. ```sh claude mcp add --scope project --transport http rho-api \ https://rhoapi.rho.co/mcp/v1 \ --header "Authorization: Bearer " ``` -------------------------------- ### Reconcile daily transactions via cURL Source: https://docs.rho.co/docs/v1/transactions Use the transactions endpoint with status and date filters to retrieve settled activity for a specific accounting day. ```bash curl 'https://rhoapi.rho.co/api/v1/transactions?status=settled&posted_after=2026-05-21T00:00:00Z&posted_before=2026-05-22T00:00:00Z&page_size=100' \ -H "Authorization: Bearer $RHO_API_TOKEN" ``` -------------------------------- ### Retrieve a single statement by ID Source: https://docs.rho.co/docs/v1/statements Fetch details for a specific statement, useful for refreshing an expired PDF download URL. ```bash curl 'https://rhoapi.rho.co/api/v1/statements/{id}' \ -H "Authorization: Bearer $RHO_API_TOKEN" ``` -------------------------------- ### List statements for a specific period Source: https://docs.rho.co/docs/v1/statements Retrieve a list of statements within a defined date range using query parameters. ```bash curl 'https://rhoapi.rho.co/api/v1/statements?period_end_after=2026-05-01&period_end_before=2026-06-01&page_size=100' \ -H "Authorization: Bearer $RHO_API_TOKEN" ``` -------------------------------- ### Token Response Format Source: https://docs.rho.co/docs/v1/partner-auth The JSON response containing the access token and refresh token. ```json { "access_token": "", "token_type": "bearer", "expires_in": 900, "refresh_token": "", "scope": "accounts:read transactions:read offline_access" } ``` -------------------------------- ### Authenticate requests with HTTP and cURL Source: https://docs.rho.co/docs/v1/auth Use the Authorization header with the Bearer scheme for all API requests. ```http GET /api/v1/transactions HTTP/1.1 Host: rhoapi.rho.co Authorization: Bearer rhobat_4f9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f Accept: application/json ``` ```bash curl https://rhoapi.rho.co/api/v1/transactions \ -H "Authorization: Bearer $RHO_API_TOKEN" ``` -------------------------------- ### Call Rho API Source: https://docs.rho.co/docs/v1/partner-auth Use the access token in the Authorization header to make authenticated requests to the Rho API. ```bash curl https://rhoapi.rho.co/api/v1/transactions \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` -------------------------------- ### POST /oauth2/token Source: https://docs.rho.co/docs/v1/partner-auth Exchanges an authorization code or a refresh token for a new set of access and refresh tokens. ```APIDOC ## POST /oauth2/token ### Description Exchange an authorization code for tokens, or use a refresh token to obtain a new access token. ### Method POST ### Endpoint https://auth.rho.co/oauth2/token ### Parameters #### Request Body - **grant_type** (string) - Required - 'authorization_code' or 'refresh_token'. - **code** (string) - Optional - Required when grant_type is 'authorization_code'. - **redirect_uri** (string) - Optional - Required when grant_type is 'authorization_code'. - **code_verifier** (string) - Optional - Required when grant_type is 'authorization_code'. - **refresh_token** (string) - Optional - Required when grant_type is 'refresh_token'. ### Response #### Success Response (200) - **access_token** (string) - The bearer access token. - **token_type** (string) - The type of token (bearer). - **expires_in** (integer) - Expiration time in seconds. - **refresh_token** (string) - The new refresh token. - **scope** (string) - The granted scopes. ``` -------------------------------- ### Refresh Access Token Source: https://docs.rho.co/docs/v1/partner-auth Use a valid refresh token to obtain a new access token when the current one expires. ```http POST /oauth2/token HTTP/1.1 Host: auth.rho.co Content-Type: application/x-www-form-urlencoded grant_type=refresh_token& refresh_token= ``` -------------------------------- ### Attribute card spend by employee via cURL Source: https://docs.rho.co/docs/v1/transactions Filter card debit activity by user_id to isolate spending per employee. The user_id parameter supports multiple values in a single request. ```bash curl 'https://rhoapi.rho.co/api/v1/transactions?user_id=&transaction_type=card_debit&posted_after=2026-01-01T00:00:00Z&page_size=100' \ -H "Authorization: Bearer $RHO_API_TOKEN" ``` -------------------------------- ### Exchange Authorization Code for Tokens Source: https://docs.rho.co/docs/v1/partner-auth Exchange the authorization code for an access token and optional refresh token using the token endpoint. ```http POST /oauth2/token HTTP/1.1 Host: auth.rho.co Content-Type: application/x-www-form-urlencoded Authorization: Basic grant_type=authorization_code& code=& redirect_uri=& code_verifier= ``` -------------------------------- ### Authentication via Authorization Header Source: https://docs.rho.co/docs/v1/auth All API requests must include an Authorization header with a Bearer token. The token must be a valid API Access Token generated in the Rho banking settings. ```APIDOC ## Authentication ### Description Authenticate requests to the Rho API by providing an API Access Token in the Authorization header using the Bearer scheme. ### Method N/A (Global Header) ### Parameters #### Headers - **Authorization** (string) - Required - The string "Bearer " followed by your API Access Token (e.g., "Bearer rhobat_..."). ### Request Example GET /api/v1/transactions HTTP/1.1 Host: rhoapi.rho.co Authorization: Bearer rhobat_4f9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f Accept: application/json ``` -------------------------------- ### POST /oauth2/revoke Source: https://docs.rho.co/docs/v1/partner-auth Revokes an access or refresh token associated with the client application. ```APIDOC ## POST /oauth2/revoke ### Description Revokes an access or refresh token, effectively ending the session for the client application. ### Method POST ### Endpoint /oauth2/revoke ### Request Body - **token** (string) - Required - The access or refresh token to be revoked. - **client_id** (string) - Required - Your application's client ID. - **client_secret** (string) - Required - Your application's client secret. ### Request Example POST /oauth2/revoke HTTP/1.1 Host: auth.rho.co Content-Type: application/x-www-form-urlencoded token=& client_id=& client_secret= ``` -------------------------------- ### Revoke OAuth2 Token via HTTP Source: https://docs.rho.co/docs/v1/partner-auth Use this request to revoke an access or refresh token. Requires the client ID and secret for authentication. ```http POST /oauth2/revoke HTTP/1.1 Host: auth.rho.co Content-Type: application/x-www-form-urlencoded token=& client_id=& client_secret= ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.