# Registering Users

Before sending a user's data to GeroSense API, you must register this user. Use `/user` endpoint for it:

<mark style="color:green;">`POST`</mark> `https://api-b2b.gerosense.ai/api/v2.2/user`

#### Headers

| Name                                            | Type   | Description      |
| ----------------------------------------------- | ------ | ---------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer \<token>  |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json |

#### Request Body

| Name                                              | Type   | Description                                                                                |
| ------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------ |
| id<mark style="color:red;">\*</mark>              | String | User's unique identifier                                                                   |
| biological\_sex<mark style="color:red;">\*</mark> | String | <p>User's sex assigned at birth.</p><p>Either <code>Male</code> or <code>Female</code></p> |
| year\_of\_birth<mark style="color:red;">\*</mark> | Int    | User's year of birth                                                                       |

{% tabs %}
{% tab title="200: OK The user was registered successfully" %}

{% endtab %}

{% tab title="400: Bad Request The user was registered previously (in case of a duplicating request)" %}

{% endtab %}
{% endtabs %}

{% code title="REQUEST (EXAMPLE)" %}

```bash
curl -X 'POST' 'https://api-b2b.gerosense.ai/api/v2.2/user' \
     -H 'accept: application/json' \
     -H 'Authorization: Bearer <token>' \
     -H 'Content-Type: application/json' \
     -d '{
       "id": "85b4453a-46de-484c-bbc2-12666ebc7ed9",
       "biological_sex": "Female",
       "year_of_birth": 1990
     }'
```

{% endcode %}
