« Back to Documentation Overview

get_messages_amount_per_campaign

Section: Messages
Version: 1.5.0


Get total messages amount in every campaign on your account.
Conditions:

  • type (optional) – Use newsletter, autoresponder or draft to narrow down count results to specific message types.
  • send_on (optional) – Use time operators to narrow down count results to specific sending date. Multiple operators are allowed and logic AND is used so date range can also be expressed. Works only for newsletters because other message types do not have fixed sending point in time. If message was sent with Time Travel then it may appear in search results for two different days as sending period equals 24 hours.
  • created_on (optional) – Use time operators to narrow down count results to specific message creation date. Multiple operators are allowed and logic AND is used so date range can also be expressed.


Parameters
stringAPI_KEY
object
stringtypevalue
objectsend_on
stringOPERATORvalue
objectcreated_on
stringOPERATORvalue
Return Value
integerCAMPAIGN_ID1

Example Request JSON

[
    "API_KEY",
    {
        "type": "value",
        "send_on": {
            "OPERATOR": "value"
        },
        "created_on": {
            "OPERATOR": "value"
        }
    }
]

Example Response JSON

{
    "CAMPAIGN_ID": 1
}
API-wide Errors
API key verification failed API key verification failed
API client IP not allowed API client IP not allowed
Invalid params Attribute params must be reference to hash