Skip to main content

Append to a Mem

Right now, we don't support fully updating/replacing a mem's content.

However, you can append new content to the end of a mem!

First, you'll need to aquire an API Access Token. You can get one via our new API Flow within the Mem app. After you've got that, you'll be able to make authorized requests to the API.

curl \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: ApiAccessToken <Replace this with your access token>" \
-d '[{ "content": "This will be appended to the end of the mem!" }]' \
https://api.mem.ai/v0/mems/:memId/append

Parameters#

Note that you will need to have already have a memId to append to a mem. See below for more details regarding how to get a mem's ID.

POST
https://api.mem.ai/v0/mems/:memId/append
NameTypeDescription
contentstringRequired The content which will be appended to the end of the existing mem. The string should be in a markdown-compatible format. For more details, see the Mem Markdown Format.

Details about the memId#

Currently, a memId can only be obtained by looking at the response of the mem-creation API endpoint. An example of an integration using the append endpoint might look like this:

1 - Create Mem
2 - memId is returned as part of the response body
3 - Store this memId somewhere
4 - Append to that mem by using the memId

So, first you would create a mem:

POST /v0/mems
{ "content": "Hello #world" }
Response
{
"id": " 10000000-0000-4000-a000-000000000000",
"url": "https://mem.ai/m/abcdef123456xyz"
}

Then, you would use the returned ID to append to that mem later on!

POST /v0/mems/10000000-0000-4000-a000-000000000000/append
{ "content": "Some more stuff" }

ALSO NOTE#

You'll notice that the memId is different than the identifier in the product URL https://mem.ai/m/abcdef123456xyz.

Mem IDs are UUID identifiers, which differ from our product URL's identifiers.

In the future, we'll be investigating how to better display these IDs in the product.