Update a message

Edit/update the content or topic of a message.

PATCH https://studyscience.wyzepal.com/api/v1/messages/{msg_id}

{msg_id} in the above URL should be replaced with the ID of the message you wish you update.

Usage examples

#!/usr/bin/env python3

import wyzepal

# Pass the path to your wyzepalrc file here.
client = wyzepal.Client(config_file="~/wyzepalrc")

# Edit a message
# (make sure that message_id below is set to the ID of the
# message you wish to update)
request = {
    "message_id": message_id,
    "content": "New content"
result = client.update_message(request)

More examples and documentation can be found here.

const wyzepal = require('wyzepal-js');

// Pass the path to your wyzepalrc file here.
const config = {
    wyzepalrc: 'wyzepalrc',

wyzepal(config).then((client) => {
    // Update a message
    const params = {
        message_id: 131,
        content: 'New Content',


curl -X "PATCH" https://studyscience.wyzepal.com/api/v1/messages/{msg_id} \
    -d $"content=New content"


You only have permission to edit a message if:

  1. You sent it, OR:
  2. This is a topic-only edit for a (no topic) message, OR:
  3. This is a topic-only edit and you are an admin.


Argument Example Required Description
message_id 42 Yes

The ID of the message that you wish to edit/update.

subject "Castle" No

The topic of the message. Only required for stream messages. Maximum length of 60 characters.

propagate_mode "change_all" No

Which message(s) should be edited: just the one indicated in message_id, messages in the same topic that had been sent after this one, or all of them. Must be one of: change_one, change_later, change_all. Defaults to "change_one".

content "Hello" No

The content of the message. Maximum message size of 10000 bytes.


Example response

A typical successful JSON response may look like:

    "msg": "",
    "result": "success"

A typical JSON response for when one doesn't have the permission to edit a particular message:

    "code": "BAD_REQUEST",
    "msg": "You don't have permission to edit this message",
    "result": "error"