# Updating Projects via API

## Update Project

<mark style="color:green;">`POST`</mark> `https://microreact.org/api/projects/update/`

#### Query Parameters

| Name    | Type   | Description                                                                                       |
| ------- | ------ | ------------------------------------------------------------------------------------------------- |
| project | string | <p>The ID of the project to be updated (e.g.</p><p><code>gb7RzDg87aJK2yGAqQiai</code></p><p>)</p> |

#### Headers

| Name         | Type   | Description                                                                      |
| ------------ | ------ | -------------------------------------------------------------------------------- |
| Content-Type | string | <p>Should be</p><p><code>Content-Type application/json; charset=utf-8</code></p> |
| Access-Token | string | An API access token.                                                             |

#### Request Body

| Name | Type   | Description                                                       |
| ---- | ------ | ----------------------------------------------------------------- |
|      | object | <p>A valid</p><p><code>.microreact</code></p><p>JSON document</p> |

{% tabs %}
{% tab title="200 A JSON document which include the ID and the URL of the project." %}

```javascript
{
  "id": "gb7RzDg87aJK2yGAqQiaiu",
  "url": "https://microreact.org/project/gb7RzDg87aJK2yGAqQiaiu"
}
```

{% endtab %}
{% endtabs %}

See [API Access Tokens](/api/access-tokens.md)

### Example

{% tabs %}
{% tab title="cURL + Bash" %}

```bash
curl \
  --header "Content-Type: application/json; charset=utf-8" \
  --header "Access-Token: eyJhbGciOiJIUzUxMiJ9..." \
  --data "@project.microreact" \
  https://microreact.org/api/projects/update?project=gb7RzDg87aJK2yGAqQiai
```

{% 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.microreact.org/api/editing-projects.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.
