Get mail to SMS events

This method allows you to retrieve your mail2sms events.

GET

/mail2sms/events

GET Parameters

start You can define the start record for pagination. Default 0
length You can define the number of records to retrieve per request. Default 100. Maximum 1000
date_start Add a filter to retrieve campaigns of which send date is after this date. Date format must be as follow: Y-m-d H:i:s
date_end Add a filter to retrieve campaigns of which send date is before this date. Date format must be as follow: Y-m-d H:i:s
from Add a filter to retrieve campaigns that have this email as email sender
sender Add a filter to retrieve campaigns that have this sender as SMS sender
destination Add a filter to retrieve campaigns that have this phone number as destination
is_error Add a filter on message status. Can be 0 or 1
message Add a filter to retrieve campaigns that contains this text in the content

Examples

HTTP
 httpCopyGET /mail2sms/events HTTP/1.1
Host: api.smsup.ch
Accept: application/json
Authorization: Bearer your.token
    

Result Format

JSON
{
  "status": 1,
  "message": "OK",
  "events": [
      {
          "event_id": "123456"
          "message": "OK",
          "from": "monadressemail@smsfactor.com",
          "sender": "",
          "destinations": [
            "41781234567"
          ],
          "date": "2025-04-06 01:49:53",
          "message_sent": "Hey you, how are you ?",
          "email_received": "Hey you, how are you ?\n\nJohn Smith\n+3311111111\nSignature",
          "email_subject": "41781234567",
          "email_signature": "\n\nJohn Smith\n+3311111111\nSignature",
          "campaign_id": "12345",
          "ip": "127.0.0.1"
      },
      {
        "event_id": "123457"
        "message": "You can't send from this IP or sender, check your settings",
        "from": "monadressemail@smsfactor.com",
        "sender": "",
        "destinations": [],
        "date": "2025-04-06 01:49:53",
        "message_sent": "",
        "email_received": "Hey you, how are you ?\n\nJohn Smith\n+3311111111\nSignature",
        "email_subject": "41781234567",
        "email_signature": "\n\nJohn Smith\n+3311111111\nSignature",
        "campaign_id": "",
        "ip": "127.0.0.2"
    },
  ]
}