api_call_send
Sends an HTTP request synchronously and returns the response. The request is
either an API call template from app/api_calls (template) or defined inline
(api_call); when both are given, template is used. A template is sent only if
its trigger_condition renders to true, and its callback is run with the
response. Delivery problems (invalid URL, timeout, connection or SSL errors)
are raised as errors. On staging instances requests are only sent when API
call and SMS notifications are enabled for staging in the Partner Portal.
api_call_send(
api_call: ApiCallSendRequestInput
data: HashObject
options: ApiCallSendOptions
template: NotificationTemplateInput
): ApiCallSendPayload
Arguments
api_call (ApiCallSendRequestInput)
Request defined inline, used when template is not given
data (HashObject)
Variables available as data in the Liquid of the template, and in the url, method and headers of an inline api_call
options (ApiCallSendOptions)
Options for the HTTP request, such as timeout
template (NotificationTemplateInput)
API call template defined in app/api_calls (or a module), to render and send
Type
ApiCallSendPayload
Autogenerated return type of ApiCallSend.