API – Get/Set a Persistent Setting Value

action – setting

Persistent Settings are variables that are set at the Account level in PYXI. Whilst there may be some specific values that are referred to within the application’s own logic, there is no fundamental restriction on the number of persistent settings that can be set or the alpha-numeric names they can be given.

Typically, you may wish to use persistent settings where there is an account-specific value that needs to be retained e.g. the customer/account record number to which this account relates in another application, so that this setting value can then be called with a calculation from within Templates or ActionScripts e.g. within Automations, WebHooks etc. using the getSetting function

Set a Persistent Setting Value

Sample Request

{ "account": *** your account id ***, "apikey": "*** your api key ***", "action": "setting", "name": "WebHookRoot", "value": "https://myapp.com/webhooks/" }

Sample Response

{ "success": true, "value": "https://myapp.com/webhooks/" }

Get a Setting Value

Sample Request

{ "account": *** your account id ***, "apikey": "*** your api key ***", "action": "setting", "name": "WebHookRoot" }

Sample Response

{ "success": true, "value": "https://myapp.com/webhooks/" }

This value can now be retrieved inside a script, template etc. e.g.

{getSetting("WebHookRoot")}

Get Started