# 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 %}


---

# 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://developer.gerosense.ai/gerosense-api-reference/registering-users.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.
