> For the complete documentation index, see [llms.txt](https://docs.insurehero.io/shield-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.insurehero.io/shield-api/policies/user-management.md).

# User management

## Endpoints

<table><thead><tr><th width="107">Method</th><th>Endpoint</th></tr></thead><tbody><tr><td><mark style="color:green;">POST</mark></td><td><a href="#create-opt"><code>https://app.insurehero.io/api/shield/v1/users/:userId/otp</code></a></td></tr><tr><td><mark style="color:green;">POST</mark></td><td><a href="#check-otp"><code>https://app.insurehero.io/api/shield/v1/users/:userId/verify-otp</code></a></td></tr><tr><td><mark style="color:green;">PATCH</mark></td><td><a href="#register-a-user"><code>https://app.insurehero.io/api/shield/v1/users/:userId?searchBy=email</code></a></td></tr><tr><td><mark style="color:green;">POST</mark></td><td><a href="#create-opt-1"><code>https://app.insurehero.io/api/shield/v1/users/:userId/otp</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-all-the-users"><code>https://app.insurehero.io/api/shield/v1/users</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-a-specific-user"><code>https://app.insurehero.io/api/shield/v1/users/:userId</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-a-specific-user"><code>https://app.insurehero.io/api/shield/v1/users/by-email/:userEmail</code></a></td></tr><tr><td><mark style="color:green;">POST</mark></td><td><a href="#create-new-group-in-a-channel"><code>https://app.insurehero.io/api/shield/v1/groups</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-all-the-groups"><code>https://app.insurehero.io/api/shield/v1/groups</code></a></td></tr><tr><td><mark style="color:blue;">GET</mark></td><td><a href="#get-a-specific-group"><code>https://app.insurehero.io/api/shield/v1/groups/:groupId</code></a></td></tr><tr><td><mark style="color:green;">POST</mark></td><td><a href="#register-a-user-without-otp"><code>https://app.insurehero.io/api/shield/v1/users</code></a></td></tr></tbody></table>

All error responses use the `{ "error": string, "details": any }` envelope. The examples on this page show the most common cases for each endpoint; see [Error Handling](https://docs.insurehero.io/shield-api/data-dictionary#error-handling) for the general format, including unexpected internal errors, which return `422` with an `event_id` you can share with support.

## Step-by-Step Workflow: Sign-up

To create a user using the Shield API, the first step is to use the endpoint for sending an OTP to the email/phone. It is mandatory to include the `searchBy` query parameter with the value `email` (the OTP is sent by email) or `phone` (the OTP is sent via WhatsApp). If no user exists in your channel with that email or phone, a pre-registered user is created.

Important! Due to limitations of the WhatsApp API, if you want to use this OTP, you must keep in mind that the user must have previously spoken to the InsureHero number in order to receive the message.

{% hint style="info" %}
**OTP rules**

* The OTP is a 6-digit code, valid for 15 minutes.
* Each new request replaces the previous code and resets the verification attempts.
* A user can request up to 10 OTPs within 60 minutes. Further requests return `422` with `details` `"OTP request limit exceeded"` and no code is sent.
* Each code allows 3 verification attempts. After the third failed attempt the code is invalidated (even the correct code returns `Invalid OTP`) and a new OTP must be requested.
  {% endhint %}

### Create OPT

<mark style="color:green;">`POST`</mark> `https://app.insurehero.io/api/shield/v1/users/:userId/otp`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Query Parameters

<table><thead><tr><th width="256">Name</th><th width="201">Type</th><th>Description</th></tr></thead><tbody><tr><td>searchBy<mark style="color:red;">*</mark></td><td>email or phone<mark style="color:red;">*</mark></td><td>Field used to find the user, or to create a pre-registered user if none exists. <code>email</code> sends the OTP by email; <code>phone</code> sends it via WhatsApp.</td></tr></tbody></table>

#### Path Parameters

| Name                                       | Type   | Description    |
| ------------------------------------------ | ------ | -------------- |
| `userId`<mark style="color:red;">\*</mark> | string | Email or phone |

#### Example Response

{% tabs %}
{% tab title="200: OK OTP sent by email" %}

```json
{
    "data": {
        "message": "Success! OTP sent to the user mail"
    }
}
```

{% endtab %}

{% tab title="200: OK OTP sent via WhatsApp" %}

```json
{
    "data": {
        "message": "Success! OTP sent via WhatsApp and user created"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "Invalid access token"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity OTP request limit exceeded" %}

```json
{
    "error": "Internal validation failed",
    "details": "OTP request limit exceeded"
}
```

{% endtab %}
{% endtabs %}

When `searchBy=phone` and the user already exists, the message is `"Success! OTP sent via WhatsApp"`. If the WhatsApp message cannot be sent, the endpoint returns `422` with `details` `"Failed to send OTP via WhatsApp"`.

#### Attributes

<table><thead><tr><th width="141">Name</th><th width="112">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>Object containing the response details.</td></tr><tr><td>message</td><td>string</td><td>Confirmation message indicating that the OTP has been sent successfully to the user's email or via WhatsApp.</td></tr></tbody></table>

### Check OTP

Once the OTP is received, you must verify it to confirm the ownership of the email or phone. The response includes a user token, but a pre-registered user still needs to be registered (next step) before making a claim.

<mark style="color:green;">`POST`</mark> `https://app.insurehero.io/api/shield/v1/users/:userId/verify-otp`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Query Parameters

<table><thead><tr><th width="256">Name</th><th width="241">Type</th><th>Description</th></tr></thead><tbody><tr><td>searchBy<mark style="color:red;">*</mark></td><td>email or phone<mark style="color:red;">*</mark></td><td>Field used to find the user. Use the same value you used to request the OTP. Emails are matched exactly, so send them in lowercase.</td></tr></tbody></table>

#### Path Parameters

| Name                                       | Type   | Description    |
| ------------------------------------------ | ------ | -------------- |
| `userId`<mark style="color:red;">\*</mark> | string | Email or phone |

#### Request Body

| Name                                    | Type   | Description                    |
| --------------------------------------- | ------ | ------------------------------ |
| `otp`<mark style="color:red;">\*</mark> | string | The OTP generated for the user |

#### Example Response

{% tabs %}
{% tab title="200: OK" %}

```json
{
    "data": {
        "message": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOi...",
        "additionalData": "This user needs to be registered before making a claim."
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Invalid OTP" %}

```json
{
    "data": {
        "message": "Invalid OTP"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request OTP has expired" %}

```json
{
    "data": {
        "message": "OTP has expired"
    }
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "Invalid access token"
}
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```json
{
    "error": "Resource not found",
    "details": "User not found"
}
```

{% endtab %}
{% endtabs %}

`Invalid OTP` is returned when the code is wrong, when there is no active code, or after 3 failed attempts. `additionalData` is only included when the user has not been registered yet (no `first_name`). If the user has neither email nor phone, the endpoint returns `400` with `details` `"User without email or phone"`.

### Register a user

Once the user is pre-registered with the previous steps, you can register them. This endpoint enables the creation of a user within the channel. These users are then designated as authorized claimants in the risk item, and the relationship is established based on email. If the user doesn't exist at the time of being added as an authorized claimant, there's no issue. Utilizing this endpoint automatically establishes the relationship via email.

<mark style="color:green;">`PATCH`</mark> `https://app.insurehero.io/api/shield/v1/users/:userId?searchBy=email`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Query Parameters

<table><thead><tr><th width="256">Name</th><th width="241">Type</th><th>Description</th></tr></thead><tbody><tr><td>searchBy</td><td>email | id | uid | phone</td><td>Field used to find the user to update. Default to "id". In the sign-up flow, use <code>email</code> (or <code>phone</code> if the OTP was sent via WhatsApp).</td></tr></tbody></table>

#### Path Parameters

<table><thead><tr><th>Name</th><th width="264">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>userId</code><mark style="color:red;">*</mark></td><td>string</td><td>Either user_id, uid, phone or email, according to <code>searchBy</code></td></tr></tbody></table>

#### Request Body

<table><thead><tr><th width="246">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>first_name<mark style="color:red;">*</mark></td><td>string</td><td>User's first name.</td></tr><tr><td>last_name<mark style="color:red;">*</mark></td><td>string</td><td>User's last name.</td></tr><tr><td>phone</td><td>string</td><td>User's phone number (Must be unique).</td></tr><tr><td>email</td><td>string</td><td>User's email (Must be unique).</td></tr><tr><td>gender</td><td>string</td><td>MALE | FEMALE.</td></tr><tr><td>dob</td><td>string</td><td>User's date of birth.</td></tr><tr><td>address</td><td>json</td><td>The user's address information.</td></tr><tr><td>document_type</td><td>string</td><td>The type of document can be: PASSPORT, RUC, CI and CURP.</td></tr><tr><td>document_number</td><td>string</td><td>The user's document number.</td></tr><tr><td>bank_accounts</td><td>BankAccountType[]</td><td>User bank accounts.</td></tr><tr><td>company_name</td><td>string</td><td>User company name.</td></tr><tr><td>company_role</td><td>string</td><td>User company role.</td></tr><tr><td>company_email</td><td>string</td><td>User company email.</td></tr><tr><td>company_identifier</td><td>CompanyIdentifierType</td><td>User company identifier.</td></tr><tr><td>company_address</td><td>json</td><td>The user's company address information.</td></tr><tr><td>company_bank_accounts</td><td>BankAccountType[]</td><td>The object fields are the same fields as bank_accounts.</td></tr><tr><td>uid<mark style="color:red;">*</mark></td><td>string</td><td>Additional user's unique identifier in your system. You will be able to use it to search for a user later. Required key; send <code>null</code> if you do not use it.</td></tr><tr><td>group_id</td><td>string</td><td>The id of the group a user should belong to.</td></tr><tr><td>metadata</td><td>object</td><td>Additional data to include in the user record.</td></tr></tbody></table>

#### Example Response

{% tabs %}
{% tab title="200: OK Updated successfully" %}

```json
{
    "data": {
        "id": "c4b53bc9-3cc6-501a-9d54-dbd25584d725",
        "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
        "email": "maria.lopez@example.com",
        "first_name": "Maria",
        "last_name": "Lopez",
        "phone": "+593991234501",
        "uid": "USR-0001",
        "gender": "FEMALE",
        "dob": "1990-05-10T00:00:00+00:00",
        "address": "Av. 9 de Octubre 100, Guayaquil",
        "document_type": "CI",
        "document_number": "1700000001",
        "bank_accounts": [
            {
                "account_name": "Maria Lopez",
                "bank_name": "Example Bank",
                "account_number": "1234567891",
                "bic_swift": "EXBKECEG",
                "iban": "EC00EXBK0000001234567891",
                "routing_number": "011000015",
                "country": "EC",
                "currency": "US Dollar",
                "account_type": "Checking",
                "bank_address": "Av. 9 de Octubre 100, Guayaquil",
                "additional_info": "Branch: Main"
            }
        ],
        "company_name": "Andes Logistics S.A.",
        "company_role": "Founder",
        "company_email": "operations@example.com",
        "company_identifier": {
            "type": "RUC",
            "value": "1790000001001"
        },
        "company_address": "Av. 9 de Octubre 100, Guayaquil",
        "company_bank_accounts": [
            {
                "account_name": "Andes Logistics S.A.",
                "bank_name": "Example Bank",
                "account_number": "1234567890",
                "bic_swift": "EXBKECEG",
                "iban": "EC00EXBK0000001234567890",
                "routing_number": "011000015",
                "country": "EC",
                "currency": "US Dollar",
                "account_type": "Savings",
                "bank_address": "Av. 9 de Octubre 100, Guayaquil",
                "additional_info": "Branch: Main"
            }
        ],
        "group_id": "2ceb1648-18b8-5d01-b614-8d697d282632",
        "metadata": {}
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "Invalid access token"
}
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```json
{
    "error": "Resource not found",
    "details": "User not found"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "issues": [
            {
                "code": "invalid_type",
                "expected": "string",
                "received": "undefined",
                "path": ["body", "first_name"],
                "message": "Required"
            }
        ],
        "name": "ZodError"
    }
}
```

{% endtab %}
{% endtabs %}

If `group_id` does not belong to a group of your channel, or a bank account `country` or `currency` cannot be resolved, the endpoint returns `404`. A duplicated email, phone or `uid` returns `422` with the database error, for example `{ "code": "P0001", "message": "User emails must be unique", "details": null, "hint": null }`.

Additional attributes

<table><thead><tr><th width="210">Name</th><th width="117">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>Main container that holds all user information.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier of the user.</td></tr><tr><td>channel_id</td><td>string</td><td>Identifier of the channel.</td></tr><tr><td>account_name</td><td>string</td><td>Name of the bank account holder.</td></tr><tr><td>bank_name</td><td>string</td><td>Name of the bank.</td></tr><tr><td>account_number</td><td>string</td><td>Bank account number.</td></tr><tr><td>bic_swift</td><td>string</td><td>SWIFT or BIC code of the bank.</td></tr><tr><td>iban</td><td>string</td><td>IBAN (International Bank Account Number).</td></tr><tr><td>routing_number</td><td>string</td><td>Routing number for the bank.</td></tr><tr><td>country</td><td>string</td><td>Country where the bank account is held (ISO code).</td></tr><tr><td>currency</td><td>string</td><td>Currency type for the bank account (currency name).</td></tr><tr><td>account_type</td><td>string</td><td>Type of bank account.</td></tr><tr><td>bank_address</td><td>string</td><td>Address of the bank branch.</td></tr><tr><td>additional_info</td><td>string</td><td>Any additional information regarding the bank account.</td></tr><tr><td>type</td><td>string</td><td>Type of company identifier.</td></tr><tr><td>value</td><td>string</td><td>The actual identifier value.</td></tr></tbody></table>

## Step-by-Step Workflow: Sign-in

### Create OPT

Once you already have the user registered, you can send the OTP by id, uid, email or phone of it. With `phone`, the OTP is sent via WhatsApp; otherwise it is sent to the user's email. The [OTP rules](#step-by-step-workflow-sign-up) described above apply.

<mark style="color:green;">`POST`</mark> `https://app.insurehero.io/api/shield/v1/users/:userId/otp`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Query Parameters

<table><thead><tr><th width="256">Name</th><th width="201">Type</th><th>Description</th></tr></thead><tbody><tr><td>searchBy</td><td>email | id | uid | phone</td><td>Field use to search for a matching user. Default to "id"</td></tr></tbody></table>

#### Path Parameters

| Name                                       | Type   | Description                          |
| ------------------------------------------ | ------ | ------------------------------------ |
| `userId`<mark style="color:red;">\*</mark> | string | Either user\_id, uid, phone or email |

#### Example Response

{% tabs %}
{% tab title="200: OK OTP sent by email" %}

```json
{
    "data": {
        "message": "Success! OTP sent to the user mail"
    }
}
```

{% endtab %}

{% tab title="200: OK OTP sent via WhatsApp" %}

```json
{
    "data": {
        "message": "Success! OTP sent via WhatsApp"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "Invalid access token"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity OTP request limit exceeded" %}

```json
{
    "error": "Internal validation failed",
    "details": "OTP request limit exceeded"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Invalid id" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "22P02",
        "details": null,
        "hint": null,
        "message": "invalid input syntax for type uuid: \"abc\""
    }
}
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```json
{
    "error": "Resource not found",
    "details": "User not found"
}
```

{% endtab %}
{% endtabs %}

The `404` is returned with `searchBy=uid` when no user matches. With `searchBy=id`, a user that does not exist returns `422` with the database error `PGRST116`. With `searchBy=email` or `searchBy=phone`, a user that does not exist is created as pre-registered, as in the sign-up flow.

#### Attributes

<table><thead><tr><th width="129">Name</th><th width="201">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>Object containing the response details.</td></tr><tr><td>message</td><td>string</td><td>Confirmation message indicating the OTP was successfully sent to the user’s email or via WhatsApp.</td></tr></tbody></table>

### Check OTP

Once the OTP is received, it must be validated to verify the ownership of the email or phone. After registration, it can be sent via email, phone, ID, or UID. The response will include a user token, which you must use as a header with the key `User-Authorization`.

The user token is valid for 1 hour. It is only accepted in the `User-Authorization` header when creating claims (`POST /v1/claims`, `POST /v2/claims`) and in claim workflow steps. It is not an access token: sending it as `Authorization: Bearer` on any endpoint returns `401`.

<mark style="color:green;">`POST`</mark> `https://app.insurehero.io/api/shield/v1/users/:userId/verify-otp`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Query Parameters

<table><thead><tr><th width="256">Name</th><th width="182">Type</th><th>Description</th></tr></thead><tbody><tr><td>searchBy</td><td>email | id | uid | phone</td><td>Field use to search for a matching user. Default to "id". Emails are matched exactly, so send them in lowercase.</td></tr></tbody></table>

#### Path Parameters

| Name                                       | Type   | Description                          |
| ------------------------------------------ | ------ | ------------------------------------ |
| `userId`<mark style="color:red;">\*</mark> | string | Either user\_id, uid, phone or email |

#### Request Body

| Name                                    | Type   | Description                    |
| --------------------------------------- | ------ | ------------------------------ |
| `otp`<mark style="color:red;">\*</mark> | string | The OTP generated for the user |

#### Example Response

{% tabs %}
{% tab title="200: OK" %}

```json
{
    "data": {
        "message": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOi..."
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Invalid OTP" %}

```json
{
    "data": {
        "message": "Invalid OTP"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request OTP has expired" %}

```json
{
    "data": {
        "message": "OTP has expired"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request User without email or phone" %}

```json
{
    "error": "Request contains malformed data",
    "details": "User without email or phone"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "Invalid access token"
}
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```json
{
    "error": "Resource not found",
    "details": "User not found"
}
```

{% endtab %}
{% endtabs %}

`Invalid OTP` is returned when the code is wrong, when there is no active code, or after 3 failed attempts; in the last case, request a new OTP.

#### Attributes

<table><thead><tr><th width="138">Name</th><th width="117">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>Object containing the validation result.</td></tr><tr><td>message</td><td>string</td><td>A user token returned after successful OTP validation, valid for 1 hour. This token must be used in the request header as <code>User-Authorization.</code></td></tr><tr><td>additionalData</td><td>string</td><td>Only present when the user has not been registered yet: <code>This user needs to be registered before making a claim.</code></td></tr></tbody></table>

## Users

### Get all the users

Get a list of all available users in your channel

<mark style="color:blue;">`GET`</mark> `https://app.insurehero.io/api/shield/v1/users`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Query Parameters

| Name                                   | Type   | Description                                                            |
| -------------------------------------- | ------ | ---------------------------------------------------------------------- |
| from<mark style="color:red;">\*</mark> | number | Starting record index                                                  |
| to<mark style="color:red;">\*</mark>   | number | Ending record index. Must be greater than `from`, at most `from + 100` |

{% tabs %}
{% tab title="200: OK Retrieved successfully" %}

```json
{
  "data": [
    {
      "id": "54a53a26-c3d7-51d1-9adf-80473e69fc35",
      "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
      "email": "diego.herrera@example.com",
      "first_name": "Diego",
      "last_name": "Herrera",
      "phone": "+593991234508",
      "uid": null,
      "gender": null,
      "dob": null,
      "address": null,
      "document_type": null,
      "document_number": null,
      "bank_accounts": null,
      "company_name": null,
      "company_role": null,
      "company_email": null,
      "company_identifier": null,
      "company_address": null,
      "company_bank_accounts": null,
      "group_id": null,
      "metadata": {"cool": true}
    }
  ]
}
```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "Invalid access token"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "issues": [
            {
                "code": "custom",
                "message": "Invalid range, range cannot exceed 100 records. Update either to or from.",
                "path": []
            }
        ],
        "name": "ZodError"
    }
}
```

{% endtab %}
{% endtabs %}

#### Attributes

<table><thead><tr><th width="242">Name</th><th width="127">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>Main container that holds all user information.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier of the user.</td></tr><tr><td>channel_id</td><td>uuid</td><td>Identifier of the channel.</td></tr><tr><td>email</td><td>string</td><td>Email of user.</td></tr><tr><td>first_name</td><td>string</td><td>User's first name.</td></tr><tr><td>last_name</td><td>string</td><td>User's last name.</td></tr><tr><td>phone</td><td>string</td><td>User's phone number (Must be unique).</td></tr><tr><td>uid</td><td>string</td><td>Additional user's unique identifier in your system.</td></tr><tr><td>gender</td><td>string</td><td>MALE | FEMALE.</td></tr><tr><td>dob</td><td>string</td><td>User's date of birth.</td></tr><tr><td>address</td><td>string</td><td>The user's address information.</td></tr><tr><td>document_type</td><td>string</td><td>The type of document can be: PASSPORT, RUC, CI and CURP.</td></tr><tr><td>document_number</td><td>string</td><td>The user's document number.</td></tr><tr><td>bank_accounts</td><td>string</td><td>User bank accounts.</td></tr><tr><td>company_name</td><td>string</td><td>User company name.</td></tr><tr><td>company_role</td><td>string</td><td>User company role.</td></tr><tr><td>company_email</td><td>string</td><td>User company email.</td></tr><tr><td>company_identifier</td><td>string</td><td>User company identifier.</td></tr><tr><td>company_address</td><td>string</td><td>The user's company address information.</td></tr><tr><td>company_bank_accounts</td><td>string</td><td>The object fields are the same fields as bank_accounts.</td></tr><tr><td>group_id</td><td>uuid</td><td>The id of the group;</td></tr><tr><td>metadata</td><td>object</td><td>Additional data to include in the user record.</td></tr></tbody></table>

### Get a specific user

You can get a user using its id, uid, email, phone or document number.

<mark style="color:blue;">`GET`</mark> `https://app.insurehero.io/api/shield/v1/users/:userId`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Path Parameters

<table><thead><tr><th>Name</th><th width="212">Type</th><th>Description</th></tr></thead><tbody><tr><td>userId<mark style="color:red;">*</mark></td><td>string</td><td>Either user_id, uid, email, phone or document number, according to <code>searchBy</code></td></tr></tbody></table>

#### Query Parameters

<table><thead><tr><th width="256">Name</th><th width="201">Type</th><th>Description</th></tr></thead><tbody><tr><td>searchBy</td><td>id | uid | email | phone | document_number</td><td>Field use to search for a matching user. Default to 'id'</td></tr></tbody></table>

Or using its email.

<mark style="color:blue;">`GET`</mark> `https://app.insurehero.io/api/shield/v1/users/by-email/:userEmail`

#### Path Parameters

| Name                                        | Type   | Description    |
| ------------------------------------------- | ------ | -------------- |
| userEmail<mark style="color:red;">\*</mark> | string | The user email |

#### Example Response

{% tabs %}
{% tab title="200: OK Retrieved successfully" %}

```json
{
    "data": {
        "id": "c4b53bc9-3cc6-501a-9d54-dbd25584d725",
        "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
        "email": "maria.lopez@example.com",
        "first_name": "Maria",
        "last_name": "Lopez",
        "phone": "+593991234501",
        "uid": "USR-0001",
        "gender": "FEMALE",
        "dob": "1990-05-10T00:00:00+00:00",
        "address": "Av. 9 de Octubre 100, Guayaquil",
        "document_type": "CI",
        "document_number": "1700000001",
        "bank_accounts": [
            {
                "account_name": "Maria Lopez",
                "bank_name": "Example Bank",
                "account_number": "1234567891",
                "bic_swift": "EXBKECEG",
                "iban": "EC00EXBK0000001234567891",
                "routing_number": "011000015",
                "country": "0e9178ee-6453-53dc-984b-65bf02c016c2",
                "currency": "70c94a4a-6764-5590-b1cf-e13e352c8f93",
                "account_type": "Checking",
                "bank_address": "Av. 9 de Octubre 100, Guayaquil",
                "additional_info": "Branch: Main"
            }
        ],
        "company_name": "Andes Logistics S.A.",
        "company_role": "Founder",
        "company_email": "operations@example.com",
        "company_identifier": {
            "type": "RUC",
            "value": "1790000001001"
        },
        "company_address": "Av. 9 de Octubre 100, Guayaquil",
        "company_bank_accounts": [
            {
                "account_name": "Andes Logistics S.A.",
                "bank_name": "Example Bank",
                "account_number": "1234567890",
                "bic_swift": "EXBKECEG",
                "iban": "EC00EXBK0000001234567890",
                "routing_number": "011000015",
                "country": "0e9178ee-6453-53dc-984b-65bf02c016c2",
                "currency": "70c94a4a-6764-5590-b1cf-e13e352c8f93",
                "account_type": "Savings",
                "bank_address": "Av. 9 de Octubre 100, Guayaquil",
                "additional_info": "Branch: Main"
            }
        ],
        "group_id": "2ceb1648-18b8-5d01-b614-8d697d282632",
        "metadata": {}
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "Invalid access token"
}
```

{% endtab %}

{% tab title="404: Not Found User not found" %}

```json
{
    "error": "Resource not found",
    "details": "User not found"
}
```

{% endtab %}
{% endtabs %}

#### Attributes

<table><thead><tr><th width="210">Name</th><th width="117">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>Main container that holds all user information.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier of the user.</td></tr><tr><td>channel_id</td><td>string</td><td>Identifier of the channel.</td></tr><tr><td>account_name</td><td>string</td><td>Name of the bank account holder.</td></tr><tr><td>bank_name</td><td>string</td><td>Name of the bank.</td></tr><tr><td>account_number</td><td>string</td><td>Bank account number.</td></tr><tr><td>bic_swift</td><td>string</td><td>SWIFT or BIC code of the bank.</td></tr><tr><td>iban</td><td>string</td><td>IBAN (International Bank Account Number).</td></tr><tr><td>routing_number</td><td>string</td><td>Routing number for the bank.</td></tr><tr><td>country</td><td>string</td><td>Country where the bank account is held.</td></tr><tr><td>currency</td><td>string</td><td>Currency type for the bank account.</td></tr><tr><td>account_type</td><td>string</td><td>Type of bank account.</td></tr><tr><td>bank_address</td><td>string</td><td>Address of the bank branch.</td></tr><tr><td>additional_info</td><td>string</td><td>Any additional information regarding the bank account.</td></tr><tr><td>type</td><td>string</td><td>Type of company identifier.</td></tr><tr><td>value</td><td>string</td><td>The actual identifier value.</td></tr></tbody></table>

## Groups

### Create new group in a channel

<mark style="color:green;">`POST`</mark> `https://app.insurehero.io/api/shield/v1/groups`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Request Body

| Name                                                  | Type                  | Description                                                                                                                                                                                     |
| ----------------------------------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name<mark style="color:red;">\*</mark>                | string                | Group name unique                                                                                                                                                                               |
| description                                           | string                | Group description                                                                                                                                                                               |
| bussiness\_industry<mark style="color:red;">\*</mark> | string                | Bussiness industry                                                                                                                                                                              |
| company\_name                                         | string                | Group company name                                                                                                                                                                              |
| company\_role                                         | string                | Group company role                                                                                                                                                                              |
| company\_email                                        | string                | Group company email                                                                                                                                                                             |
| company\_identifier                                   | CompanyIdentifierType | Group company identifier                                                                                                                                                                        |
| company\_address                                      | json                  | The groups's company address information                                                                                                                                                        |
| company\_bank\_accounts                               | BankAccountType\[]    | The object fields are: account\_name, bank\_name, account\_number, bic\_swift, iban, routing\_number, country, currency, account\_type, bank\_address and additional\_info. All of type string. |
| uid<mark style="color:red;">\*</mark>                 | string                | Asssign your unique identifier "GRP-0001". Required key; send `null` if you do not use it                                                                                                       |
| metadata                                              | object                | Additional data to include in the group                                                                                                                                                         |

{% tabs %}
{% tab title="201: Created Created successfully" %}

```json
{
    "data": {
        "id": "2ceb1648-18b8-5d01-b614-8d697d282632",
        "name": "Andes Logistics S.A.",
        "description": "",
        "bussiness_industry": "Consumer goods",
        "company_name": "Andes Logistics S.A.",
        "company_role": "Founder",
        "company_email": "operations@example.com",
        "company_identifier": {
            "type": "RUC",
            "value": "1790000001001"
        },
        "company_address": "Av. 9 de Octubre 100, Guayaquil",
        "company_bank_accounts": [
            {
                "account_name": "Andes Logistics S.A.",
                "bank_name": "Example Bank",
                "account_number": "1234567892",
                "bic_swift": "EXBKECEG",
                "iban": "EC00EXBK0000001234567892",
                "routing_number": "011000015",
                "country": "EC",
                "currency": "Euro",
                "account_type": "Savings",
                "bank_address": "Av. 9 de Octubre 100, Guayaquil",
                "additional_info": "Branch: Main"
            },
            {
                "account_name": "Andes Logistics S.A.",
                "bank_name": "Example Bank",
                "account_number": "1234567890",
                "bic_swift": "EXBKECEG",
                "iban": "EC00EXBK0000001234567890",
                "routing_number": "011000015",
                "country": "EC",
                "currency": "US Dollar",
                "account_type": "Savings",
                "bank_address": "Av. 9 de Octubre 100, Guayaquil",
                "additional_info": "Branch: Main"
            }
        ],
        "uid": "GRP-0001",
        "metadata": {
            "additional_info": "Branch: Main"
        }
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "Invalid access token"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "P0001",
        "details": null,
        "hint": null,
        "message": "Group names must be unique"
    }
}
```

{% endtab %}
{% endtabs %}

If a bank account `country` or `currency` cannot be resolved, the endpoint returns `404` (for example, `details` `"Currency not found: XYZ"`).

**CompanyIdentifierType**

It is an object that has the following values

| Type  | Value                              |
| ----- | ---------------------------------- |
| Type  | string (PASSPORT, RUC, CI or CURP) |
| Value | string                             |

**BankAccountType**

It is an array of objects where each object can have the following values:

| Value            | Type   |
| ---------------- | ------ |
| account\_name    | string |
| bank\_name       | string |
| account\_number  | string |
| bic\_swift       | string |
| iban             | string |
| routing\_number  | string |
| country          | string |
| currency         | string |
| account\_type    | string |
| bank\_address    | string |
| additional\_info | string |

All fields are required except `additional_info`. Send `country` as a country name or ISO code (for example `EC`) and `currency` as a currency code (for example `USD`). Create and update responses return the country ISO code and the currency name; GET responses return the stored identifiers.

### Get all the groups

Get a list of all available groups in your channel

<mark style="color:blue;">`GET`</mark> `https://app.insurehero.io/api/shield/v1/groups`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Query Parameters

| Name                                   | Type   | Description                                                            |
| -------------------------------------- | ------ | ---------------------------------------------------------------------- |
| from<mark style="color:red;">\*</mark> | number | Starting record index                                                  |
| to<mark style="color:red;">\*</mark>   | number | Ending record index. Must be greater than `from`, at most `from + 100` |

{% tabs %}
{% tab title="200: OK Retrieved successfully" %}

```json
{
    "data": [
        {
            "id": "2ceb1648-18b8-5d01-b614-8d697d282632",
            "name": "Andes Logistics S.A.",
            "description": "Cargo transport and logistics",
            "bussiness_industry": "Consumer goods",
            "company_name": "Andes Logistics S.A.",
            "company_role": "Founder",
            "company_email": "operations@example.com",
            "company_identifier": {
                "type": "RUC",
                "value": "1790000001001"
            },
            "company_address": "Av. 9 de Octubre 100, Guayaquil",
            "company_bank_accounts": [
                {
                    "account_name": "Andes Logistics S.A.",
                    "bank_name": "Example Bank",
                    "account_number": "1234567890",
                    "bic_swift": "EXBKECEG",
                    "iban": "EC00EXBK0000001234567890",
                    "routing_number": "011000015",
                    "country": "0e9178ee-6453-53dc-984b-65bf02c016c2",
                    "currency": "70c94a4a-6764-5590-b1cf-e13e352c8f93",
                    "account_type": "Savings",
                    "bank_address": "Av. 9 de Octubre 100, Guayaquil",
                    "additional_info": null
                }
            ],
            "uid": "GRP-0001",
            "metadata": {}
        }
    ]
}
```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "Invalid access token"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "issues": [
            {
                "code": "custom",
                "message": "Invalid range. 'from' must be less than or equal to 'to'",
                "path": []
            }
        ],
        "name": "ZodError"
    }
}
```

{% endtab %}
{% endtabs %}

#### Attributes

| Name                    | Type                  | Description                                                  |
| ----------------------- | --------------------- | ------------------------------------------------------------ |
| data                    | array                 | Main container that holds all group information.             |
| id                      | uuid                  | Unique identifier for the group.                             |
| name                    | string                | Name of the group.                                           |
| description             | string                | Description of the group.                                    |
| bussiness\_industry     | string                | Industry to which the group belongs. Can be an empty string. |
| company\_name           | string                | Name of the company associated with the group.               |
| company\_role           | string                | Role of the company.                                         |
| company\_email          | string                | Contact email of the company.                                |
| company\_identifier     | CompanyIdentifierType | Identifier of the company.                                   |
| company\_address        | string                | Address of the company.                                      |
| company\_bank\_accounts | BankAccountType\[]    | Bank accounts associated with the company.                   |
| uid                     | string                | Unique identifier for the group within the system.           |
| metadata                | object                | Additional metadata related to the group.                    |

### Get a specific group

Get a group of your channel by its id or its uid.

<mark style="color:blue;">`GET`</mark> `https://app.insurehero.io/api/shield/v1/groups/:groupId`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Path Parameters

