Endpoint: POST /hb/accounts/business
Envelope de sucesso (interceptor global):
{
"status_code": 200,
"success": true,
"message": "OK",
"data": {}
}
Envelope de erro (filtro global):
{
"status_code": 400,
"code": "VALIDATION_ERROR",
"message": "Erro de validacao",
"timestamp": "2026-02-13T00:00:00.000Z",
"path": "/exemplo",
"details": []
}
POST /hb/accounts/businessFINTECH, OPERADOR, ADMIN, GERENTEaccount.createPath params
Nao possui.
Query params
Nao possui.
Body
DTO: CreateBusinessAccountDto
| Campo | Tipo | Obrigatorio | Detalhes |
|---|---|---|---|
registerName | string | Sim | - |
cnpj | string | Sim | - |
email | string | Sim | - |
phone_number | string | Sim | - |
phone | PhoneDto | Sim | Objeto esperado: { countryCode: string; number: string } |
address | CustomerAddressDto | Sim | Objeto esperado: { zipCode: string; addressLine: string; buildingNumber: string; neighborhood: string; complement?: string; city: string; state: BrazilianState (enum: AC, AL, AP, AM, BA, CE, ...); country?: string } |
business_data | BusinessCustomerDataDto | Sim | Objeto esperado: { trade_name: string; state_registration_number?: BrazilianState (enum: AC, AL, AP, AM, BA, CE, ...); municipal_registration_number?: string; opening_date: string; responsible_name: string; responsible_cpf: string; responsible_rg?: string; share_capital: number; ... } |
Headers
Authorization: Bearer <jwt>: obrigatorio.curl -X POST "https://api.seudominio.com/hb/accounts/business" \
-H "Accept: application/json" \
-H "Authorization: Bearer SEU_JWT" \
-H "Content-Type: application/json" \
-d '{
"registerName": "string_exemplo",
"cnpj": "12345678000199",
"email": "usuario@empresa.com",
"phone_number": "5511999999999",
"phone": {
"countryCode": "string_exemplo",
"number": "string_exemplo"
},
"address": {
"zipCode": "string_exemplo",
"addressLine": "string_exemplo",
"buildingNumber": "string_exemplo",
"neighborhood": "string_exemplo",
"city": "string_exemplo",
"state": "AC"
},
"business_data": {
"trade_name": "string_exemplo",
"opening_date": "2026-02-13",
"responsible_name": "string_exemplo",
"responsible_cpf": "12345678901",
"share_capital": 1,
"annual_revenue": 1
}
}'
Data (schema)
Nao tipado no retorno do controller. Informe um tipo de retorno para documentar automaticamente.
Sucesso (201):
{
"status_code": 201,
"success": true,
"message": "Created",
"data": "<resultado da operacao>"
}
Erro (contrato padrao):
{
"status_code": 400,
"code": "VALIDATION_ERROR",
"message": "Erro de validacao",
"timestamp": "2026-02-13T00:00:00.000Z",
"path": "/hb/accounts/business",
"details": []
}