DocumentationBlogSupport
Log inSign up
Log inSign up
BlogSupport
Build
Getting StartedPlatform Introduction
Embedded Apps
OverviewDeveloper GuideSubmission Checklist for Embedded Apps
Design Guidelines
MeetingsMessagingDevices
API Reference
BotsButtons and CardsIntegrationsLogin with WebexWidgetsGuest IssuerWebex ConnectInstant Connect Meeting LinksDeveloper SandboxSubmit Your AppSupport PolicyFAQs
APIs
XML API DeprecationGetting StartedREST API BasicsComplianceWebhooksWebex APIs
Admin
OverviewAdmin APIsAuthentication
Guides
Hybrid ServicesWebhooksReal-time File DLP Basics
Reference
Admin Audit EventsAuthorizationsEventsGroupsHistorical AnalyticsHybrid ClustersHybrid ConnectorsLicensesLocationsMeeting QualitiesOrganizationsPeopleRecording ReportRecordingsReport TemplatesReportsResource Group MembershipsResource GroupsRolesSession TypesSpace ClassificationsTracking CodesWebex Calling Organization SettingsWebex Calling Person SettingsWebex Calling Workspace SettingsWholesale Billing ReportsWorkspace LocationsWorkspace MetricsWorkspaces
Calling
Overview
Guides
Integrations and AuthorizationWebex for BroadWorksWebex for WholesaleWholesale and Broadworks Common Guide
Reference
BroadWorks Billing ReportsBroadWorks Device ProvisioningBroadWorks EnterprisesBroadWorks SubscribersCall ControlsLocationsPeopleRecording ReportVideo MeshWebex Calling Detailed Call HistoryWebex Calling Organization SettingsWebex Calling Person SettingsWebex Calling Voice MessagingWebex Calling Workspace SettingsWholesale Billing ReportsWholesale CustomersWholesale Subscribers
Contact Center
Overview
Devices
Overview
Guides
DevicesWorkspace Integrations Guide
Reference
Device ConfigurationsDevicesWorkspace LocationsWorkspace MetricsWorkspace PersonalizationWorkspacesxAPI
Meetings
Overview
Guides
Integrations and AuthorizationWebhooksWebinar GuideMeeting Resource Guide
Reference
Meeting ChatsMeeting Closed CaptionsMeeting InviteesMeeting MessagesMeeting ParticipantsMeeting PollsMeeting PreferencesMeeting Q and AMeeting QualitiesMeeting TranscriptsMeetingsMeetings Summary ReportPeopleRecording ReportRecordingsSession TypesTracking CodesVideo MeshWebhooks
Messaging
Overview
Guides
BotsIntegrations and AuthorizationWebhooksButtons and Cards
Reference
Attachment ActionsEventsMembershipsMessages
GETList Messages
GETList Direct Messages
POSTCreate a Message
PUTEdit a Message
GETGet Message Details
DELETEDelete a Message
PeopleRoom TabsRoomsTeam MembershipsTeamsTracking CodesWebhooks
Webex Assistant Skills
Guides
Skills SDK GuideSkills Developer PortalSkills Reference GuideSkills UX Guide
Overview
FedRAMP
Overview
Guides
Create a BotCreate an IntegrationNotes on API Support
Full API Reference
Admin Audit EventsAttachment ActionsAuthorizationsBroadWorks Billing ReportsBroadWorks Device ProvisioningBroadWorks EnterprisesBroadWorks SubscribersCall ControlsDevice ConfigurationsDevicesEventsGroupsHistorical AnalyticsHybrid ClustersHybrid ConnectorsLicensesLocationsMeeting ChatsMeeting Closed CaptionsMeeting InviteesMeeting MessagesMeeting ParticipantsMeeting PollsMeeting PreferencesMeeting Q and AMeeting QualitiesMeeting TranscriptsMeetingsMeetings Summary ReportMembershipsMessages
GETList Messages
GETList Direct Messages
POSTCreate a Message
PUTEdit a Message
GETGet Message Details
DELETEDelete a Message
OrganizationsPeopleRecording ReportRecordingsReport TemplatesReportsResource Group MembershipsResource GroupsRolesRoom TabsRoomsSession TypesSiteSpace ClassificationsTeam MembershipsTeamsTracking CodesVideo MeshWebex Calling Detailed Call HistoryWebex Calling Organization SettingsWebex Calling Person SettingsWebex Calling Voice MessagingWebex Calling Workspace SettingsWebhooksWholesale Billing ReportsWholesale CustomersWholesale SubscribersWorkspace LocationsWorkspace MetricsWorkspace PersonalizationWorkspacesxAPI
API Changelog
SDKs
iOSAndroidBrowserNode.jsJava
Developer CommunityCertifications