| Name                                      | Type   | Description                                   |
| ----------------------------------------- | ------ | --------------------------------------------- |
| groupId<mark style="color:red;">\*</mark> | string | The group id, or its uid when `searchBy=uid`. |

#### Query Parameters

| Name     | Type      | Description                                       |
| -------- | --------- | ------------------------------------------------- |
| searchBy | id \| uid | Field used to search for the group. Default `id`. |

#### Example Response

{% tabs %}
{% tab title="200: OK Retrieved successfully" %}

```json
{
    "data": {
        "id": "2ceb1648-18b8-5d01-b614-8d697d282632",
        "name": "Andes Logistics S.A.",
        "description": null,
        "bussiness_industry": "Consumer goods",
        "company_name": "Andes Logistics S.A.",
        "company_role": "Founder",
        "company_email": "operations@example.com",
        "company_identifier": {
            "type": "RUC",
            "value": "1790000001001"
        },
        "company_address": "Av. 9 de Octubre 100, Guayaquil",
        "company_bank_accounts": null,
        "uid": "GRP-0001",
        "metadata": {}
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

```json
{
    "error": "Request contains malformed data",
    "details": "Missing bearer token"
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "Invalid access token"
}
```

{% endtab %}

{% tab title="404: Not Found Resource not found" %}
The group does not exist in your channel:

```json
{
    "error": "Resource not found",
    "details": "Group not found"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}
