v1

latestOpenAPI 3.0.02026-07-2447166133.5 KB
Media

Upload media

This operation uploads media such a images, videos, and files to Spruce for use in messaging. Uploading a file will return a media ID that can be used to reference the file in other operations. Callers of this API should record the resulting media ID for future use. A media ID can be used in the attachmentID field of the conversation message post attachment. Media IDs can be used multiple times. The Content-Type and Content-Disposition headers on the multipart media field can use used to provide additional metadata about the media. This metadata can impact how the media is displayed and downloaded from the application.

Example Headers

  • Content-Disposition: form-data; name="media"; filename="image.png"
  • Content-Type: image/png
post/media

Response

An array of messages that are scheduled for the organization

idstring required

Spruce's media message ID

objectstring required

String representing the object's type

Example response

{
  "id": "d7b25969-86ec-7e37-3776-3577-c0637a0c"
}