Messages

Update a message

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

Updates a message.

Request body

KeyTypeDescriptionDefault
vote1 | -1 | 0

A vote. Set to 0 to clear value.

metadataobject

A metadata object.

strategy"merge" | "overwrite"

The update strategy. If set to merge, it will merge with the existing fields. If set to overwrite, it will replace the existing fields.

overwrite
projectKeystring

Instead of the API token, use a project key, for instance for client-facing requests.

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-05-21" \
6  -d '{
7      "metadata": { "category": "payments" },
8      "vote": 1,
9      "strategy": "merge"
10    }'