Retrieving JS code for specific website

To retrieve a JS code for specific website, submit a GET request to:

https://api.sendflow.pl/v1/websites/<YOUR_WEBSITE_UID>/code

PHP example

$url = "https://api.sendflow.pl/v1/websites/<YOUR_WEBSITE_UID>/code";
‚Äč
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Basic <YOUR_API_KEY>']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);

Bash example

curl --include \
--header "Authorization: Basic <YOUR_API_KEY>" \
https://api.sendflow.pl/v1/websites/<YOUR_WEBSITE_UID>/code

Response example

<script>
!function(e,n,s,t,o){e.sendflow=e.sendflow||function(){(e.sendflow.q=e.sendflow.q||[]).push(arguments)},
t=n.createElement('script'),o=n.getElementsByTagName('script')[0],
t.async=1,t.src='//cdn.sendflow.pl/<YOUR_WEBSITE_UID>/library-main.min.js',
o.parentNode.insertBefore(t,o)}(window,document);
</script>