---
title: "Get all scheduled messages"
method: GET
path: "/api/v2/schedules"
tags: ["Scheduled Messages"]
---

# Get all scheduled messages

`GET /api/v2/schedules`

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Messages%3A%20Schedule%0A/getAllScheduledMessages" target="_blank">Try in sandbox</a><br>

## Query parameters

- `page` integer
- `limit` integer
- `status` 'a' | 'c' | 'x'
- `orderBy` 'id' | 'nextSend' | 'lastSend'
- `direction` 'asc' | 'desc'

## Response `200`

Returned when successful.

- GetAllScheduledMessagesPaginatedResponse
  - `page` integer, required
  - `pageCount` integer, required — The total number of pages.
  - `limit` integer, required — The number of results per page.
  - `resources` MessagesIcs[], required
    - `id` integer, required — Schedule ID.
    - `nextSend` string, date-time, required — The next send date in [ISO 8601](https://en.wikipedia.org/?title=ISO_8601) format.
    - `rrule` string, nullable, required — [iCal RRULE](http://www.kanzaki.com/docs/ical/rrule.html) string.
    - `session` MessageSession, nullable, required
      - `id` integer, required — Session ID.
      - `startTime` string, nullable, required — Session creation time.
      - `text` string, nullable, required — Session text. If a template was used for the session text (see [Messages: Send](https://docs.textmagic.com/#tag/Outbound-Messages) for details), it may contain template tags.
      - `source` string, nullable, required — * **O** – for Textmagic Online; * **A** – for API; * **M** – for Textmagic Messenger; * **E** – for [Email to SMS](https://docs.textmagic.com/#tag/Send-Email-to-SMS); * **X** – for [Distribution Lists](https://docs.textmagic.com/#tag/Distribution-Lists).
      - `referenceId` string, nullable, required — Custom reference ID (see [Messages: Send](https://docs.textmagic.com/#tag/Send-Email-to-SMS) for details).
      - `price` number, nullable, required — Session cost (in account currency).
      - `numbersCount` integer, nullable, required — Session recipient count.
      - `destination` 't' | 's' | 'v', nullable, required — Destination type of a Message Session: * **t** – text SMS; * **s** – text-to-speech; * **v** – voice broadcast.
      - `initiatorId` integer, nullable, required — Initiator ID.
      - `title` string, nullable, required
    - `lastSent` string, date-time, nullable, required — The date and time when the last message was sent.
    - `contactName` string, required — Aggregated contact information. If the message was scheduled to be sent to a single contact, a full name will be returned here. Otherwise, a total amount of contacts will be returned.
    - `parameters` object, required
      - `text` string, required — Scheduled message text.
      - `recipients` object, required
        - `contacts` integer[], required
        - `groups` integer[], required
        - `numbers` string[], required
        - `filteredViews` integer[], required
    - `type` 'Once' | 'Hourly' | 'Daily' | 'Weekly' | 'Monthly' | 'Yearly', required
    - `summary` string, required — A human-readable summary of the sending schedule.
    - `textParameters` object, required
      - `cost` number, nullable, required — Cost to check that one number is constant – 0.04 in your account currency.
      - `parts` integer, nullable, required — Message parts (multiples of 160 characters) count.
      - `chars` integer, nullable, required — Characters count.
      - `encoding` 'ISO-8859-1' | 'UTF-16BE', nullable, required — Message charset. Could be: * **ISO-8859-1** – for plaintext SMS; * **UTF-16BE** – for Unicode SMS.
      - `countries` string[], nullable, required
      - `charsetLabel` string, nullable, required — Human-readable message charset label. Could be: * **ISO-8859-1** for plaintext SMS; * **UTF-16BE** for Unicode SMS; * **Voice** for voice services (Text-to-Speech or Voice Broadcast) messages.
    - `firstOccurrence` string, date-time, nullable, required — First occurence date.
    - `lastOccurrence` string, date-time, nullable, required — Last occurence date (could be `null` if the schedule is endless).
    - `recipientsCount` integer, nullable, required — Amount of actual recipients.
    - `timezone` string, required — User-friendly timezone name (with spaces replaced by underscores).
    - `completed` boolean, required — Indicates that scheduling has been completed.
    - `avatar` string, nullable, required — A relative link to the contact avatar.
    - `createdAt` string, date-time, required — Scheduling creation time.

## Other responses

- `401` — Unauthorized request.

---

[API](https://skmtc.net/textmagic/apis/textmagic-api.md) · [All operations](https://skmtc.net/textmagic/apis/textmagic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/textmagic/textmagic-api/revisions/3e4029d19684/schema)
