API Method: POST message

Says something in the room.

Path:

/api/v2/rooms/#{room_id}/messages.#{format}

Formats:

xml, json

HTTP Method(s):

POST

Parameters:

Note that all parameters are encapsulated within a message array (see example)

  • text Required. The text of the message. The value must pass xhtml validation. Allowed tags are: a, br, em, b, i, span. All other tags will be removed. Don't forget to escape special characters.
  • kind Optional. The kind of the message. Can be chat (default), me or voice.

Usage examples:

$ curl -u api_token:x -d "message[text]=Hello" https://bigbang.jaconda.im/api/v2/rooms/developers/messages.xml

Response:

XML example:

<?xml version="1.0" encoding="UTF-8"?>
<message>
  <created-at type="datetime">2011-02-25T16:49:15+05:00</created-at>
  <id type="integer">5304167</id>
  <kind>chat</kind>
  <sender-id>18265</sender-id>
  <sender-name>John</sender-name>
  <text>Hello</text>
  <updated-at type="datetime">2011-02-25T16:49:15+05:00</updated-at>
</message>