A `searchBy` value other than `id` or `uid` returns an input validation error. See [Error Handling](https://docs.insurehero.io/shield-api/data-dictionary#error-handling).
{% endtab %}
{% endtabs %}

#### Attributes

Same fields as in [Get all the groups](#get-all-the-groups), in a single object in `data`.

## Register a user without OTP

To create a user directly, you will need to contact our support team. Once you have requested authorization and it has been granted, you will be provided with the specific instructions to carry out this action. Until then, this endpoint returns `401` with `details` `"This channel does not allow hand-shake register"`.

<mark style="color:green;">`POST`</mark> `https://app.insurehero.io/api/shield/v1/users`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |

#### Request Body

<table><thead><tr><th width="274">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>first_name<mark style="color:red;">*</mark></td><td>string</td><td>User's first name</td></tr><tr><td>last_name<mark style="color:red;">*</mark></td><td>string</td><td>User's last name</td></tr><tr><td>email<mark style="color:red;">*</mark></td><td>string</td><td>User's email (Must be unique). Required key; can be <code>null</code></td></tr><tr><td>phone<mark style="color:red;">*</mark></td><td>string</td><td>User's phone number (Must be unique). Required key; can be <code>null</code></td></tr><tr><td>gender</td><td>string</td><td>MALE | FEMALE</td></tr><tr><td>dob</td><td>string</td><td>User's date of birth</td></tr><tr><td>address</td><td>json</td><td>The user's address information</td></tr><tr><td>document_type</td><td>string</td><td>The type of document can be: PASSPORT, RUC, CI and CURP</td></tr><tr><td>document_number</td><td>string</td><td>The user's document number</td></tr><tr><td>bank_accounts</td><td>BankAccountType[]</td><td>User bank accounts</td></tr><tr><td>company_name</td><td>string</td><td>User company name</td></tr><tr><td>company_role</td><td>string</td><td>User company role</td></tr><tr><td>company_email</td><td>string</td><td>User company email</td></tr><tr><td>company_identifier</td><td>CompanyIdentifierType</td><td>User company identifier</td></tr><tr><td>company_address</td><td>json</td><td>The user's company address information</td></tr><tr><td>company_bank_accounts</td><td>BankAccountType[]</td><td>The object fields are the same fields as bank_accounts</td></tr><tr><td>uid<mark style="color:red;">*</mark></td><td>string</td><td>Additional user's unique identifier in your system. You will be able to use it to search for a user later. Required key; send <code>null</code> if you do not use it</td></tr><tr><td>group_id</td><td>string</td><td>The id of the group a user should belong to</td></tr><tr><td>metadata</td><td>object</td><td>Additional data to include in the user record.</td></tr></tbody></table>

#### Example Response

{% tabs %}
{% tab title="201: Created Created successfully" %}

```json
{
    "data": {
        "id": "c4b53bc9-3cc6-501a-9d54-dbd25584d725",
        "channel_id": "0ccad1d6-18ee-5c17-a684-9f8fe203d7c1",
        "email": "maria.lopez@example.com",
        "first_name": "Maria",
        "last_name": "Lopez",
        "phone": "+593991234501",
        "uid": "USR-0001",
        "gender": "FEMALE",
        "dob": "1990-05-10T00:00:00+00:00",
        "address": "Av. 9 de Octubre 100, Guayaquil",
        "document_type": "CI",
        "document_number": "1700000001",
        "bank_accounts": [
            {
                "account_name": "Maria Lopez",
                "bank_name": "Example Bank",
                "account_number": "1234567891",
                "bic_swift": "EXBKECEG",
                "iban": "EC00EXBK0000001234567891",
                "routing_number": "011000015",
                "country": "EC",
                "currency": "US Dollar",
                "account_type": "Checking",
                "bank_address": "Av. 9 de Octubre 100, Guayaquil",
                "additional_info": "Branch: Main"
            }
        ],
        "company_name": "Andes Logistics S.A.",
        "company_role": "Founder",
        "company_email": "operations@example.com",
        "company_identifier": {
            "type": "RUC",
            "value": "1790000001001"
        },
        "company_address": "Av. 9 de Octubre 100, Guayaquil",
        "company_bank_accounts": [
            {
                "account_name": "Andes Logistics S.A.",
                "bank_name": "Example Bank",
                "account_number": "1234567890",
                "bic_swift": "EXBKECEG",
                "iban": "EC00EXBK0000001234567890",
                "routing_number": "011000015",
                "country": "EC",
                "currency": "US Dollar",
                "account_type": "Savings",
                "bank_address": "Av. 9 de Octubre 100, Guayaquil",
                "additional_info": "Branch: Main"
            }
        ],
        "group_id": "2ceb1648-18b8-5d01-b614-8d697d282632",
        "metadata": {}
    }
}
```

{% endtab %}

{% tab title="401: Unauthorized Hand-shake register not allowed" %}

```json
{
    "error": "Invalid or expired access token",
    "details": "This channel does not allow hand-shake register"
}
```

{% endtab %}

{% tab title="404: Not Found Group not found" %}

```json
{
    "error": "Resource not found",
    "details": "The groupID 7d20a5c7-5b09-51e4-ba20-dea2aad96e2e was not found in the channel 0ccad1d6-18ee-5c17-a684-9f8fe203d7c1"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

```json
{
    "error": "Internal validation failed",
    "details": {
        "code": "P0001",
        "details": null,
        "hint": null,
        "message": "User emails must be unique"
    }
}
```

{% endtab %}
{% endtabs %}

#### Attributes

<table><thead><tr><th width="210">Name</th><th width="117">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>Main container that holds all user information.</td></tr><tr><td>id</td><td>uuid</td><td>Unique identifier of the user.</td></tr><tr><td>channel_id</td><td>string</td><td>Identifier of the channel.</td></tr><tr><td>account_name</td><td>string</td><td>Name of the bank account holder.</td></tr><tr><td>bank_name</td><td>string</td><td>Name of the bank.</td></tr><tr><td>account_number</td><td>string</td><td>Bank account number.</td></tr><tr><td>bic_swift</td><td>string</td><td>SWIFT or BIC code of the bank.</td></tr><tr><td>iban</td><td>string</td><td>IBAN (International Bank Account Number).</td></tr><tr><td>routing_number</td><td>string</td><td>Routing number for the bank.</td></tr><tr><td>country</td><td>string</td><td>Country where the bank account is held (ISO code).</td></tr><tr><td>currency</td><td>string</td><td>Currency type for the bank account (currency name).</td></tr><tr><td>account_type</td><td>string</td><td>Type of bank account.</td></tr><tr><td>bank_address</td><td>string</td><td>Address of the bank branch.</td></tr><tr><td>additional_info</td><td>string</td><td>Any additional information regarding the bank account.</td></tr><tr><td>type</td><td>string</td><td>Type of company identifier.</td></tr><tr><td>value</td><td>string</td><td>The actual identifier value.</td></tr></tbody></table>
