# Messages A Message represents a change or an action performed on a resource, for example an Order or a Product. Messages are available in a variety of Message Types specific to a resource. Common fields across [Message Types](https://docs.commercetools.com/api/projects/messages.md#message-types) are represented by a base resource, [Message](https://docs.commercetools.com/api/projects/messages.md#message). In addition to these common fields, each Message contains further fields related to a particular change or action (for example, the field `firstName` is present on a [CustomerFirstNameSet](https://docs.commercetools.com/api/projects/messages/customer-messages.md#customer-first-name-set) Message). You can access Messages either by retrieving them from the API, or by subscribing to them with a [Subscription](https://docs.commercetools.com/api/projects/subscriptions.md). To retrieve them from the API, you must [enable the feature](https://docs.commercetools.com/api/projects/messages.md#enable-querying-messages-via-the-api) first. ## Message Types To see a list of available Message Types for a specific resource, use the following table: (a CSV formatted table follows. The first line are the column names.) Messages page,Represented resources [Approval Rule and Approval Flow Messages](https://docs.commercetools.com/api/projects/messages/approval-rule-approval-flow-messages.md) ,Approval Rules, Approval Flows [Business Unit and Associate Role Messages](https://docs.commercetools.com/api/projects/messages/business-unit-associate-role-messages.md) ,Business Units, Associate Roles [Cart and Order Messages](https://docs.commercetools.com/api/projects/messages/cart-order-messages.md),Carts, Orders, Recurring Orders, Order Edits [Approval Rule and Approval Flow Messages](https://docs.commercetools.com/api/projects/messages/approval-rule-approval-flow-messages.md) ,Approval Rules, Approval Flows [Business Unit and Associate Role Messages](https://docs.commercetools.com/api/projects/messages/business-unit-associate-role-messages.md) ,Business Units, Associate Roles [Cart and Order Messages](https://docs.commercetools.com/api/projects/messages/cart-order-messages.md),Carts, Orders, Order Edits, Recurring Orders [Customer Messages](https://docs.commercetools.com/api/projects/messages/customer-messages.md),Customers, Customer Tokens, Customer Groups [Payment Messages](https://docs.commercetools.com/api/projects/messages/payment-messages.md),Payments, Payment Methods [Pricing and Discount Messages](https://docs.commercetools.com/api/projects/messages/pricing-discount-messages.md),Cart Discounts, Discount Codes, Discount Groups, Standalone Prices [Product Catalog Messages](https://docs.commercetools.com/api/projects/messages/product-catalog-messages.md),Products, Product Selections, Product Tailorings, Categories, Inventory Entries, Reviews, Variants [Quote Messages](https://docs.commercetools.com/api/projects/messages/quote-messages.md),Quote Requests, Staged Quotes, Quotes [Shopping List Messages](https://docs.commercetools.com/api/projects/messages/shopping-list-messages.md),Shopping Lists [Store Messages](https://docs.commercetools.com/api/projects/messages/store-messages.md),Stores ## Representations #### Message See API type definition [Message](https://docs.commercetools.com/api/projects/messages.md?urn=ctp%3Aapi%3Atype%3AMessage). Message fields that can be used in [query predicates](https://docs.commercetools.com/api/predicates/query.md): `createdAt`, `lastModifiedAt`, `id`, `version`, `sequenceNumber`, `resource`, `resourceVersion`, `type`. #### MessagePagedQueryResponse See API type definition [MessagePagedQueryResponse](https://docs.commercetools.com/api/projects/messages.md?urn=ctp%3Aapi%3Atype%3AMessagePagedQueryResponse). #### UserProvidedIdentifiers See API type definition [UserProvidedIdentifiers](https://docs.commercetools.com/api/projects/messages.md?urn=ctp%3Aapi%3Atype%3AUserProvidedIdentifiers). ##### ContainerAndKey See API type definition [ContainerAndKey](https://docs.commercetools.com/api/projects/messages.md?urn=ctp%3Aapi%3Atype%3AContainerAndKey). ## Enable querying Messages via the API To optimize the performance of your Project, Messages are not persisted by default. To access Messages via the API, you must first enable the feature in the Settings > Developer Settings section of the Merchant Center. Alternatively, you can use the [Change Messages Configuration](https://docs.commercetools.com/api/projects/project.md#change-messages-configuration) update action. ## Get Message See API endpoint definition [GET /\{projectKey}/messages/\{id}](https://docs.commercetools.com/api/projects/messages.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fmessages%2F%7Bid%7D%3AGET). ## Query Messages See API endpoint definition [GET /\{projectKey}/messages](https://docs.commercetools.com/api/projects/messages.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fmessages%3AGET). ## Check if Message exists ### Check if Message exists by ID See API endpoint definition [HEAD /\{projectKey}/messages/\{id}](https://docs.commercetools.com/api/projects/messages.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fmessages%2F%7Bid%7D%3AHEAD). ### Check if Message exists by Query Predicate See API endpoint definition [HEAD /\{projectKey}/messages](https://docs.commercetools.com/api/projects/messages.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fmessages%3AHEAD). ## Related pages - [Section overview page](https://docs.commercetools.com/api.md) - [Previous page: Subscriptions](https://docs.commercetools.com/api/projects/subscriptions.md)