List Messages

Lists all messages in a room. Each message will include content attachments if present.

The list sorts the messages in descending order by creation date.

Long result sets will be split into pages.

GET/v1/messages
Query Parameters
roomId
stringrequired

List messages in a room, by ID.

parentId
string

List messages with a parent, by ID.

mentionedPeople
array

List messages with these people mentioned, by ID. Use me as a shorthand for the current API user. Only me or the person ID of the current user may be specified. Bots must include this parameter to list messages in group rooms (spaces).

before
string

List messages sent before a date and time.

beforeMessage
string

List messages sent before a message, by ID.

max
number

Limit the maximum number of messages in the response.

Default: 50
Response Properties
items
array[List Message]
id
string

The unique identifier for the message.

parentId
string

The unique identifier for the parent message.

roomId
string

The room ID of the message.

roomType
enum

The type of room.

direct
string

1:1 room

group
string

group room

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.

html
string

The text content of the message, in HTML format. This read-only property is used by the Webex clients.

files
array[string]

Public URLs for files attached to the message. For the supported media types and the behavior of file uploads, see Message Attachments.

personId
string

The person ID of the message author.

personEmail
string

The email address of the message author.

mentionedPeople
array[string]

People IDs for anyone mentioned in the message.

mentionedGroups
array[string]

Group names for the groups mentioned in the message.

attachments
array[Attachment]

Message content attachments attached to the message. See the Cards Guide for more information.

contentType
string

The content type of the attachment.

content
Adaptive Card

Adaptive Card content.

type
string

Must be AdaptiveCard.

version
string

Adaptive Card schema version.

body
array[object]

The card's elements.

type
string
Possible values: TextBlock
text
string
Possible values: Adaptive Cards
size
string
Possible values: large
actions
array[object]

The card's actions.

type
string
Possible values: Action.OpenUrl
url
string
Possible values: http://adaptivecards.io
title
string
Possible values: Learn More
created
string

The date and time the message was created.

updated
string

The date and time that the message was last edited by the author. This field is only present when the message contents have changed.

isVoiceClip
boolean

true if the audio file is a voice clip recorded by the client; false if the audio file is a standard audio file not posted using the voice clip feature.

Response Codes

The list below describes the common success and error responses you should expect from the API.

CodeStatusDescription
200OKSuccessful request with body content.
201CreatedThe request has succeeded and has led to the creation of a resource.
202AcceptedThe request has been accepted for processing.
204No ContentSuccessful request without body content.
400Bad RequestThe request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401UnauthorizedAuthentication credentials were missing or incorrect.
403ForbiddenThe request is understood, but it has been refused or access is not allowed.
404Not FoundThe 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.
405Method Not AllowedThe request was made to a resource using an HTTP request method that is not supported.
409ConflictThe 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.
410GoneThe requested resource is no longer available.
415Unsupported Media TypeThe request was made to a resource without specifying a media type or used a media type that is not supported.
423LockedThe requested resource is temporarily unavailable. A Retry-After header may be present that specifies how many seconds you need to wait before attempting the request again.
428Precondition RequiredFile(s) cannot be scanned for malware and need to be force downloaded.
429Too Many RequestsToo 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.
500Internal Server ErrorSomething went wrong on the server. If the issue persists, feel free to contact the Webex Developer Support team.
502Bad GatewayThe server received an invalid response from an upstream server while processing the request. Try again later.
503Service UnavailableServer is overloaded with requests. Try again later.
504Gateway TimeoutAn upstream server failed to respond on time. If your query uses max parameter, please try to reduce it.
  • Try it
  • Example
GET
/v1/messages{?roomId,parentId,mentionedPeople,before,beforeMessage,max}
Log in to try the API.
Header
Query Parameters
  • List messages in a room, by ID.
  • List messages with a parent, by ID.
  • List messages with these people mentioned, by ID. Use `me` as a shorthand for the current API user. Only `me` or the person ID of the current user may be specified. Bots must include this parameter to list messages in group rooms (spaces).
  • List messages sent before a date and time.
  • List messages sent before a message, by ID.
  • Limit the maximum number of messages in the response.
  • Request
  • Response
