User
Messages

Enqueue message

Enqueues a message for sending. If deviceId is set, the specified device is used; otherwise a random registered device is chosen.

post/3rdparty/v1/messages

Query parameters

skipPhoneValidationboolean

Skip phone validation

deviceActiveWithininteger

Filter devices active within the specified number of hours

Request body

deviceIdstring

Optional device ID for explicit selection

idstring

ID (if not set - will be generated)

isEncryptedboolean

Is encrypted

messagestring

Message content (deprecated, use TextMessage instead)

phoneNumbersstring[] required

Recipients (phone numbers)

priority-128 | 0 | 100 | 127
scheduleAtstring date-time

Schedule message delivery at (must be in the future)

simNumberinteger

SIM card number (1-3), if not set - default SIM will be used

ttlinteger

Time to live in seconds (conflicts with ValidUntil)

validUntilstring date-time

Valid until (conflicts with TTL)

withDeliveryReportboolean

With delivery report

Example request

{
  "dataMessage": {
    "data": "SGVsbG8gV29ybGQh",
    "port": 53739
  },
  "deviceId": "PyDmBQZZXYmyxMwED8Fzy",
  "id": "PyDmBQZZXYmyxMwED8Fzy",
  "isEncrypted": true,
  "message": "Hello World!",
  "phoneNumbers": [
    "79990001234"
  ],
  "scheduleAt": "2020-01-01T08:30:00Z",
  "simNumber": 1,
  "textMessage": {
    "text": "Hello World!"
  },
  "ttl": 86400,
  "validUntil": "2020-01-01T00:00:00Z",
  "withDeliveryReport": true
}

Response

Message enqueued

deviceIdstring required

Device ID

idstring required

Message ID

isEncryptedboolean

Encrypted

isHashedboolean

Hashed

state'Pending' | 'Cancelling' | 'Cancelled' | 'Processed' | 'Sent' | 'Delivered' | 'Failed' required
statesobject

History of states

Example response

{
  "dataMessage": {
    "data": "SGVsbG8gV29ybGQh",
    "port": 53739
  },
  "deviceId": "PyDmBQZZXYmyxMwED8Fzy",
  "hashedMessage": {
    "hash": "1d4b6e3b1b6e3b1b6e3b1b6e3b1b6e3b1b6e3b1b"
  },
  "id": "PyDmBQZZXYmyxMwED8Fzy",
  "recipients": [
    {
      "error": "timeout",
      "phoneNumber": "79990001234"
    }
  ],
  "textMessage": {
    "text": "Hello World!"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.