Create a Message

Posts a plain text message, and optionally, a media content attachment, to a room.

The files parameter is an array, which accepts multiple values to allow for future expansion, but currently only one file may be included with the message.

m
You're not logged in. to run the demo.
post
https://api.ciscospark.com/v1/messages

Request Headers

Content-type application/json; charset=utf-8
Authorization
Bearer

Request Parameters

Name Type Description
roomId string

The room ID.

toPersonId string

The ID of the recipient when sending a private 1:1 message.

toPersonEmail string

The email address of the recipient when sending a private 1:1 message.

text string

The message, in plain text. If markdown is specified this parameter may be optionally used to provide alternate text for UI clients that do not support rich text.

markdown string

The message, in markdown format.

files string[]

The public URL to a binary file to be posted into the room. Only one file is allowed per message. Uploaded files are automatically converted into a format that all Spark clients can render. For the supported media types and the behavior of uploads, see the Message Attachments Guide.

Request Parameters

Name Type Your values
roomId string
toPersonId string
toPersonEmail string
text string
markdown string
files string[] Separate multiple values with commas

Response Codes

200

OK

400

The request was invalid or cannot be otherwise served. An accompanying error message will explain further.

401

Authentication credentials were missing or incorrect.

403

The request is understood, but it has been refused or access is not allowed.

404

The URI requested is invalid or the resource requested, such as a user, does not exist. Also returned when the requested format is not supported by the requested method.

409

The request could not be processed because it conflicts with some established rule of the system. For example, a person may not be added to a room more than once.

429

Too many requests have been sent in a given amount of time and the request has been rate limited. A Retry-After header should be present that specifies how many seconds you need to wait before a successful request can be made.

500

Something went wrong on the server.

503

Server is overloaded with requests. Try again later.