> For the complete documentation index, see [llms.txt](https://tri.gitbook.io/tri-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tri.gitbook.io/tri-doc/liquidity-pool/create-employee.md).

# Create Employee

### Liquidity Pool

<mark style="color:green;">`POST`</mark> <https://sandbox.triangle.digital/api/v2/liquidity\\_pool/clients/{client\\_id}/employees>

Adds an employee of the client. All validation problems are returned at once in `data.errors`.

**Path parameters**

<table data-full-width="true" data-search="false"><thead><tr><th width="230">Name</th><th width="110">Type</th><th>Description</th><th width="210">Where to take it from</th></tr></thead><tbody><tr><td><code>client_id</code></td><td>integer</td><td><strong>Required.</strong> The client the employee belongs to.</td><td><a href="/tri-doc/liquidity-pool/get-clients.md">Get Clients</a> — <code>client_id</code></td></tr></tbody></table>

**Headers**

<table data-full-width="true"><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr></tbody></table>

**Body**

<table data-full-width="true" data-search="false"><thead><tr><th width="200">Name</th><th width="110">Type</th><th>Description</th><th width="260">Example</th></tr></thead><tbody><tr><td><code>hash</code></td><td>string</td><td><strong>Required.</strong> API key.</td><td>fk5f0iuy-rr06-j4x3-i75b-fy2s67s4ilo1</td></tr><tr><td><code>employee_name</code></td><td>string</td><td><strong>Required.</strong> Employee name.</td><td>John Smith</td></tr><tr><td><code>employee_number</code></td><td>string</td><td>Client-facing Employee ID — the client assigns the value, as used in its own systems. Unique within the client when given.</td><td>D2354324</td></tr><tr><td><code>company_id</code></td><td>uuid</td><td>Business accounts — the Carbon Pool company the employee is attached to. From <a href="/tri-doc/liquidity-pool/get-companies.md">Get Companies</a> — <code>company_id</code>.</td><td>68117898-4278-499f-b96b-78173f3d2040</td></tr><tr><td><code>country</code></td><td>string</td><td>Country.</td><td>United States</td></tr><tr><td><code>address</code></td><td>string</td><td>Address line 1.</td><td>6700 Woodlands Pkwy</td></tr><tr><td><code>address_2</code></td><td>string</td><td>Address line 2.</td><td>Suite 230</td></tr><tr><td><code>state</code></td><td>string</td><td>State.</td><td>NY</td></tr><tr><td><code>city</code></td><td>string</td><td>City.</td><td>The Woodlands</td></tr><tr><td><code>zip</code></td><td>string</td><td>Zip code.</td><td>77382</td></tr></tbody></table>

```json
{
    "hash": "fk5f0iuy-rr06-j4x3-i75b-fy2s67s4ilo1",
    "employee_name": "John Smith",
    "employee_number": "D2354324",
    "company_id": "68117898-4278-499f-b96b-78173f3d2040",
    "country": "United States",
    "address": "6700 Woodlands Pkwy",
    "address_2": "",
    "state": "NY",
    "city": "The Woodlands",
    "zip": "77382"
}
```

**Response fields**

<table data-full-width="true" data-search="false"><thead><tr><th width="300">Field</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>message</code></td><td>string</td><td>Human-readable result of the call.</td></tr><tr><td><code>success</code></td><td>boolean</td><td>Whether the employee was created; a refused call answers HTTP 400.</td></tr><tr><td><code>data.employee_id</code></td><td>integer</td><td>The created employee. Use it wherever an <code>employee_id</code> is expected (<a href="/tri-doc/liquidity-pool/add-credit-card.md">Add Credit Card</a>, <a href="/tri-doc/liquidity-pool/buy-carbon-pool.md">Buy Carbon Pool</a>, <a href="/tri-doc/liquidity-pool/balance.md">Balance</a>).</td></tr><tr><td><code>data.employee_number</code> / <code>employee_name</code></td><td>string</td><td>The stored values, as entered.</td></tr><tr><td><code>data.company_id</code></td><td>uuid</td><td>Company of the employee, as in <a href="/tri-doc/liquidity-pool/get-companies.md">Get Companies</a>; empty when none.</td></tr><tr><td><code>data.country</code> / <code>address</code> / <code>address_2</code> / <code>state</code> / <code>city</code> / <code>zip</code></td><td>string</td><td>The stored address, as entered.</td></tr><tr><td><code>data.credit_card</code></td><td>boolean</td><td>Whether a card is attached; <code>false</code> for a new employee.</td></tr><tr><td><code>data.master_card</code></td><td>boolean</td><td>Whether the client's master card covers this employee; <code>false</code> for a new employee.</td></tr><tr><td><code>data.last_pay_error</code></td><td>boolean</td><td>Whether the last payment failed; <code>false</code> for a new employee.</td></tr><tr><td><code>data.last_pay_at</code></td><td>string</td><td>When the last payment happened, MM/DD/YYYY HH:MM:SS UTC +00:00; empty for a new employee.</td></tr><tr><td><code>data.errors</code></td><td>array</td><td>400 only — every validation problem, one per entry.</td></tr><tr><td><code>operations_count</code></td><td>integer</td><td>Always <code>1</code>.</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="201" %}
{% code fullWidth="false" %}

```json
{
    "message": "Employee created successfully.",
    "success": true,
    "data": {
        "employee_id": 18,
        "employee_number": "D2354324",
        "employee_name": "John Smith",
        "company_id": "68117898-4278-499f-b96b-78173f3d2040",
        "country": "United States",
        "address": "6700 Woodlands Pkwy",
        "address_2": "",
        "city": "The Woodlands",
        "state": "NY",
        "zip": "77382",
        "credit_card": false,
        "master_card": false,
        "last_pay_error": false,
        "last_pay_at": ""
    },
    "operations_count": 1
}
```

{% endcode %}
{% endtab %}

{% tab title="400" %}
A field is missing or not valid; `data.errors` lists every problem.

```json
{
    "message": "Employee Name is required. Employee ID already exists",
    "success": false,
    "data": {
        "errors": [
            "Employee Name is required",
            "Employee ID already exists"
        ]
    },
    "operations_count": 1
}
```

{% endtab %}
{% endtabs %}
