# List messages

## Gets a list of resources.

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

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5164-g77db55e8"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/notifications/messages":{"get":{"tags":["Messages"],"summary":"Gets a list of resources.","description":"Supports RQL filtering, sorting, and pagination via query string parameters.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"MessageListResponse":{"type":"object","properties":{"$meta":{"allOf":[{"$ref":"#/components/schemas/ListMetadata"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}},"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},"Message":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/MessageAudit"}],"description":"Represents audit information for a Mpt.Notifications.Models.Messages.Message."},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"account":{"allOf":[{"$ref":"#/components/schemas/Account"}],"description":"Gets or sets the account associated with this message, if applicable.","nullable":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"},"description":"Gets or sets the list of file attachments included with this message.","nullable":true},"batch":{"type":"object","allOf":[{"$ref":"#/components/schemas/BatchRef"}]},"body":{"type":"string","description":"Gets or sets the body content of the message.","nullable":true},"category":{"allOf":[{"$ref":"#/components/schemas/Category"}],"description":"Gets or sets the category to which this message belongs."},"contact":{"allOf":[{"$ref":"#/components/schemas/Contact"}],"description":"Gets or sets the recipient contact for this message."},"discardReason":{"type":"string","description":"Gets or sets the reason the message was discarded, if applicable.","nullable":true,"deprecated":true},"template":{"type":"object","allOf":[{"$ref":"#/components/schemas/NotificationTemplateRef"}]},"status":{"type":"string","description":"Gets or sets the current status of the message."},"statusReason":{"type":"string","description":"Gets or sets the reason for the current status.","nullable":true},"subject":{"type":"string","description":"Gets or sets the subject of the message."}},"additionalProperties":false,"description":"Represents an individual notification message sent to a specific contact."},"MessageAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"queued":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the message was queued for sending.","nullable":true},"discarded":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the message was discarded.","nullable":true},"sent":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the message was successfully sent.","nullable":true},"bounced":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the message bounced.","nullable":true},"complained":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when a complaint was received about the message.","nullable":true},"failed":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the message failed to send.","nullable":true}},"additionalProperties":false,"description":"Represents audit information for a Mpt.Notifications.Models.Messages.Message."},"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},"Account":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/AccountType"}],"nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/AccountStatus"}],"nullable":true},"externalIds":{"allOf":[{"$ref":"#/components/schemas/AccountExternalIds"}],"nullable":true},"externalId":{"type":"string","nullable":true},"externalName":{"type":"string","nullable":true},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}]},"technicalSupportEmail":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"groups":{"type":"array","items":{"$ref":"#/components/schemas/UserGroupRef"},"nullable":true},"eligibility":{"allOf":[{"$ref":"#/components/schemas/Eligibility"}],"nullable":true},"defaultLanguageCode":{"type":"string","nullable":true}},"additionalProperties":false},"PlatformObjectAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"AccountType":{"enum":["Client","Vendor","Operations"],"type":"string"},"AccountStatus":{"enum":["Active","Enabled","Disabled"],"type":"string"},"AccountExternalIds":{"type":"object","properties":{"pyraTenantId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Address":{"type":"object","properties":{"addressLine1":{"type":"string","nullable":true},"addressLine2":{"type":"string","nullable":true},"postCode":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true}},"additionalProperties":false},"UserGroupRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"description":{"type":"string","nullable":true},"logo":{"type":"string","nullable":true},"isDefault":{"type":"boolean"}},"additionalProperties":false},"Eligibility":{"type":"object","properties":{"client":{"type":"boolean"},"partner":{"type":"boolean"}},"additionalProperties":false},"Attachment":{"type":"object","properties":{"id":{"type":"string","description":"Gets or sets the unique identifier for the attachment."},"href":{"type":"string","description":"Gets the URL to download the attachment.","nullable":true,"readOnly":true},"name":{"type":"string","description":"Gets or sets the display name for the attachment."},"fileName":{"type":"string","description":"Gets or sets the file name of the attachment."},"fileSize":{"type":"integer","description":"Gets or sets the size of the attachment in bytes.","format":"int32"},"contentType":{"type":"string","description":"Gets or sets the content type of the attachment."}},"additionalProperties":false,"description":"Represents a file attachment associated with a notification message or batch."},"BatchRef":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"integer","format":"int32"},"account":{"allOf":[{"$ref":"#/components/schemas/Account"}],"description":"Gets or sets the account associated with this batch, if applicable.","nullable":true},"category":{"allOf":[{"$ref":"#/components/schemas/Category"}],"description":"Gets or sets the category to which this batch belongs."},"template":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplate"}],"description":"Gets or sets the template used to create this batch, if applicable.","nullable":true},"status":{"type":"string","description":"Gets or sets the current status of the batch."},"type":{"type":"string","description":"Gets or sets the type of batch."}},"additionalProperties":false,"description":"Represents a batch of notification messages that share common properties."},"Category":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/NotificationCategoryAudit"}],"description":"Represents audit information for a Mpt.Notifications.Models.Categories.Category."},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"description":{"type":"string","description":"Gets or sets the description of the category."},"optOutAllowed":{"type":"boolean","description":"Gets or sets a value indicating whether recipients can opt out of notifications in this category."},"status":{"type":"string","description":"Gets or sets the current status of the category."},"note":{"type":"string","description":"Gets or sets an optional note about the category.","nullable":true},"deleteAllowed":{"type":"boolean","description":"Gets or sets a value indicating whether this category can be deleted."},"statistics":{"allOf":[{"$ref":"#/components/schemas/MessageStatistics"}],"description":"Gets or sets the message statistics for this category."},"lastUsed":{"type":"string","description":"Gets or sets the timestamp of when this category was last used to send a notification.","format":"date-time","nullable":true},"enabledByDefault":{"type":"boolean","description":"Gets or sets a value indicating whether this category is enabled by default for new recipients."}},"additionalProperties":false,"description":"Represents a notification category that can be used to organize and filter notifications."},"NotificationCategoryAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"published":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the category was published.","nullable":true},"unpublished":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the category was unpublished.","nullable":true},"deleted":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the category was deleted.","nullable":true}},"additionalProperties":false,"description":"Represents audit information for a Mpt.Notifications.Models.Categories.Category."},"MessageStatistics":{"type":"object","properties":{"month":{"type":"integer","description":"Gets or sets the number of messages sent in the current month.","format":"int32"},"today":{"type":"integer","description":"Gets or sets the number of messages sent today.","format":"int32"},"week":{"type":"integer","description":"Gets or sets the number of messages sent in the current week.","format":"int32"}},"additionalProperties":false,"description":"Represents message statistics aggregated over different time periods."},"NotificationTemplate":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplateAudit"}],"description":"Represents audit information for a Mpt.Notifications.Models.NotificationTemplates.NotificationTemplate."},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"category":{"type":"object","allOf":[{"$ref":"#/components/schemas/CategoryRef"}]},"criteria":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplateCriteria"}],"description":"Gets or sets the criteria for automatic triggering of this template based on events.","nullable":true},"defaultVariant":{"type":"object","allOf":[{"$ref":"#/components/schemas/TemplateVariantRef"}]},"description":{"type":"string","description":"Gets or sets the description of this template.","nullable":true},"lastUsed":{"type":"string","description":"Gets or sets the timestamp of when this template was last used to send a notification.","format":"date-time","nullable":true},"owner":{"type":"object","allOf":[{"$ref":"#/components/schemas/AccountRef"}]},"statistics":{"allOf":[{"$ref":"#/components/schemas/MessageStatistics"}],"description":"Gets or sets the usage statistics for this template."},"status":{"type":"string","description":"Gets or sets the current status of the template."},"variants":{"type":"array","items":{"$ref":"#/components/schemas/TemplateVariantRef"},"description":"Gets or sets the list of language-specific variants for this template."},"externalId":{"type":"string","description":"Gets or sets an external identifier for integration with external systems.","nullable":true}},"additionalProperties":false,"description":"Represents a reusable template that can be used to generate messages."},"NotificationTemplateAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"activated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the template was activated.","nullable":true},"deleted":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the template was deleted.","nullable":true},"disabled":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the template was disabled.","nullable":true}},"additionalProperties":false,"description":"Represents audit information for a Mpt.Notifications.Models.NotificationTemplates.NotificationTemplate."},"CategoryRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"description":{"type":"string","description":"Gets or sets the description of the category."},"lastUsed":{"type":"string","description":"Gets or sets the timestamp of when this category was last used to send a notification.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents a notification category that can be used to organize and filter notifications."},"NotificationTemplateCriteria":{"type":"object","properties":{"accountTypes":{"type":"array","items":{"type":"string"},"description":"Gets or sets the list of account types for which this template should trigger."},"filterCondition":{"type":"string","description":"Gets or sets the RQL filter condition that must be satisfied for the template to trigger."},"objectType":{"type":"string","description":"Gets or sets the platform object type this template monitors."},"recipients":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplateCriteriaRecipients"}],"description":"Gets or sets the custom Recipients condition. If specified, this RQL condition determines the recipients of the notification.","nullable":true}},"additionalProperties":false,"description":"Represents the criteria for automatically triggering a template based on platform events."},"NotificationTemplateCriteriaRecipients":{"type":"object","properties":{"selector":{"type":"string","description":"Gets or sets the RQL filter condition that must be satisfied for the template to trigger."}},"additionalProperties":false,"description":"Represents the recipients criteria for automatically triggering a template based on platform events."},"TemplateVariantRef":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"integer","format":"int32"},"default":{"type":"boolean","description":"Gets or sets a value indicating whether this is the default variant for the parent template."},"languageCode":{"type":"string","description":"Gets or sets the language code for this variant."},"status":{"type":"string","description":"Gets or sets the current status of the variant."}},"additionalProperties":false,"description":"Represents a language-specific variant of a template."},"AccountRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/AccountType"}],"nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/AccountStatus"}],"nullable":true}},"additionalProperties":false},"Contact":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"name":{"type":"string","nullable":true},"blockedReason":{"type":"string","nullable":true},"email":{"type":"string"},"status":{"type":"string"},"identity":{"allOf":[{"$ref":"#/components/schemas/PlatformIdentity"}],"nullable":true},"directories":{"type":"array","items":{"$ref":"#/components/schemas/Directory"},"nullable":true},"chat":{"type":"boolean"}},"additionalProperties":false},"PlatformIdentity":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"Directory":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"account":{"allOf":[{"$ref":"#/components/schemas/Account"}]},"origin":{"allOf":[{"$ref":"#/components/schemas/Account"}],"nullable":true},"type":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}}},"additionalProperties":false},"NotificationTemplateRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"lastUsed":{"type":"string","description":"Gets or sets the timestamp of when this template was last used to send a notification.","format":"date-time","nullable":true},"status":{"type":"string","description":"Gets or sets the current status of the template."}},"additionalProperties":false,"description":"Represents a reusable template that can be used to generate messages."},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```
