PATCH /scheduled_messages/{scheduled_message_id}

Edit an existing scheduled message.

Changes: New in Zulip 7.0 (feature level 184).

Servers

Path parameters

Name Type Required Description
scheduled_message_id Integer Yes

The ID of the scheduled message to update.

This is different from the unique ID that the message would have after being sent.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

Request body fields

Name Type Required Description
to No

The scheduled message's tentative target audience.

For channel messages, the integer ID of the channel. For direct messages, a list containing integer user IDs.

Required when updating the type of the scheduled message.

topic String No

The updated topic of the scheduled message.

Required when updating the type of the scheduled message to "stream" or "channel". Ignored when the existing or updated type of the scheduled message is "direct" (or "private").

Clients should use the max_topic_length returned by the POST /register endpoint to determine the maximum topic length.

Note: When "(no topic)" or the value of realm_empty_topic_display_name found in the POST /register response is used for this parameter, it is interpreted as an empty string.

When topics are required, this parameter can't be "(no topic)", an empty string, or the value of realm_empty_topic_display_name.

Changes: Before Zulip 10.0 (feature level 370), "(no topic)" was not interpreted as an empty string.

Before Zulip 10.0 (feature level 334), empty string was not a valid topic name for channel messages.

type String No

The type of scheduled message to be sent. "direct" for a direct message and "stream" or "channel" for a channel message.

When updating the type of the scheduled message, the to parameter is required. And, if updating the type of the scheduled message to "stream"/"channel", then the topic parameter is also required.

Note that, while "private" is supported for scheduling direct messages, clients are encouraged to use to the modern convention of "direct" to indicate this message type, because support for "private" may eventually be removed.

Changes: In Zulip 9.0 (feature level 248), "channel" was added as an additional value for this parameter to indicate the type of a channel message.

Valid values:

  • "channel"
  • "private"
  • "stream"
  • "direct"
content String No

The updated content of the scheduled message.

Clients should use the max_message_length returned by the POST /register endpoint to determine the maximum message size.

scheduled_delivery_timestamp Integer No

The UNIX timestamp for when the message will be sent, in UTC seconds.

Required when updating a scheduled message that the server has already tried and failed to send. This state is indicated with "failed": true in scheduled_messages objects; see response description at GET /scheduled_messages.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.