# Update Post

**URL:** <https://forum.social.plus/t/update-post/1127>\
**Category:** General\
**Created:** [February 17, 2024, 8:58pm UTC](https://forum.social.plus/t/update-post/1127 "2024-02-17T20:58:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hossam](https://avatars.discourse-cdn.com/v4/letter/h/e8c25b/32.png) [@hossam](https://forum.social.plus/u/hossam)\
**Post date:** [February 17, 2024, 8:58pm UTC](https://forum.social.plus/t/update-post/1127/1 "2024-02-17T20:58:13Z")

</div>

Hello ,  
when try to update post I give it the post id but I got ```  
{  
“status”: “error”,  
“message”: “Cast to ObjectId failed for value "1ddfad4d-b31c-4150-8642-a51f92a2c8da" (type string) at path "parentPostId" for model "post"”,  
“code”: 500000,  
“data”: {}  
}

```auto
so why this and the post it is that 1ddfad4d-b31c-4150-8642-a51f92a2c8da 

and If I have a post and want to update some filed only, should send all the data of the post again ????
```

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [February 19, 2024, 4:12pm UTC](https://forum.social.plus/t/update-post/1127/2 "2024-02-19T16:12:34Z")

</div>

This is cURLs example for update post:

```auto
curl --location --request PUT 'https://apix.sg.amity.co/api/v4/posts/65b2e31c4f1d82df7e8af38b' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxx' \
--data '{
  "data": {
    "text": "test5"
  },
  "metadata": {
    "postmetadata":"test5"

  },
  "tags": [
    "test"
  ]
}'

```

Where did you get the post id from? To further check this, please help share your full cURLs to our support email: [support.asc@amity.co](mailto:support.asc@amity.co)

You shouldn’t have to send all data again, you can only send the one you would like to update.

---

<div class="post-metadata">

**Author:** ![hossam](https://avatars.discourse-cdn.com/v4/letter/h/e8c25b/32.png) [@hossam](https://forum.social.plus/u/hossam)\
**Post date:** [February 25, 2024, 2:20pm UTC](https://forum.social.plus/t/update-post/1127/3 "2024-02-25T14:20:17Z")

</div>

Hello I need to update the metadata only can I make it ?

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [February 26, 2024, 9:26am UTC](https://forum.social.plus/t/update-post/1127/4 "2024-02-26T09:26:54Z")

</div>

Hello, certainly, you can. Please see the sample cURLs below:

curl --location --request PUT ‘[https://api.eu.amity.co/api/v2/users](https://api.eu.amity.co/api/v2/users)’   
–header ‘Content-Type: application/json’   
–header ‘Authorization: Bearer xxx’   
–data ‘{  
“userId”: “Test”,  
“metadata”: {  
“testmeta”: “usermetaUpdate”  
}  
}’
