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


GET /mail2sms/events HTTP/1.1
Host: api.smsfactor.com
Accept: application/json
Authorization: Bearer your.token
      
    

Result Format


{
  "status": 1,
  "message": "OK",
  "events": [
      {
          "event_id": "123456"
          "message": "OK",
          "from": "monadressemail@smsfactor.com",
          "sender": "",
          "destinations": [
            "33612345678"
          ],
          "date": "2024-07-25 03:55:15",
          "message_sent": "Hey you, how are you ?",
          "email_received": "Hey you, how are you ?\n\nJohn Smith\n+3311111111\nSignature",
          "email_subject": "33612345678",
          "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": "2024-07-25 03:55:15",
        "message_sent": "",
        "email_received": "Hey you, how are you ?\n\nJohn Smith\n+3311111111\nSignature",
        "email_subject": "33612345678",
        "email_signature": "\n\nJohn Smith\n+3311111111\nSignature",
        "campaign_id": "",
        "ip": "127.0.0.2"
    },
  ]
}
          
        

<?xml version="1.0" encoding="UTF-8" ?>
  <status>1</status>
  <message>OK</message>
  <events>



    <value>
        <event_id>123456</event_id>
        <message>OK</message>
        <from>monadressemail@smsfactor.com</from>
        <sender></sender>
        <destinations>
        33612345678
        </destinations>
        <date>2024-07-25 03:55:15</date>
        <message_sent>Hey you, how are you ?</message_sent>
        <email_received>Hey you, how are you ?\n\nJohn Smith\n+3311111111\nSignature</email_received>
        <email_subject>0612345678</email_subject>
        <email_signature>\n\nJohn Smith\n+3311111111\nSignature</email_signature>
        <campaign_id>12345</campaign_id>
        <ip>127.0.0.1</ip>
    </value>



    <value>
        <event_id>123457</event_id>
        <message>You can't send from this IP or sender, check your settings</message>
        <from>monadressemail@smsfactor.com</from>
        <sender></sender>
        <destinations>
        </destinations>
        <date>2024-07-25 03:55:15</date>
        <message_sent></message_sent>
        <email_received>Hey you, how are you ?\n\nJohn Smith\n+3311111111\nSignature</email_received>
        <email_subject>0612345678</email_subject>
        <email_signature>\n\nJohn Smith\n+3311111111\nSignature</email_signature>
        <campaign_id></campaign_id>
        <ip>127.0.0.2</ip>
    </value>
  </events>