> For the complete documentation index, see [llms.txt](https://docs.graspil.com/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graspil.com/en/api/custom-fields.md).

# User custom fields

## Sending data to a custom field

<mark style="color:green;">`POST`</mark> `/v1/send-user-field`

This method lets you fill in or update several different fields for several different users at once.

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |
| Api-Key      | `<token>`          |

**Body**

Pass an array of objects with the data:

| Name      | Type                                | Description                                                                                                             |
| --------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `key`     | string                              | Unique field key                                                                                                        |
| `value`   | String \| Number \| Boolean \| Date | The value. Must match the field's corresponding type. The date can be in `Unixtime`, `ISO8601`, or `Y-m-d H:i:s` format |
| `user_id` | Integer                             | User ID                                                                                                                 |

{% hint style="info" %}
Data type validation happens later, during data processing. Only basic checks are validated on submission. Any errors that occur at later processing stages will appear in the **resource errors** section
{% endhint %}

**Request (example)**

```
[
  {
    "key": "tariff",
    "value": 2,
    "user_id": 123123123
  }
]
```

**Response**

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

```json
{
  "ok": true,
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "ok": false,
    "error_code": 400,
    "description": "Wrong json"
}
```

{% endtab %}
{% endtabs %}