https://webexapis.com/v1/messages?roomId=Y2lzY29zcGFyazovL3VzL1JPT00vYmJjZWIxYWQtNDNmMS0zYjU4LTkxNDctZjE0YmIwYzRkMTU0&parentId=Y2lzY29zcGFyazovL3VzL01FU1NBR0UvZWM1ZTIzZjAtN2RhMS0xMWU5LTg2NTgtZTkzYzNiODZjZmFm&mentionedPeople=Y2lzY29zcGFyazovL3VzL1BFT1BMRS8yNDlmNzRkOS1kYjhhLTQzY2EtODk2Yi04NzllZDI0MGFjNTM&before=2016-04-21T19:01:55.966Z&beforeMessage=Y2lzY29zcGFyazovL3VzL01FU1NBR0UvOTJkYjNiZTAtNDNiZC0xMWU2LThhZTktZGQ1YjNkZmM1NjVk&max=100
200 / OK
{
  "items": [
    {
      "id": "Y2lzY29zcGFyazovL3VzL01FU1NBR0UvOTJkYjNiZTAtNDNiZC0xMWU2LThhZTktZGQ1YjNkZmM1NjVk",
      "parentId": "Y2lzY29zcGFyazovL3VzL01FU1NBR0UvOTJkYjNiZTAtNDNiZC0xMWU2LThhZTktZGQ1YjNkZmM1NjVk",
      "roomId": "Y2lzY29zcGFyazovL3VzL1JPT00vYmJjZWIxYWQtNDNmMS0zYjU4LTkxNDctZjE0YmIwYzRkMTU0",
      "roomType": "group",
      "text": "PROJECT UPDATE - A new project plan has been published on http://example.com/s/lf5vj. The PM for this project is Mike C. and the Engineering Manager is Jane W.",
      "markdown": "**PROJECT UPDATE** A new project plan has been published on <http://example.com/s/lf5vj>. The PM for this project is <@personEmail:mike@example.com> and the Engineering Manager is <@personEmail:jane@example.com>.",
      "html": "<p><strong>PROJECT UPDATE</strong> A new project plan has been published <a href=\\\"http://example.com/s/lf5vj\\\" rel=\\\"nofollow\\\">here</a>. The PM for this project is mike@example.com and the Engineering Manager is jane@example.com.</p>",
      "files": [
        "http://www.example.com/images/media.png"
      ],
      "personId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mNWIzNjE4Ny1jOGRkLTQ3MjctOGIyZi1mOWM0NDdmMjkwNDY",
      "personEmail": "matt@example.com",
      "mentionedPeople": [
        "Y2lzY29zcGFyazovL3VzL1BFT1BMRS8yNDlmNzRkOS1kYjhhLTQzY2EtODk2Yi04NzllZDI0MGFjNTM",
        "Y2lzY29zcGFyazovL3VzL1BFT1BMRS83YWYyZjcyYy0xZDk1LTQxZjAtYTcxNi00MjlmZmNmYmM0ZDg"
      ],
      "mentionedGroups": [
        "all"
      ],
      "attachments": [
        {
          "contentType": "application/vnd.microsoft.card.adaptive",
          "content": {
            "type": "AdaptiveCard",
            "version": "1.0",
            "body": [
              {
                "type": "TextBlock",
                "text": "Adaptive Cards",
                "size": "large"
              }
            ],
            "actions": [
              {
                "type": "Action.OpenUrl",
                "url": "http://adaptivecards.io",
                "title": "Learn More"
              }
            ]
          }
        }
      ],
      "created": "2015-10-18T14:26:16+00:00",
      "updated": "2015-10-18T14:27:16+00:00",
      "isVoiceClip": false
    }
  ]
}

Connect

Support

Developer Events

Contact Sales

Handy Links

Webex Ambassadors

Webex App Hub

Resources

Open Source Bot Starter Kits

Download Webex

DevNet Learning Labs

Terms of Service

Privacy Policy

Cookie Policy

Trademarks

© 2023 Cisco and/or its affiliates. All rights reserved.