GET /api/message/action/log.php


Note! Log contains only actions from last 30 days.


Request parameters


ParameterValue
since_seq_idReturn results only after specified action sequence number. To fetch actions from first, please query actions with value 0.
message_idMessage ID to get actions for.
start_atActions range start date. Value has to be an UNIX timestamp and in UTC time.
end_atActions range start date. Value has to be an UNIX timestamp and in UTC time.
limitNumber of actions to return with request. If not specified a limit of 10000 is applied. Value is capped at 10000.
offsetSo-called page number, which begins at 0. 0 returns actions from 0 to 10000. 1 returns 10001 to 20000 etc. If not specified, value will be 0. Offset is omitted if actions are queried by since_seq_id field.



Response parameters

Response is ordered by seq_id when queried using since_seq_id or message_id and by date when queried using start_at and end_at.


ParameterValue
seq_idAction sequence number. Value is a 64-bit unsigned long.
message_idMessage ID action applies to. Value is a 64-bit unsigned long.
emailRecipient of the message
campaign_idCampaign or Automation ID for the message.
section_idCampaign's section or Automation's Send Message action ID.
actionAction type. Possible values are - bounce, click, complaint, optout, send, view.
valueAction meta information. Value is an JSON object, and its structure is described in type-specific sections.
created_atAction creation time. Value is RFC3339 formatted date. For example 2021-04-26T10:01:23.456+03:00



Value structure for bounce action


ParameterValue
smtp_status_codeNormalize classification of bounce. Represented as a numeric value. Common response codes.



Value structure for click action


ParameterValue
urlNon-rendered URL of visited link.



Value structure for view action


ParameterValue
ipIP-address of images loader.
osOperating system of images loader.
clientEmail client of images loader.
countryISO alpha-2 code of images loader.



Example request


$ curl -X GET -u '[username]:[password]' https://<subdomain>.sendsmaily.net/api/message/action/log.php?message_id=140737488355328



Example response


[
  {
    "seq_id": 1,
    "message_id": 140737488355328,
    "email": "support@smaily.com",
    "campaign_id": 1,
    "section_id": 1619440303,
    "action": "send",
    "value": {},
    "created_at": "2021-04-26T10:01:23.456+03:00"
  },
  {
    "seq_id": 2,
    "message_id": 140737488355328,
    "email": "support@smaily.com",
    "campaign_id": 1,
    "section_id": 1619440303,
    "action": "click",
    "value": {
      "url": "https://smaily.com"
    },
    "created_at": "2021-04-26T10:01:25.678+03:00"
  },
  {
    "seq_id": 3,
    "message_id": 140737488355328,
    "email": "support@smaily.com",
    "campaign_id": 1,
    "section_id": 1619440303,
    "action": "view",
    "value": {
      "ip": "127.0.0.1",
      "os": "iOS",
      "client": "Mobile Safari",
      "country": "EE"
    },
    "created_at": "2021-04-26T10:01:25.678+03:00"
  }
]