# Setting up the test plan

<mark style="color:green;">`PUT`</mark> `/test/plan`

Once the test plan is ready and you're good to go forward with it, it is time to let momentum set it up for execution.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

| Name         | Type                                                     | Description                                                                                         |
| ------------ | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `plan`       | Object of arrays, containing happy\_path and edge\_cases | The plans generated in the last step                                                                |
| `project_id` | number                                                   | The project id generated during parsing of the code                                                 |
| `identifier` | string                                                   | The id that points to the specific endpoint you want to set test plan for, ex : `/server.py:search` |

**Response**

{% tabs %}
{% tab title="200" %}
{% code overflow="wrap" %}

```json
null //empty response with 200 success code indicating the test plan has been set up
```

{% endcode %}
{% endtab %}

{% tab title="400" %}
{% code overflow="wrap" %}

```json
{  // Usually happens with invalid parameters
    "status_code": 400,
    "detail": "Project Details not found." 
}
```

{% endcode %}
{% 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.momentum.sh/using-momentum/setting-up-the-test-plan.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.
