API Reference
Extratos

Get a statement (v2)

GET/extratos/v2/conta-corrente/agencia/{agencia}/conta/{conta}
Base URL: https://bb.mimicr.dev · provider: https://api.hm.bb.com.br

Returns the checking account statement with the sub-history, ISPB and unique id of each entry (version 2, ready for the alphanumeric CNPJ). Requires the extrato-info scope.

At BB, v2 lives on the dedicated host https://extratos.mtls.api.hm.bb.com.br/v2/conta-corrente/... (homologação, with mTLS). Mimicr serves the same resource at https://bb.mimicr.dev/extratos/v2/conta-corrente/... and at https://extratos.bb.mimicr.dev/v2/conta-corrente/..., without mTLS.

Date rules: both dates or none (without dates, the last 30 days); a period of up to 31 days counted inclusively; end date up to today; start date up to 5 years back. If the account is wrong or has no entries in the period, it returns HTTP 404.

Balances come as lines of the statement itself: codigoHistorico 0 with Saldo Anterior (first line, dated the last day with movement before the period) and Saldo do dia (after the last entry of each day with movement), and codigoHistorico 999 with S A L D O (closing balance of the period). When the period reaches today, the statement ends with the current balance (SA) and available balance (SD) lines. Balance lines count in quantidadeTotalRegistro and in paging.

Business errors use the Modelo Resposta {code, message, variaveisMonitoradas} with the HTTP status of BB's error table (400 or 403).

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Headers

x-br-com-bb-ipa-mcitestestring

MCI of a test account, used only in homologação: 26968930 (branch 551, account 5087), 178961031 (1505/1348) or 704950857 (452/123873). Not needed for your sandbox's own account. In Mimicr, the test accounts answer 403 6646500 without this header; since they have no movements, they answer 404.

Example: "178961031"

Path parameters

agenciainteger<int32>required

Branch number, without check digit. Omit leading zeros (e.g. 0297 >> 297).

Example: 1505
containteger<int32>required

Checking account number, without check digit and without leading zeros.

Example: 1348

Query parameters

gw-dev-app-keystringrequired

Application key (developer_application_key) from the Developer Portal. In homologação, the homologação app key.

Example: "<app-key>"
numeroPaginaSolicitacaointeger<int32>

Requested page number. Defaults to page 1. A page past the last one answers 404.

quantidadeRegistroPaginaSolicitacaointeger<int32>

Records per page. Maximum page size: 120 records. Minimum: 50 records. Keep the page size of the first page request on the following pages. In Mimicr, out-of-range values are clamped to the limit.

dataInicioSolicitacaointeger<int32>

Start date as DDMMYYYY, without leading zeros (e.g. 1092026). It can go back at most 5 years from today. Without both dates, the statement of the last 30 days is returned. If the start date is sent, the end date is required.

Example: 19102026
dataFimSolicitacaointeger<int32>

End date as DDMMYYYY, without leading zeros. It cannot be after today. The period between start and end date is at most 31 days. If the end date is sent, the start date is required.

Example: 23102026

Responses

200Account statement (up to 120 entries per page).
numeroPaginaAtualinteger<int32>required

Current page number.

Example: 1
quantidadeRegistroPaginaAtualinteger<int32>required

Number of records in the current page.

Example: 18
numeroPaginaAnteriorinteger<int32>required

Previous page number. Zero when the current page is page 1.

Example: 0
numeroPaginaProximointeger<int32>required

Next page number. Zero when the current page is the last page of the statement.

Example: 0
quantidadeTotalPaginainteger<int32>required

Total number of pages of the statement.

Example: 1
quantidadeTotalRegistrointeger<int32>required

Total number of entries in the statement, balance lines included.

Example: 18
listaLancamentoobject[]required

Entries of the page (at most 120).

Show child attributes
indicadorTipoLancamentostring

Entry type: 1 posted entry, 2 future entry, 3 processing. The trailing balance lines use SA current balance, RA automatic redemption, LE extra card limit used, AP provisioned balance, SD available balance, LC contracted limit, LU used limit and LD available limit. In Mimicr, entries are always 1 and the trailing lines are SA and SD.

Example: "1"
dataLancamentointeger<int64>

Entry date as DDMMYYYY, without the day's leading zero (September 1, 2026 is 1092026).

Example: 23102026
dataMovimentointeger<int64>

Returned for entries with a retroactive date, as DDMMYYYY. 0 when absent.

Example: 0
codigoAgenciaOrigeminteger<int32>

Branch where the entry originated. 0 for centralized entries (Pix received, balances).

Example: 3301
numeroLoteinteger<int32>

Identifier of the system the entry came from.

Example: 13105
numeroDocumentointeger<int64>

Entry identifier number. Not unique: balances and fees may come with 0 or repeated.

Example: 102302
codigoHistoricointeger<int32>

Code of the entry's category at Banco do Brasil (histórico). 0 and 999 are balance lines. In Mimicr: 821 Pix received, 144 Pix or transfer sent, 393 TED, 624 boleto collection credit, 109 boleto payment, 61 tax payment, 976 returned TED.

