This function creates a new Mem and adds it to your Inbox.
create_mem( content, API_KEY, api_version = "v0", isRead = NULL, isArchived = NULL, scheduledFor = NULL, createdAt = NULL )
content | character string, The contents of the mem. The string should be in a markdown-compatible format. For more details, see the Mem Markdown Format. |
---|---|
API_KEY | an API key |
api_version | (optional) The API version you'd like to use, defaults to "v0" which is the only version of the Mem API. Will be expanded as the API develops more |
isRead | (optional) logical, Indicates whether the mem should be automatically marked as "read" (unread mems are highlighted within the default views in the product UI). Defaults to FALSE |
isArchived | (optional) Indicates whether the mem should be automatically marked as "archived" (archived mems are hidden from the default views in the product UI). Defaults to false. |
scheduledFor | (optional) Specify a time that this mem will resurface at (similar to the "snooze" button in the product UI). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ |
createdAt | (optional) Specify the time that the mem was created at. Defaults to the current time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ |
returns a list with the content id and response.
You'll be able to pass a character vector that will be displayed in Mem. This vector can be formatted with markdown styling and this will be interpreted and formatted by Mem. The markdown format supported by Mem can by found on their documentation
You'll need to create an API token in order to create a Mem. To do this, visit the API Flow within the Mem app. From this page, you'll be able to generate a new API access token for yourself.
if (FALSE) { API_KEY <- Sys.getEnv("MEM_API") create_mem("Hello World!", API_KEY) }