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

# Account Opening Request

> API for creating onboarding requests for corporate account (legal entities). To successfully create a corporate account, you must provide at least one administrator and one legal representative.

## Allowed Roles

| Role | Required |
| - | - |
| administrator | ✓ |
| legal\_representative | ✓ |
| financial | ✗ |
| commercial | ✗ |
| compliance | ✗ |

## Request Body

**legal\_name** `string` *required*

Official registered name of the company as it appears in legal documents.

* Min: 1 character
* Max: 150 characters
* Example: `Company X LTDA`

**trade\_name** `string` *required*

Common or commercial name used by the company in business operations.

* Min: 1 character
* Max: 150 characters
* Example: `Company X`

**tax\_id** `string` *required*

Company's tax identification number (CNPJ for Brazilian companies), without formatting.

* If country = BR: exactly 14 characters (valid CNPJ), in either format issued by the Receita Federal:
  * **numeric** — 14 digits, e.g. `12345678000199`;
  * **alphanumeric** (issued since July 2026) — letters and digits in the first 12 positions, the 2 check digits always numeric, e.g. `12ABC34501DE35`.
* If country ≠ BR: max 50 characters
* Letters are normalized to upper case, and the mask separators (`.`, `/` and `-`) are removed before validation — so `12.abc.345/01de-35` is stored as `12ABC34501DE35`. The expected format is still the unformatted one.
* Must be **unique per parent** — a parent cannot have two solicitations with the same `tax_id`, compared on the normalized value.
* Example: `12345678000199`

**website** `string` *required*

Company's website.

* Max: 255 characters
* Accepted as free text: the API checks only the length, not the URL format.
* Example: `https://www.companyx.com`

**parent\_id** `integer`

Identifier of the **merchant** (level 1 in the account hierarchy) the solicitation will be created under. When omitted, your own company is used as the parent — which must itself be a merchant. A master/holding account (level 0) has no implicit merchant and **must** provide a `parent_id`.

The `parent_id` must belong to your accessible companies and be a merchant; otherwise the request fails with `422`.

* Example: `1024`

**contacts** `array[object]` *required*

List of individuals associated with the company, such as administrators, legal representatives, or other relevant roles.

**Contact Object**

**name** `string` *required*

Full name of the contact person.

* Min: 1 character
* Max: 120 characters
* Example: `João Silva`

**email** `string` *required*

Contact's professional email address.

* Max: 100 characters
* Example: `joao.silva@companyx.com`

**phone** `string` *required*

Contact's phone number, including country and area code.

* Max: 15 characters
* Example: `5511999999999`

**role** `string` *required*

Role of the contact person within the company. Must be one of the allowed roles.

* Allowed values: `administrator`, `legal_representative`, `financial`, `commercial`, `compliance`
* Example: `administrator`

**tax\_id** `string` *required*

Personal tax identification number of the contact (CPF for Brazil), without formatting.

* If country = BR: max 11 characters (valid CPF)
* If country ≠ BR: max 30 characters
* Example: `12345678909`

**address** `object` *required*

Company's main business address.

**Address Object**

**city** `string` *required*

City where the company is located.

* Max: 40 characters
* Example: `São Paulo`

**state** `string` *required*

State or province where the company is located (ISO code preferred).

* Max: 4 characters
* Example: `SP`

**country** `string` *required*

Country code where the company is registered (ISO 3166-1 alpha-2 format).

* Max: 4 characters
* Example: `BR`

**zip\_code** `string` *required*

Postal code of the company address, without formatting.

* Max: 12 characters
* Example: `01001000`

**street** `string` *required*

Street name of the company address.

* Max: 80 characters
* Example: `Av. Paulista`

**number** `string`

Street number of the company address.

* Max: 10 characters
* Example: `1000`

**complement** `string`

Additional address details, such as suite, floor, or unit.

* Max: 80 characters
* Example: `Conjunto 12`

**segment** `object`

Optional business segment to associate with the company at creation time. When omitted, the company is created without a segment.

**Segment Object**

**id** `integer`

Unique identifier of the segment. Must reference an existing segment, otherwise the request fails with `422 Unprocessable Entity`.

* Example: `7`

> [!TIP]
>
> To obtain a valid `segment.id`, call the [List Segments](https://docs.wepayout.co/api-reference/account/segments/list-segments.md) endpoint (`GET /v2/register/segments`) and use the `id` of the desired segment. You can also fetch a single segment with `GET /v2/register/segments?id={id}` to confirm it exists before sending it.

## Response

> [!NOTE]
>
> On a `422`, `fields` maps each rejected field to its messages. The key is the path of the field in
> the payload you sent — `tax_id`, `address.city`, `contacts.0.email` — so you can show the message
> next to the input that caused it. Messages follow the language of the authenticated user.

**id** `string`

Unique identifier of the corporate subaccount opening request.

* Format: UUID
* Example: `339074a8-1834-49c5-af94-4a044248d88d`

**status** `string`

Current status of the onboarding request.

* Default: `pending`

```json 201 Created theme={null}
{
  "id": "339074a8-1834-49c5-af94-4a044248d88d",
  "status": "pending"
}
```

```json 422 Unprocessable Entity theme={null}
{
  "error_code": "validation",
  "error_description": "Validation error",
  "fields": {
    "legal_name": ["The legal name field is required."],
    "tax_id": ["The tax id must be a valid CNPJ."],
    "contacts.0.email": ["The contact e-mail field must be a valid email address."]
  }
}
```

## Related Resources

> [card] [Setup Webhook](https://docs.wepayout.co/api-reference/account/webhook/webhook-setup.md)
>
> Configure webhook notifications for onboarding events

> [card] [Update Webhook](https://docs.wepayout.co/api-reference/account/webhook/webhook-update.md)
>
> Update existing webhook configuration

> [card] [List Segments](https://docs.wepayout.co/api-reference/account/segments/list-segments.md)
>
> Retrieve segment IDs to associate with a company


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.