> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yorlet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a message

> Retrieve a message



## OpenAPI

````yaml openapi-loyalty.json GET /v1/loyalty/messages/{id}
openapi: 3.1.0
info:
  title: Yorlet Loyalty API
  description: APIs for managing loyalty programs, events, messages, residents, and tiers.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/loyalty/messages/{id}:
    get:
      tags:
        - Loyalty Messages
      summary: Retrieve a message
      description: Retrieve a message
      operationId: loyalty_messages_retrieve
      parameters:
        - schema:
            type: string
            description: The id identifier.
          required: true
          description: The id identifier.
          name: id
          in: path
      responses:
        '200':
          description: Retrieve a message
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - loyalty.message
                  body:
                    type: string
                    description: The body of the message shown to the recipient.
                  category:
                    type:
                      - string
                      - 'null'
                    enum:
                      - announcement
                      - event
                      - offer
                      - alert
                      - null
                    title: Category
                    description: >-
                      The category of the message. `null` when the message is
                      not categorised.
                  delivery:
                    type: object
                    properties:
                      attempted:
                        type: integer
                        description: >-
                          The number of push notifications that were sent to the
                          push provider.
                      delivered:
                        type: integer
                        description: >-
                          The number of push notifications the push provider
                          accepted.
                      failed:
                        type: integer
                        description: >-
                          The number of push notifications the push provider
                          rejected.
                      read:
                        type: integer
                        default: 0
                        description: >-
                          The number of recipients that have read the message in
                          the OneMove app.
                      skipped:
                        type: integer
                        description: >-
                          The number of recipients that were skipped because
                          they do not use OneMove or have no notifications
                          enabled.
                    title: Delivery
                    description: A summary of the delivery attempts for the message.
                    required:
                      - attempted
                      - delivered
                      - failed
                      - skipped
                  failure_code:
                    type:
                      - string
                      - 'null'
                    enum:
                      - no_onemove_user
                      - no_device_tokens
                      - send_error
                      - null
                    description: >-
                      The reason the message could not be delivered, if it
                      failed.
                  recipient:
                    oneOf:
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - building
                          building:
                            type: string
                            pattern: ^[a-zA-Z0-9_]+$
                            description: The building ID
                        title: Building
                        description: >-
                          Send the message to every active resident in a
                          building.
                        required:
                          - type
                          - building
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - customer
                          customer:
                            type: string
                            minLength: 1
                            description: The customer ID
                        required:
                          - type
                          - customer
                    description: The recipient of the message.
                  sent_at:
                    type:
                      - integer
                      - 'null'
                    description: The date and time the message was sent.
                  status:
                    type: string
                    enum:
                      - failed
                      - pending
                      - sent
                    description: The status of the message.
                  title:
                    type: string
                    description: The title of the message shown to the recipient.
                required:
                  - id
                  - created
                  - object
                  - body
                  - category
                  - delivery
                  - failure_code
                  - recipient
                  - sent_at
                  - status
                  - title
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````