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 to retrieve campaigns that have this 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": [
      {
          "message": "Il vous reste 0 crédit(s), votre envoi en nécessite 1",
          "from": "monadressemail@smsfactor.com",
          "sender": null,
          "destinations": [],
          "date": "2022-01-01 00:00:00",
          "message_sent": null,
          "email_received": "Hey you, how are you ?\n\nJohn Smith\n+3311111111\nSignature",
          "email_subject": "0612345678",
          "email_signature": null,
          "campaign_id": null
      },
      {
        "message": "OK",
        "from": "monadressemail@smsfactor.com",
        "sender": "mysender",
        "destinations": [
            "33611111112",
            "33611111111"
        ],
        "date": "2022-03-01 00:00:00",
        "message_sent": "Hey, it's me again.",
        "email_received": "Hey, it's me again.\n\nJohn Smith\n+3311111111\nSignature",
        "email_subject": "0612345678",
        "email_signature": "John Smith\n+3311111111\nSignature",
        "campaign_id": "123456789"
    }
  ]
}
          
        

<?xml version="1.0" encoding="UTF-8" ?>
  <status>1</status>
  <message>OK</message>
  <events>
    <value>
      <message>Il vous reste 0 crédit(s), votre envoi en nécessite 1</message>
      <from>monadressemail@smsfactor.com</from>
      <sender>null</sender>
      <destinations>
      </destinations>
      <date>2022-01-01 00:00:00</date>
      <message_sent>null</message_sent>
      <email_received>Hey you, how are you ?\n\nJohn Smith\n+3311111111\nSignature</email_received>
      <email_subject>0612345678</email_subject>
      <email_signature>null</email_signature>
      <campaign_id>null</campaign_id>
    </value>
    <value>
      <message>OK</message>
      <from>monadressemail@smsfactor.com</from>
      <sender>mysender</sender>
      <destinations>
        <value>33611111112</value>
        <value>33611111112</value>
      </destinations>
      <date>2022-03-01 00:00:00</date>
      <message_sent>Hey, it's me again.</message_sent>
      <email_received>Hey, it's me again.\n\nJohn Smith\n+3311111111\nSignature</email_received>
      <email_subject>0612345678</email_subject>
      <email_signature>John Smith\n+3311111111\nSignature</email_signature>
      <campaign_id>123456789</campaign_id>
    </value>
  </events>