latestSwagger 2.02026-08-101561322.2 MB

3e4029d19684

Scheduled Messages

Get a single scheduled message

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

get/api/v2/schedules/{id}

Path parameters

idinteger required

Response

Returned when successful.

idinteger required

Schedule ID.

nextSendstring date-time required

The next send date in ISO 8601 format.

rrulestring nullable required

iCal RRULE string.

lastSentstring date-time nullable required

The date and time when the last message was sent.

contactNamestring 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.

type'Once' | 'Hourly' | 'Daily' | 'Weekly' | 'Monthly' | 'Yearly' required
summarystring required

A human-readable summary of the sending schedule.

firstOccurrencestring date-time nullable required

First occurence date.

lastOccurrencestring date-time nullable required

Last occurence date (could be null if the schedule is endless).

recipientsCountinteger nullable required

Amount of actual recipients.

timezonestring required

User-friendly timezone name (with spaces replaced by underscores).

completedboolean required

Indicates that scheduling has been completed.

avatarstring nullable required

A relative link to the contact avatar.

createdAtstring date-time required

Scheduling creation time.

Example response

{
  "id": 562,
  "nextSend": "2014-10-13T05:00:00+0000",
  "rrule": "FREQ=DAILY;INTERVAL=2;COUNT=5;",
  "session": {
    "id": 4991,
    "startTime": "2015-06-19T09:48:24+0000",
    "text": "Hello {First name}!",
    "source": "O",
    "referenceId": "my_reference_id_4991",
    "price": 3.45,
    "numbersCount": 18,
    "destination": "t",
    "initiatorId": 305
  },
  "lastSent": "2015-06-19T09:48:24+0000",
  "contactName": "15 recipients",
  "parameters": {
    "text": "I Love Textmagic!",
    "recipients": {
      "contacts": [
        39318
      ],
      "groups": [
        39318
      ],
      "numbers": [
        "447860021130"
      ],
      "filteredViews": [
        39318
      ]
    }
  },
  "type": "once",
  "summary": "Every 2 weeks on Monday, Tuesday, Thursday at 10:30 (UTC+03:00)",
  "textParameters": {
    "cost": 0.04,
    "parts": 6,
    "chars": 125,
    "encoding": "ISO-8859-1",
    "countries": [
      "US"
    ],
    "charsetLabel": "ISO-8859-1"
  },
  "firstOccurrence": "2015-06-19T09:48:24+0000",
  "lastOccurrence": "2015-06-19T09:48:24+0000",
  "recipientsCount": 2,
  "timezone": "Europe/Tallinn",
  "completed": true,
  "avatar": "avatars/dummy_avatar.png",
  "createdAt": "2015-06-19T09:48:24+0000"
}