Validate Accounts

post
Validate Accounts

https://api.bountyblok.io/wax/validate_accounts
This endpoint allows you to validate a list of accounts and filter out any invalid ones.
Request
Response
Request
Body Parameters
accounts
required
string
Comma-separated list of accounts. Max 5000.
Response
200: OK
Accounts successfully validated
{
"valid_accounts_csv": "fcaqw.wam,cqcau.wam,1.baw.wam,gzpqu.wam",
"total_valid": 4,
"total_invalid": 1,
"total_processed": 5
}

cURL
C#
Javascript
Python
PHP
cURL
curl --request POST \
--url https://api.bountyblok.io/wax/validate_accounts \
--header 'content-type: application/json' \
--data '{"accounts":"fcaqw.wam,cqcau.wam,1.baw.wam,gzpqu.wam,apple"}'
C#
var client = new RestClient("https://api.bountyblok.io/wax/validate_accounts");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"accounts\":\"fcaqw.wam,cqcau.wam,1.baw.wam,gzpqu.wam,apple\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Javascript
var data = JSON.stringify({
"accounts":"fcaqw.wam,cqcau.wam,1.baw.wam,gzpqu.wam,apple"
});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.bountyblok.io/wax/validate_accounts");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
Python
import http.client
conn = http.client.HTTPSConnection("api.bountyblok.io")
payload = "{\"accounts\":\"fcaqw.wam,cqcau.wam,1.baw.wam,gzpqu.wam,apple\"}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/wax/validate_accounts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.bountyblok.io/wax/validate_accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"accounts\":\"fcaqw.wam,cqcau.wam,1.baw.wam,gzpqu.wam,apple\"}",
CURLOPT_HTTPHEADER => array(
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}