Skip to navigation

BaaS quick start

Welcome to the CorpX BaaS API documentation. This guide is for the tenant / bank that received a CorpX-issued credential. Calls go to https://tenant.api.corpx.com, without request signing.

If the credential came from internet banking, leave this page: Internet banking quick start.

1. Obtaining Credentials

To start integrating, you will need access credentials. Contact our support team to receive:

  • Client ID
  • Client Secret
  • X-Tenant-Id (Your Tenant identifier)

2. Authentication

Our API uses OAuth2 with the client_credentials flow. You must request an access token to make API calls.

Endpoints

EnvironmentToken endpointAPI base
Productionhttps://auth.api.corpx.com/oauth2/tokenhttps://tenant.api.corpx.com

Token Request Example (Bash/cURL)

curl -X POST "https://auth.api.corpx.com/oauth2/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-u "$CLIENT_ID:$CLIENT_SECRET" \
-d "grant_type=client_credentials&scope=api2/read+api2/write"

The response includes an access_token valid for 5 minutes (expires_in: 300).

Reuse the token. Do not request a token per call.

The same access_token is valid for every call until it expires. Reusing it is mandatory: minting a new token on every request exhausts Cognito, slows your integration down, and can get token issuance refused.

Cache the token on your side and only call /oauth2/token again when about 60 seconds remain on expires_in — or when the API answers 403 for an expired token. Details in the authentication guide.

3. Finding the accounts

accountId is not part of the credential. List the tenant’s accounts — each one comes with its status — and use that accountId on the calls that follow. The credential needs the read scope. Pages start at 1 and hold at most 100 accounts.

curl -X GET "https://tenant.api.corpx.com/v1/tenant/accounts?page=1&size=50" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-Id: YOUR_TENANT_ID"

To find the accounts of a CPF or CNPJ (one document can have more than one):

curl -G "https://tenant.api.corpx.com/v1/tenant/accounts/search" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-Id: YOUR_TENANT_ID" \
--data-urlencode "document=123.456.789-00"

4. Making Your First Call

With the accountId from the list, check the balance, for example.

curl -X GET "https://tenant.api.corpx.com/v1/accounts/ACCOUNT_ID/balance" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-Id: YOUR_TENANT_ID"

5. Next Steps

  • Explore the BaaS tenant guide for details on required headers and idempotency.
  • Check the API Reference to see all available endpoints.
  • Check the Webhooks guide to receive real-time notifications.
  • Use the Transaction Timeline to display the full lifecycle of any transaction inside your application.

6. Documentation for agents and LLMs

Read Which documentation? first — there are two audiences and two hosts. Filter the OpenAPI by x-audience.


Need help? Reach out through your private Slack channel (request access during onboarding) or send an email to api@corpx.com.