Update reachability
1 min
POST
https://api.us1.odp.optimizely.com/v3/reachability
Body Parameters
- bodyReachabilityrequiredExamplesExample Payload:
[ { "identifier_value": "[email protected]", "identifier_field_name": "email", "reachable": false, "reachable_update_type": "hard_bounce" }, { "identifier_value": "[email protected]", "identifier_field_name": "email", "reachable": true } ]- identifier_valuestringrequiredDescription
- identifier_field_namestringrequiredDescription
- reachablebooleanrequiredDescriptionDefaulttrue
- reachable_update_typestringrequiredDescription
- reachable_update_reasonstringDescription
- reachable_update_tsstringDescription
- zaius_idinteger
Responses
202
- GenericUpdateResponseExample
{ "title": "Accepted", "status": 202, "timestamp": "2019-07-30T23:55:00.519Z" }- titlestring
- statusinteger<int32>Formatint32
- timestampstring
400
- ReachabilityErrorExample
{ "title": "Bad Request", "status": 400, "timestamp": "2019-07-30T23:53:48.615Z", "detail": { "message": "Unable to parse request body." } }- titlestringExample
- statusintegerExampleDefault0
- timestampstringExample
- detailobject
- messagestring
403
curl
curl --request POST \
--url https://api.us1.odp.optimizely.com/v3/reachability \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"identifier_value": "",
"identifier_field_name": "",
"reachable": true,
"reachable_update_type": ""
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"identifier_value": "",
"identifier_field_name": "",
"reachable": true,
"reachable_update_type": ""
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.us1.odp.optimizely.com/v3/reachability", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.us1.odp.optimizely.com/v3/reachability")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"identifier_value": "",
"identifier_field_name": "",
"reachable": true,
"reachable_update_type": ""
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.us1.odp.optimizely.com/v3/reachability"
payload = json.dumps({
"identifier_value": "",
"identifier_field_name": "",
"reachable": True,
"reachable_update_type": ""
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
202
// Accepted
{
"title": "",
"status": "",
"timestamp": ""
}400
// Bad Request
{
"title": "Bad Request",
"status": 400,
"timestamp": "2018-08-07T13:44:17.659Z",
"detail": {
"message": ""
}
}403
// Forbidden