# List Chat Messages

## Get a list of messages for a chat

> Supports filtering, sorting, and pagination via query string parameters.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5102-g2bf281b6"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/helpdesk/chats/{chatId}/messages":{"get":{"tags":["Message"],"summary":"Get a list of messages for a chat","description":"Supports filtering, sorting, and pagination via query string parameters.","parameters":[{"name":"chatId","in":"path","description":"The chat ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageListResponse"}}}}}}}},"components":{"schemas":{"ChatMessageListResponse":{"type":"object","properties":{"$meta":{"allOf":[{"$ref":"#/components/schemas/ListMetadata"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}}},"additionalProperties":false},"ListMetadata":{"type":"object","properties":{"pagination":{"allOf":[{"$ref":"#/components/schemas/PaginationMetadata"}]},"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"PaginationMetadata":{"type":"object","properties":{"offset":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32","nullable":true}},"additionalProperties":false},"ChatMessage":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/ChatMessageAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"chat":{"type":"object","allOf":[{"$ref":"#/components/schemas/ChatRef"}]},"sender":{"type":"object","allOf":[{"$ref":"#/components/schemas/ChatParticipantRef"}]},"content":{"type":"string","description":"Content of the chat message."},"visibility":{"allOf":[{"$ref":"#/components/schemas/MessageVisibility"}],"description":"Visibility of the chat message, indicating whether it is public or private."},"isDeleted":{"type":"boolean","description":"Set to true when the message should be considered deleted"},"links":{"type":"array","items":{"$ref":"#/components/schemas/ChatLinkRef"}},"identity":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]}},"additionalProperties":false},"ChatMessageAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"deleted":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"madePublic":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"madePrivate":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"PlatformObjectEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]}},"additionalProperties":false},"PlatformIdentityRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"PlatformMetadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"ChatRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/ChatType"}],"description":"Represents the type of chat, indicating whether it is a direct message, group chat, channel, or support case."}},"additionalProperties":false},"ChatType":{"enum":["Direct","Group","Channel","Case"],"type":"string"},"ChatParticipantRef":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"integer","format":"int32"},"muted":{"type":"boolean","description":"Flag indicates whether participant should be notified of new messages in the chat."},"status":{"allOf":[{"$ref":"#/components/schemas/ParticipantStatus"}],"description":"Represents the status of the chat participant, indicating whether they are active, suspended, or exited."}},"additionalProperties":false},"ParticipantStatus":{"enum":["Active","Exited","Deactivated"],"type":"string"},"MessageVisibility":{"enum":["Public","Private"],"type":"string"},"ChatLinkRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"message":{"allOf":[{"$ref":"#/components/schemas/ChatMessage"}],"description":"Represents the message this link belongs to."},"uri":{"type":"string","description":"Represents the URI for link.","nullable":true},"objectId":{"type":"string","description":"Represents the ObjectId for link.","nullable":true}},"additionalProperties":false}}}}
```
