> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upag.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Criar subconta

> Abre subconta PF ou PJ em análise e retorna a chave secreta única

A subconta entra em revisão (KYC). Guarde o `apiKey.secret` — ele só é exibido na criação.

## Pessoa física

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.upag.io/v1/sub-accounts \
    -H "Authorization: Bearer sk_test_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "type": "individual",
      "name": "João Silva",
      "email": "joao@example.com",
      "document": { "type": "cpf", "number": "39053344705" },
      "phone": { "countryCode": "55", "areaCode": "11", "number": "999998888" },
      "birthDate": "1990-01-01",
      "motherName": "Maria Silva",
      "publicPerson": false,
      "address": {
        "street": "Rua A",
        "number": "10",
        "complement": null,
        "neighborhood": "Centro",
        "city": "São Paulo",
        "state": "SP",
        "country": "BR",
        "zip": "01001000"
      }
    }'
  ```
</CodeGroup>

## Pessoa jurídica

Envie `type: "company"` com `legalName`, `tradingName`, `legalNature` (`mei`, `ltda`, `sa`), `constitutionDate`, CNPJ, `url`, `statementDescriptor`, `monthlyIncome` (centavos), `activity` e `representatives` (array com sócios/representantes legais, CPF, endereço, `role`, `ownershipPercentage`, `isLegalRepresentative`).

## Parâmetros comuns

<ParamField body="paymentMethodConfigurations" type="array">
  Opcional — tarifas por método de pagamento na subconta.
</ParamField>

## Resposta

`201 Created`

```json Response theme={null}
{
  "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": null,
    "tradingName": null,
    "email": "joao@example.com",
    "phone": { "countryCode": "55", "areaCode": "11", "number": "999998888" }
  },
  "account": {
    "id": "880e8400-e29b-41d4-a716-446655440000",
    "name": "João Silva",
    "status": "pending",
    "bankCode": null,
    "branch": null,
    "number": null,
    "digit": null
  },
  "apiKey": {
    "id": "aa0e8400-e29b-41d4-a716-446655440000",
    "type": "secret",
    "secret": "sk_test_abc123...",
    "description": null,
    "permissions": ["charge.read", "charge.write", "transfer.read", "transfer.write"],
    "createdAt": "2026-03-18T10:00:00.000Z",
    "updatedAt": "2026-03-18T10:00:00.000Z"
  },
  "paymentMethodConfigurations": [],
  "createdAt": "2026-03-18T10:00:00.000Z",
  "updatedAt": "2026-03-18T10:00:00.000Z"
}
```

Guarde `apiKey.secret` — exibido apenas nesta resposta.
