Messages

Update a message

1POST https://api.markprompt.com/messages/{message_id}

Updates a message.

Request body

KeyTypeDescription
vote1 | -1 | 0A vote. Set to 0 to clear value.
metadataobjectA metadata object.
strategymerge | overwriteThe update strategy. If set to `merge`, it will merge with the existing fields. If set to `overwrite`, it will replace the existing fields. Default: `overwrite`.

Example request

1curl "https://api.markprompt.com/messages/message_123" \
2  -X POST \
3  -H "Authorization: Bearer <TOKEN>" \
4  -H "Content-type: application/json" \
5  -H "X-Markprompt-API-Version: 2024-03-23" \
6  -d '{
7      "metadata": { "category": "payments" },
8      "vote": 1,
9      "strategy": "merge"
10    }'