# Edit Post

## Edit a post

## Edit a post.

<mark style="color:green;">`POST`</mark> `https://api.metaforo.io/v2/threads/{thread_id}/posts/{post_id}/edit`

Edit a post.

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| authorization<mark style="color:red;">\*</mark> | String | JWT token   |

#### Request Body

| Name                                         | Type   | Description                                    |
| -------------------------------------------- | ------ | ---------------------------------------------- |
| thread\_id<mark style="color:red;">\*</mark> | Int    | The id of the thread which the post belongs to |
| content<mark style="color:red;">\*</mark>    | String | Post's content                                 |
| file\_attachments                            | Int    |                                                |
| post\_id<mark style="color:red;">\*</mark>   | Int    | ID of the post to edit                         |
| api\_key<mark style="color:red;">\*</mark>   | String | The `API KEY` that assigned to you.            |

{% tabs %}
{% tab title="200 Post successfully edited" %}

```javascript
{
    "status": true,
    "code": "20000",
    "description": "",
    "server": "rest",
    "data": {
        "thread": {
            "id": 36696,
            "title": null,
            "user_id": 7088,
            "group_id": 4656,
            "category_id": null,
            "posts_count": null,
            "likes_count": null,
            "category_index_id": null,
            "group_thread_id": null,
            "first_post_id": 1937942,
            "nsfw": 0,
            "is_delete": 1,
            "ipfs": "",
            "no_recommend": 0,
            "last_post_id": 1937942,
            "_import_source_import_id": null,
            "_import_source_user_id": null,
            "_import_source_forum_id": null,
            "_import_source_thread_id": null,
            "_import_source_first_post_id": null,
            "_import_source_last_post_id": null,
            "gallery_id": 0,
            "lottery_id": 0,
            "hot_score": "1764.9057"
        },
        "post": {
            "id": 1937942,
            "thread_id": 36696,
            "user_id": 7088,
            "sign": "",
            "sign_data": null,
            "sign_msg": "",
            "content": "[]",
            "ipfs": null,
            "arweave": null,
            "group_post_id": null,
            "group_thread_id": null,
            "parent_id": -1,
            "depth": 1,
            "group_id": 4656,
            "deleted": 1,
            "deleted_by": 7088,
            "nsfw": -1,
            "nsfw_score": 0,
            "attachments": [],
            "attached_files": [
                {
                    "id": 1052,
                    "url": "https://cdn.everforo.com/20220601/Screenshot_20220531-153357.jpg",
                    "old_url": "",
                    "name": "Screenshot_20220531-153357.jpg",
                    "size": "45605",
                    "mime_type": "application/octet-stream",
                    "group_id": 4656,
                    "post_id": 1937942,
                    "thread_id": 36696,
                    "ipfs": null
                }
            ],
            "total_likes": 0,
            "total_report": 0,
            "user": {
                "id": 7088,
                "name": "6vv",
                "photo_url": "https://cdn.everforo.com/20220601/32d10f16fd278a91aabef3cb7a7392e7.png",
                "is_nfc": 0
            }
        }
    }
}
```

{% endtab %}

{% tab title="401 Permission denied" %}

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Good to know:** This API method was created using the API Method block, it's how you can build out an API method documentation from scratch. Have a play with the block and you'll see you can do some nifty things like add and reorder parameters, document responses, and give your methods detailed descriptions.
{% endhint %}
