> For the complete documentation index, see [llms.txt](https://docs.enclaive.cloud/enclaive-multi-cloud-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enclaive.cloud/enclaive-multi-cloud-platform/developers/api/client-api/account/need.md).

# Need

In the "Needs" section, endpoints for managing questions posed to users during registration to assess their intended use of the application are described.

Below is an example of what questions and answers might look like.

| Question                    | Answer                   |
| --------------------------- | ------------------------ |
| What do you plan to build   | Web site or content site |
| What is the maturity level? | Product                  |
| What do you like most?      | Low price                |

## Retrieve user

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/api/needs`

Retrieve the user's responses to the questions posed during registration, which provide insights into their intended use of the application.

#### Headers

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

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

```json
[
    {
        "_id": "6549f3e85205cf0c45f25372",
        "question": "What do you plan to build",
        "user": "6548a41138406c14db33b606",
        "answer": "Web or mobile application",
        "createdAt": "2023-11-07T08:23:04.948Z",
        "updatedAt": "2023-11-07T08:23:04.948Z"
    },
    {
        "_id": "6549f3ea5205cf0c45f25375",
        "question": "What is the maturity level?",
        "user": "6548a41138406c14db33b606",
        "answer": "Minimal Viable Product",
        "createdAt": "2023-11-07T08:23:06.207Z",
        "updatedAt": "2023-11-07T08:23:06.207Z"
    },
    {
        "_id": "6549f3eb5205cf0c45f25378",
        "question": "What is your role or business type?",
        "user": "6548a41138406c14db33b606",
        "answer": "Software company",
        "createdAt": "2023-11-07T08:23:07.208Z",
        "updatedAt": "2023-11-07T08:23:07.208Z"
    },
    {
        "_id": "6549f3ec5205cf0c45f2537b",
        "question": "What is your monthly spend on cloud infrastructure across cloud platforms? (Provide an estimate)",
        "user": "6548a41138406c14db33b606",
        "answer": "0-50 EUR",
        "createdAt": "2023-11-07T08:23:08.131Z",
        "updatedAt": "2023-11-07T08:23:08.131Z"
    },
    {
        "_id": "6549f3ed5205cf0c45f2537e",
        "question": "What do you like most?",
        "user": "6548a41138406c14db33b606",
        "answer": "Low prices",
        "createdAt": "2023-11-07T08:23:09.461Z",
        "updatedAt": "2023-11-07T08:23:09.461Z"
    }
]
```

{% endtab %}
{% endtabs %}

## Record user

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/api/needs`

Record the user's responses to the questions posed during registration, allowing the application to capture and store their usage intentions for future reference.

#### Headers

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

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

```json
{"message":"ok"}
```

{% endtab %}
{% endtabs %}

## Update user

<mark style="color:purple;">`PATCH`</mark> `{{BASE_URL}}/api/needs`

Update the user's responses to the questions posed during registration. This functionality enables users to modify or refine their usage goals for the application as their needs evolve.

#### Query Parameters

| Name                                       | Type   | Description            |
| ------------------------------------------ | ------ | ---------------------- |
| question<mark style="color:red;">\*</mark> | String | What do you like most? |

#### Headers

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

#### Request Body

| Name   | Type   | Description |
| ------ | ------ | ----------- |
| answer | String | Low price   |

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

```json
{"message":"ok"}
```

{% endtab %}
{% endtabs %}
