Edit a draft

Edit a draft on the server. The edit will be automatically synchronized to other clients via drafts events.

PATCH https://yourZulipDomain.zulipchat.com/api/v1/drafts/{draft_id}

Usage examples

curl -sSX PATCH https://yourZulipDomain.zulipchat.com/api/v1/drafts/2 \
    --data-urlencode 'draft={"content": "how tough is a Lamy Safari?", "timestamp": 1595479019, "to": [1], "topic": "questions", "type": "stream"}'


draft_id integer required in path

Example: 2

The ID of the draft to be edited.

draft object required

Example: {"type": "stream", "to": [1], "topic": "questions", "content": "how tough is a Lamy Safari?", "timestamp": 1595479019}

A JSON-encoded object containing a replacement draft object for this ID.


Example response

A typical successful JSON response may look like:

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

JSON response for when no draft exists with the provided ID.

    "msg": "Draft does not exist",
    "result": "error"