[ { "endpoint": "GET /api/v1/messages/latest", "example_response": "
{ \"messages\" : [ { \"client\" : \"website\",\n \"content\" : \"hi\",\n \"content_type\" : \"text/x-markdown\",\n \"display_recipient\" : [ { \"email\" : \"wdaher@example.com\",\n \"full_name\" : \"Waseem Daher\",\n \"short_name\" : \"wdaher\"\n },\n { \"email\" : \"othello-bot@example.com\",\n \"full_name\" : \"Othello, Moor of Venice\",\n \"short_name\" : \"othello-bot\"\n }\n ],\n \"gravatar_hash\" : \"948fcdfa93dd8986106032f1bad7f2c8\",\n \"id\" : 400,\n \"recipient_id\" : 101,\n \"sender_email\" : \"othello-bot@example.com\",\n \"sender_full_name\" : \"Othello, Moor of Venice\",\n \"sender_short_name\" : \"othello-bot\",\n \"subject\" : \"\",\n \"timestamp\" : 1365532669,\n \"type\" : \"private\"\n } ],\n \"msg\" : \"\",\n \"result\" : \"success\",\n \"update_types\" : [ \"new_messages\" ]\n}\n
client.get_messages()\n
curl -G https://api.zulip.com/v1/messages/latest \\\n -u othello-bot@example.com:a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 \\\n -d \"last=102345\"\n
{\"msg\": \"\", \"result\": \"success\"}\n
\nclient.send_message({\n \"type\": \"private\",\n \"to\": \"wdaher@example.com\",\n \"content\": \"I come not, friends, to steal away your hearts.\"\n})\nclient.send_message({\n \"type\": \"stream\",\n \"to\": \"Denmark\",\n \"subject\": \"Castle\",\n \"content\": \"Something is rotten in the state of Denmark.\"\n})\n
curl https://api.zulip.com/v1/messages \\\n -u BOT_EMAIL_ADDRESS:BOT_API_KEY \\\n -d \"type=stream\" \\\n -d \"to=Denmark\" \\\n -d \"subject=Castle\" \\\n -d \"content=Something is rotten in the state of Denmark.\"\n
curl https://api.zulip.com/v1/messages \\\n -u BOT_EMAIL_ADDRESS:BOT_API_KEY \\\n -d \"type=private\" \\\n -d \"to=wdaher@example.com\" \\\n -d \"content=I come not, friends, to steal away your hearts.\"\n