Example: 821
codigoSubHistoricointeger<int32>

Sub-history code of the entry (e.g. 25001 Pix received, 25000 Pix sent). 0 on balance lines.

Example: 25001
textoDescricaoSubHistoricostring

Description of the entry's sub-history; when there is none, the history text (up to 25 characters).

Example: "Pix - Recebido"
valorLancamentonumber<double>

Amount of the entry in Reais (BRL), with two decimals. Always positive: the sign is in indicadorSinalLancamento.

Example: 90
indicadorSinalLancamentostring

Sign of the amount in valorLancamento: C credit, D debit (in v2, * marks a blocked amount).

CD*
Example: "C"
textoInformacaoComplementarstring

Complementary information about the entry (up to 38 characters, cut at the limit). For Pix: DD/MM HH:MM <document> <name>.

Example: "23/10 01:57 93492239293 VICTOR LOPES D"
numeroCadastroPessoaFisicaCadastroNacPessoasJuridicasContrapartidastring

Counterparty CPF or CNPJ, as text (ready for the alphanumeric CNPJ).

Example: "93492239293"
indicadorTipoPessoaContrapartidastring

Counterparty person type: F individual, J company.

Example: "F"
codigoBancoContrapartidainteger<int32>

COMPE code of the counterparty's bank.

Example: 1
codigoAgenciaContrapartidainteger<int32>

Counterparty branch.

Example: 0
numeroContaContrapartidastring

Counterparty account.

Example: ""
textoDigitoVerificadorContaContrapartidastring

Check digit of the counterparty account.

Example: ""
numeroISPBinteger<int32>

ISPB of the counterparty's institution. In Mimicr, always 0.

Example: 0
textoIdentificadorUnicoTransacaostring

Unique id of the entry. BB001 + branch and account + date YYYYMMDD + origin + lote + sequence + document + histórico + sub-histórico (64 chars) for entries of previous days; BB002 + date + online sequence (26 chars) for same-day entries. Empty on balance lines. It is not the Pix EndToEndId.

Example: "BB002202610236727509787753"
codigoConfederacaoNacionalBancosinteger | null<int32>

CNAB code of the entry. BB does not fill it yet: it comes as null.

textoCampoIndeterminadostring

Undetermined field.

Example: ""
400A date rule was broken: 5746385, 5738445, 5738481, 5738678 or 6668872.
codestringrequired

Error code (e.g. 5738445). Empty on 404.

Example: "5738445"
messagestringrequired

Error message.

Example: "A data final informada é superior a data atual. Refaça a requisição ajustando a data."
variaveisMonitoradasobject[]

Monitored variables; empty in Mimicr.

401Missing, invalid or expired token.
statusCodeinteger

HTTP status.

Example: 403
errorstring

Status text.

Example: "Forbidden"
messagestring

Gateway message.

Example: "Application key is not allowed to call this resource method"
attributesobject

Present on 401: {"error": "Bad Credentials"}.

Show child attributes
errorstring

Reason.

403App key missing or invalid (the v2 gateway's detail/userHelp body), token without the extrato-info scope (Application key is not allowed to call this resource method) or an account that does not belong to the application (6646500).
ErroGatewayV2
detailstring

Message.

Example: "A chave de aplicacao (AppKey) nao foi informada"
userHelpstring

Guidance.

Example: "A chave de aplicacao deve ser informada como parametro de consulta (query parameter gw-dev-app-key)"
errorCodestring

Code.

Example: "403"
bbMsgobject

Message category.

Show child attributes
categoriastring

Category.

Example: "SISTEMA"
tipostring

Type.

Example: "ERRO"
ErroGateway
statusCodeinteger

HTTP status.

Example: 403
errorstring

Status text.

Example: "Forbidden"
messagestring

Gateway message.

Example: "Application key is not allowed to call this resource method"
attributesobject

Present on 401: {"error": "Bad Credentials"}.

Show child attributes
errorstring

Reason.

ErroV2
codestringrequired

Error code (e.g. 5738445). Empty on 404.

Example: "5738445"
messagestringrequired

Error message.

Example: "A data final informada é superior a data atual. Refaça a requisição ajustando a data."
variaveisMonitoradasobject[]

Monitored variables; empty in Mimicr.

404Account with no entries in the period, or a page past the last one.
codestringrequired

Error code (e.g. 5738445). Empty on 404.

Example: "5738445"
messagestringrequired

Error message.

Example: "A data final informada é superior a data atual. Refaça a requisição ajustando a data."
variaveisMonitoradasobject[]

Monitored variables; empty in Mimicr.

500System error.
codestringrequired

Error code (e.g. 5738445). Empty on 404.

Example: "5738445"
messagestringrequired

Error message.

Example: "A data final informada é superior a data atual. Refaça a requisição ajustando a data."
variaveisMonitoradasobject[]

Monitored variables; empty in Mimicr.