Listar subcontas
curl --request GET \
--url https://api.upag.io/v1/sub-accounts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upag.io/v1/sub-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/sub-accounts';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Subcontas
Listar subcontas
Lista as subcontas da conta titular
GET
https://api.upag.io
/
v1
/
sub-accounts
Listar subcontas
curl --request GET \
--url https://api.upag.io/v1/sub-accounts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upag.io/v1/sub-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/sub-accounts';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Permissão:
sub_account.read (chave secreta).
Endpoint
curl -G https://api.upag.dev/v1/sub-accounts \
-H "Authorization: Bearer sk_test_your_api_key" \
-d "limit=20" \
-d "offset=0"
import { Upag } from 'upag';
const upag = new Upag('sk_test_your_api_key');
const { data, count, limit, offset } = await upag.subAccounts.list({ limit: 20, offset: 0 });
Em produção use
https://api.upag.io/v1 com sk_live_....Parâmetros
integer
default:"20"
Itens por página (1 a 100).
integer
default:"0"
Deslocamento (≥ 0). Diferente dos demais recursos, esta listagem não usa
page.Resposta
200 OK — além de data e count (total), devolve limit e offset aplicados.
Response
{
"data": [
{
"id": "880e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"legalEntity": {
"id": "990e8400-e29b-41d4-a716-446655440000",
"type": "individual",
"status": "under_review",
"documentType": "cpf",
"documentNumber": "39053344705",
"legalName": "João Silva",
"tradingName": "João Silva",
"email": "joao@example.com",
"phone": "5511999998888"
},
"account": {
"id": "880e8400-e29b-41d4-a716-446655440000",
"name": "João Silva",
"status": "pending",
"bankCode": "450",
"branch": null,
"number": null,
"digit": null
},
"createdAt": "2026-03-18T10:00:00.000Z",
"updatedAt": "2026-03-18T10:00:00.000Z"
}
],
"count": 1,
"limit": 20,
"offset": 0
}