Query parameters

  • page number

    Current page

  • pageSize number

    Number of items per page

  • selectAll boolean

    Determines if all items are selected

  • where object

    App\Messages\Core\Models\Message Filters: 0, 1, 2

    Hide where attributes Show where attributes object
  • sort object

    App\Messages\Core\Models\Message Sorting by

Responses

  • 200 application/json

    Paginated response

    Hide response attributes Show response attributes object
    • data array[object] Required

      Messages schema

      Hide data attributes Show data attributes object
      • entity object Required

        Messages schema

        Hide entity attributes Show entity attributes object
        • id string Required

          id

        • companyId string Required

          Company ID

        • type string Required

          Values are staff_invitation, family_invitation, or custom.

        • subject string Required

          Subject

        • body string Required

          Body

        • fromName string Required

          From name

        • fromEmail string Required

          From email

        • status string Required

          Values are draft, pending, or sent.

        • sentAt string(date-time) | null Required

          Sent at

        • updatedAt string(date-time) Required

          Updated at

        • attachments array[string] Required

          Attachments

      • stats object Required

        Message stats schema

        Hide stats attributes Show stats attributes object
        • messageId string Required

          Message ID

        • recipients object Required

          Recipient stats schema

          Hide recipients attribute Show recipients attribute object
          • count integer Required

            Total Count (All exc archived and deleted)

    • pagination object Required

      Pagination schema

      Hide pagination attributes Show pagination attributes object
      • total integer Required

        Total number of items

      • count integer Required

        Number of items on this page

      • perPage integer

        Number of items per page

      • currentPage integer

        Current page number

      • totalPages integer

        Total number of pages

  • 403 application/json

    Not authorized

    Hide response attributes Show response attributes object

    Error schema

    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

GET /v1/messages/
curl \
 --request GET 'https://classmanager.test/v1/messages/'
Response examples (200)
{
  "data": [
    {
      "entity": {
        "id": "msg_123123123123",
        "companyId": "co_123123123123",
        "type": "staff_invitation",
        "subject": "Happy Birthday",
        "body": "Body",
        "fromName": "John Doe",
        "fromEmail": "sample@example.com",
        "status": "draft",
        "sentAt": "2024-06-12T09:39:49.000000Z",
        "updatedAt": "2024-06-12T09:39:49.000000Z",
        "attachments": [
          "string"
        ]
      },
      "stats": {
        "messageId": "msg_xxxxxxxxxxxxxxxxxxxxxxxxxx",
        "recipients": {
          "count": 10
        }
      }
    }
  ],
  "pagination": {
    "total": 15,
    "count": 10,
    "perPage": 10,
    "currentPage": 1,
    "totalPages": 2
  }
}
Response examples (403)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}