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

# Clients

> Create, onboard, and retrieve business clients.

The Clients module registers individuals or companies associated with the authenticated business, starts their Persona onboarding, and retrieves their status.

## Endpoints

| Name          | Method | Path                   |
| ------------- | ------ | ---------------------- |
| Create client | `POST` | `/v2/business-clients` |
| List clients  | `GET`  | `/v2/business-clients` |

Both endpoints require a JWT sent as a Bearer token.

## Create a Client

```http theme={null}
POST /v2/business-clients
```

### Request

| Field     | Type     | Required | Description                              |
| --------- | -------- | -------- | ---------------------------------------- |
| `name`    | `string` | Yes      | Name of the individual or company.       |
| `email`   | `string` | Yes      | Valid client email address.              |
| `type`    | `string` | Yes      | `individual` or `company`.               |
| `country` | `string` | Yes      | Country code between 2 and 4 characters. |

```json theme={null}
{
  "name": "Acme Bolivia",
  "email": "client@example.com",
  "type": "company",
  "country": "BO"
}
```

### Response

```json theme={null}
{
  "clientId": "550e8400-e29b-41d4-a716-446655440000",
  "clientLink": "https://withpersona.com/verify/example"
}
```

`clientLink` is the one-time link the client opens to complete Persona onboarding.

## List Clients

```http theme={null}
GET /v2/business-clients
```

### Response

```json theme={null}
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Acme Bolivia",
    "type": "company",
    "status": "Active",
    "country": "BO",
    "email": "client@example.com",
    "externalClientId": null
  }
]
```

The API currently returns `Pending`, `Onboarding`, `Active`, `Rejected`, and `Suspended` statuses.

`externalClientId` is `null` while the client does not yet have a relationship with the external provider.
