# Append content to a collaborative document via the API

**URL:** <https://community.fibery.io/t/append-content-to-a-collaborative-document-via-the-api/8493>\
**Category:** API & Programming\
**Created:** [March 23, 2025, 4:18pm UTC](https://community.fibery.io/t/append-content-to-a-collaborative-document-via-the-api/8493 "2025-03-23T16:18:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![derbenoo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/derbenoo/32/11540_2.png) [@derbenoo](https://community.fibery.io/u/derbenoo)\
**Post date:** [March 23, 2025, 4:18pm UTC](https://community.fibery.io/t/append-content-to-a-collaborative-document-via-the-api/8493/1 "2025-03-23T16:18:13Z")

</div>

Hey everyone,

i am trying to append some content to a collaborative document. [The API docs](https://the.fibery.io/@public/User_Guide/Guide/Entity-API-264/anchor=Update-rich-text-Field--d4691f02-6dcc-4bae-b0c8-c627d90011e8) explain how to set the content (batched):

```sh
curl -X POST 'https://YOUR_ACCOUNT.fibery.io/api/documents/commands?format=md' \
     -H 'Authorization: Bearer <token>' \
     -H 'Content-Type: application/json' \
     -d \
      '{
         "command": "create-or-update-documents",
         "args": [
           {
             "secret": "b33a25d1-99ba-11e9-8c59-09d0cb6f3aeb",
             "content": "my md content 1"
           },
           {
             "secret": "b33a25d3-99ba-11e9-8c59-09d0cb6f3aeb",
             "content": "my md content 2"
           }
         ]
      }'

```

However, for this I would have to retrieve the content of the document first, append the new content and finally set the document via the request above.

Is there an option to append content as well? This would also be a lot safer as the existing content is not touched at all.

Cheers,  
Ben

---

<div class="post-metadata">

**Author:** ![misha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/misha/32/12041_2.png) [@misha](https://community.fibery.io/u/misha)\
**Post date:** [March 24, 2025, 12:03pm UTC](https://community.fibery.io/t/append-content-to-a-collaborative-document-via-the-api/8493/2 "2025-03-24T12:03:59Z")

</div>

yes,

You can try changing command to “create-or-append-documents” or “create-or-prepend-documents”.  
Unfortunately they are not documented yet but the API format should be the same

---

<div class="post-metadata">

**Author:** ![derbenoo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/derbenoo/32/11540_2.png) [@derbenoo](https://community.fibery.io/u/derbenoo)\
**Post date:** [March 24, 2025, 1:15pm UTC](https://community.fibery.io/t/append-content-to-a-collaborative-document-via-the-api/8493/3 "2025-03-24T13:15:20Z")

</div>

Thanks that was exactly what I was looking for! Fibery API proves to be awesome once again 😎

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 29, 2025, 11:29am UTC](https://community.fibery.io/t/append-content-to-a-collaborative-document-via-the-api/8493/4 "2025-04-29T11:29:01Z")

</div>


