> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://en.docs.api.corpx.com/baas/referencia/accounts/list-tenant-accounts/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.docs.api.corpx.com/_mcp/server. # List the accounts enabled for the tenant GET https://tenant.api.corpx.com/v1/tenant/accounts Returns the accounts of the tenant in `X-Tenant-Id`, one page at a time, each with its status. Use it to discover `accountId` before calling account routes. The status is the one recorded for the account (`active`, `blocked`, `suspended`, `closed`, `pending`, `integrating`, `failed`), including `closed`; filter with `status` when you only want one. `page` starts at 1. `size` defaults to 50 and is capped at 100: a larger value is not an error, the page comes back with `size: 100`. Pages are ordered by creation time, newest first, and stay stable between calls. Requires the `read` scope. A credential restricted to specific accounts only sees those accounts, and `total` counts only them. The response does not include balances. Reference: https://en.docs.api.corpx.com/baas/referencia/accounts/list-tenant-accounts ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Query parameters - `page` (integer, optional, default: 1) — 1-based page number. `page=1` is the first page. A missing or smaller value is treated as 1. - `size` (integer, optional, default: 50) — Page size, up to 100. Values above 100 are capped at 100. Missing or smaller than 1 falls back to 50. - `status` (enum, optional) — When set, only accounts in this status. Omitted returns every status, including `closed`. - Allowed values: `active`, `blocked`, `suspended`, `closed`, `pending`, `integrating`, `failed` ### Headers - `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing. ## Response ### 200 One page of the tenant's accounts. - `tenantId` (string, required) — Tenant from `X-Tenant-Id`. - `items` (list of TenantAccount, required) — Accounts on this page, newest first. - `total` (integer, required) — Accounts matching the filter, across every page. Respects a credential restricted to specific accounts. - `page` (integer, required) — 1-based page number that was returned. - `size` (integer, required) — Page size that was applied, after the cap of 100. ## Errors ### 400 Bad Request Error `X-Tenant-Id` missing. - `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values. - `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change. - `docs` (string, optional) — Link to this code in the public error catalogue. - `requestId` (string, optional) — Gateway request id. Quote it when contacting support. - `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context. - `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only. ### 401 Unauthorized Error Authentication failed or token missing. - `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values. - `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change. - `docs` (string, optional) — Link to this code in the public error catalogue. - `requestId` (string, optional) — Gateway request id. Quote it when contacting support. - `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context. - `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only. ### 403 Forbidden Error The credential lacks the `read` scope, or the token is not bound to this tenant. - `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values. - `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change. - `docs` (string, optional) — Link to this code in the public error catalogue. - `requestId` (string, optional) — Gateway request id. Quote it when contacting support. - `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context. - `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only. ### 422 Unprocessable Entity Error `status` is not one of the account statuses. - `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values. - `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change. - `docs` (string, optional) — Link to this code in the public error catalogue. - `requestId` (string, optional) — Gateway request id. Quote it when contacting support. - `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context. - `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only. ### 500 Internal Server Error Unexpected server error. - `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values. - `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change. - `docs` (string, optional) — Link to this code in the public error catalogue. - `requestId` (string, optional) — Gateway request id. Quote it when contacting support. - `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context. - `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only. ## Types ### TenantAccount An account of the tenant. Status is the local record, not a live read of the settlement bank, and there is no balance. - `accountId` (string, required) — Account id to use on `/v1/accounts/{accountId}/...`. - `tenantId` (string, required) — Tenant that owns the account. - `partnerAccountId` (string, required) — Account id at the settlement bank. - `document` (string, required) — Holder CPF or CNPJ, digits only. - `holderName` (string, required) — Holder name. - `status` (enum, required) — Account status. - Allowed values: `active`, `blocked`, `suspended`, `closed`, `pending`, `integrating`, `failed` - `statusSource` (string, required, nullable) — Who last changed the status, when recorded. `null` when there is no source. - `accountNumber` (string, required, nullable) — Local account number override. `null` when it was not set; the bank account route resolves the number live. - `createdAt` (datetime, required) — When the account was recorded. - `updatedAt` (datetime, required) — When the account record was last updated. ### ErrorResponsePartner Raw error from the settlement bank, when the failure came from it. Diagnostic only. - `code` (string, optional) - `message` (string, optional) - `field` (string, optional) — Field the partner pointed at, when any. ## Examples **Response** ```json { "tenantId": "tn_7f3a9c", "items": [ { "accountId": "acc_01HZX", "tenantId": "tn_7f3a9c", "partnerAccountId": "123456", "document": "39053344705", "holderName": "Ana Souza", "status": "active", "statusSource": null, "accountNumber": "12345-6", "createdAt": "2026-10-01T15:04:05Z", "updatedAt": "2026-10-06T12:00:00Z" }, { "accountId": "acc_01HZY", "tenantId": "tn_7f3a9c", "partnerAccountId": "654321", "document": "39053344705", "holderName": "Ana Souza", "status": "closed", "statusSource": null, "accountNumber": null, "createdAt": "2026-08-01T15:04:05Z", "updatedAt": "2026-09-01T15:04:05Z" } ], "total": 2, "page": 1, "size": 50 } ``` **SDK Code** ```python Accounts_listTenantAccounts_example import requests url = "https://tenant.api.corpx.com/v1/tenant/accounts" headers = { "X-Tenant-Id": "X-Tenant-Id", "Authorization": "Bearer " } response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript Accounts_listTenantAccounts_example const url = 'https://tenant.api.corpx.com/v1/tenant/accounts'; const options = { method: 'GET', headers: {'X-Tenant-Id': 'X-Tenant-Id', Authorization: 'Bearer '} }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Accounts_listTenantAccounts_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://tenant.api.corpx.com/v1/tenant/accounts" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-Tenant-Id", "X-Tenant-Id") req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Accounts_listTenantAccounts_example require 'uri' require 'net/http' url = URI("https://tenant.api.corpx.com/v1/tenant/accounts") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-Tenant-Id"] = 'X-Tenant-Id' request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java Accounts_listTenantAccounts_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://tenant.api.corpx.com/v1/tenant/accounts") .header("X-Tenant-Id", "X-Tenant-Id") .header("Authorization", "Bearer ") .asString(); ``` ```php Accounts_listTenantAccounts_example request('GET', 'https://tenant.api.corpx.com/v1/tenant/accounts', [ 'headers' => [ 'Authorization' => 'Bearer ', 'X-Tenant-Id' => 'X-Tenant-Id', ], ]); echo $response->getBody(); ``` ```csharp Accounts_listTenantAccounts_example using RestSharp; var client = new RestClient("https://tenant.api.corpx.com/v1/tenant/accounts"); var request = new RestRequest(Method.GET); request.AddHeader("X-Tenant-Id", "X-Tenant-Id"); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift Accounts_listTenantAccounts_example import Foundation let headers = [ "X-Tenant-Id": "X-Tenant-Id", "Authorization": "Bearer " ] let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/tenant/accounts")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```