# User Custom Fields

## Sending data in an custom field

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

Using this method, you can fill in or update several different fields for different users at once.

**Headers**

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

**Body**

Pass an array of objects with data:

| Name      | Type                                | Description                                                                                                              |
| --------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `key`     | string                              | Unique field key                                                                                                         |
| `value`   | String \| Number \| Boolean \| Date | Meaning. There must be a type corresponding to the field type. The date can be in Unixtime, ISO8601, Y-m-d H:i:s format. |
| `user_id` | Integer                             | user\_id                                                                                                                 |

{% hint style="info" %}
Data type validation occurs later during data processing. During the transfer, only the basic indicators are validated. All errors that occur at late stages of processing end up in the errors section of the resource.
{% endhint %}

**Request**

```json
[
  {
    "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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.graspil.com/en/api/custom-fields.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
