« Back to Documentation Overview

set_account_callbacks

Section: Callbacks
Version: 1.5.0


Set callbacks configuration for account.
Conditions:

  • uri (mandatory) – Location of callback listener.
  • actions (mandatory) – List of actions that will be reported to callback listener. Allowed values are subscribe, open, click, goal, survey, unsubscribe with at least one value required.


Parameters
stringAPI_KEY
object
stringurihttp://example.com/callback
arrayactions
stringsubscribe
stringopen
stringclick
stringgoal
stringsurvey
stringunsubscribe
Return Value
integerupdated1

Example Request JSON

[
    "API_KEY",
    {
        "uri": "http:\/\/example.com\/callback",
        "actions": [
            "subscribe",
            "open",
            "click",
            "goal",
            "survey",
            "unsubscribe"
        ]
    }
]

Example Response JSON

{
    "updated": 1
}

Example Error Response JSON

{
    "code": -1,
    "message": "Invalid URI"
}
Method-specific Errors
Invalid URI
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