Skip to main content

Endpoint

POST /partner/v1/customers/business

Request

Headers

NameTypeRequiredDescription
X-API-KeystringYesYour partner API key
Content-TypestringYesapplication/json

Body

{
  "cnpj": "12345678000199",
  "legal_name": "Empresa LTDA",
  "trade_name": "Nome Fantasia",
  "email": "contato@empresa.com",
  "phone": "+5511999999999",
  "address": {
    "street": "Rua Example",
    "number": "123",
    "complement": "Sala 1",
    "neighborhood": "Centro",
    "city": "São Paulo",
    "state": "SP",
    "postal_code": "01234567"
  },
  "owners": [
    {
      "owner_type": "partner",
      "name": "João Silva",
      "social_name": "João",
      "document": "12345678900",
      "email": "joao@empresa.com",
      "phone": "+5511988888888",
      "birth_date": "1990-01-15",
      "nationality_country_code": "BR",
      "tax_residence_country_code": "BR",
      "address": {
        "street": "Rua Residencial",
        "number": "456",
        "complement": "Apto 101",
        "neighborhood": "Jardins",
        "city": "São Paulo",
        "state": "SP",
        "postal_code": "04567890"
      },
      "ownership": {
        "ownership_type": "direct",
        "ownership_bps": 5000
      }
    }
  ],
  "metadata": {
    "external_id": "your_internal_id"
  },
  "config": {
    "auto_send_owner_sms": true,
    "auto_send_owner_email": true
  }
}

Business fields

FieldTypeRequiredDescription
cnpjstringYesBusiness CNPJ (14 digits)
legal_namestringYesLegal company name
trade_namestringNoTrade/brand name
emailstringYesCompany email
phonestringYesCompany phone (E.164 format)
addressobjectYesCompany address
ownersarrayYesList of business owners
metadataobjectNoCustom metadata (JSON)
configobjectNoConfiguration options

Address fields

FieldTypeRequiredDescription
streetstringYesStreet name
numberstringYesStreet number
complementstringNoAddress complement
neighborhoodstringYesNeighborhood
citystringYesCity
statestringYesState (2-letter code)
postal_codestringYesPostal code (CEP)

Owner fields

FieldTypeRequiredDescription
owner_typestringYespartner, representative, or other_partner
namestringYesFull legal name
social_namestringNoSocial/preferred name
documentstringYesCPF (11 digits)
emailstringYesEmail address
phonestringYesPhone (E.164 format)
birth_datestringYesBirth date (YYYY-MM-DD)
nationality_country_codestringYesNationality (ISO 3166-1 alpha-2)
tax_residence_country_codestringYesTax residence country
addressobjectYesOwner’s address
ownershipobjectYesOwnership details

Ownership fields

FieldTypeRequiredDescription
ownership_typestringYesdirect or indirect
ownership_bpsintegerYesOwnership percentage in basis points (5000 = 50%)

Response

Success (201 Created)

{
  "id": "cus_abc123xyz"
}

Validation errors (400 Bad Request)

{
  "error": "invalid_cnpj",
  "message": "The provided CNPJ is invalid"
}
{
  "error": "invalid_phone",
  "message": "The provided phone number is invalid"
}
{
  "error": "invalid_owner",
  "message": "Invalid CPF for owner"
}

Example

curl -X POST https://api.bipa.tech/partner/v1/customers/business \
  -H "X-API-Key: your_partner_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "cnpj": "12345678000199",
    "legal_name": "Empresa LTDA",
    "email": "contato@empresa.com",
    "phone": "+5511999999999",
    "address": {
      "street": "Rua Example",
      "number": "123",
      "neighborhood": "Centro",
      "city": "São Paulo",
      "state": "SP",
      "postal_code": "01234567"
    },
    "owners": [
      {
        "owner_type": "partner",
        "name": "João Silva",
        "document": "12345678900",
        "email": "joao@empresa.com",
        "phone": "+5511988888888",
        "birth_date": "1990-01-15",
        "nationality_country_code": "BR",
        "tax_residence_country_code": "BR",
        "address": {
          "street": "Rua Residencial",
          "number": "456",
          "neighborhood": "Jardins",
          "city": "São Paulo",
          "state": "SP",
          "postal_code": "04567890"
        },
        "ownership": {
          "ownership_type": "direct",
          "ownership_bps": 10000
        }
      }
    ]
  }'