Newsman API Page
Newsman API » Newsman API 1.0 » Account » account.history
Newsman Api Method: account.history
Prototype: account.history($key, $account_id, $date, $action, $count, $before_timestamp, $tag)
Description: Returns an array of actions descendant sorted for this account
Each entry of the result has the following format:
{
action: < string >, # name of the action
timestamp: < int >, # timestamp int representing the time of the action
data: < dict >, # dictionary with action specific details
}
{
action: < string >, # name of the action
timestamp: < int >, # timestamp int representing the time of the action
data: < dict >, # dictionary with action specific details
}
Return: struct
Variable | Type | Description |
---|---|---|
$key | string | API key |
$account_id | string | |
$date | date | if date is present it must be in format YYYY-mm-dd in your local timezone and it limits the results to that specific day (eg: usefull when listing by days). If not present “before_timestamp” is used only. |
$action | string | the name of the action which can be send, view, click, unsub, bounce, spam, reject |
$count | integer | limit the number of results (must be between 50 and 10000 inclusive), default: 50 |
$before_timestamp | timestamp | timestamp (int or float – seconds since epoch) used to navigate between the results. If not present current time is used. |
$tag | string | limit the search for this tag only |
Curl Code Example
curl -G https://cluster.newsmanapp.com/api/1.0/account.history \ -d key=89sdfsdsdfbg888977232kkdh \ -d account_id=test90210 \ -d date=2013-10-07 \ -d action=send \ -d count=120