Outcomes API
Tell us what actually happened to a lead you scored โ did it convert, charge back, turn out to be fraud? This is optional, but it's what lets accuracy be measured and improved for your traffic specifically.
POST /api/v1/outcomes
Request fields
| Field | Description | |
|---|---|---|
request_id | required | The request_id from the original score response. |
outcome | required | One of: converted, chargeback, refunded, fraud_confirmed, genuine, other |
occurred_at | optional | ISO 8601 timestamp of when it happened. Defaults to now. |
metadata | optional | Any extra JSON you want stored alongside the outcome. |
curl -X POST "https://revylta.com/api/v1/outcomes" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_SERVER_API_KEY" \
-d '{
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"outcome": "chargeback",
"occurred_at": "2026-08-20T14:32:00Z"
}'const response = await fetch("https://revylta.com/api/v1/outcomes", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_SERVER_API_KEY"
},
body: JSON.stringify({
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"outcome": "chargeback",
"occurred_at": "2026-08-20T14:32:00Z"
})
});
const result = await response.json();
console.log(result);import requests
response = requests.post(
"https://revylta.com/api/v1/outcomes",
headers={
"Content-Type": "application/json",
"X-API-KEY": "YOUR_SERVER_API_KEY"
},
json={
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"outcome": "chargeback",
"occurred_at": "2026-08-20T14:32:00Z"
}
)
print(response.status_code)
print(response.json())require "net/http"
require "json"
require "uri"
uri = URI("https://revylta.com/api/v1/outcomes")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request["X-API-KEY"] = "YOUR_SERVER_API_KEY"
request.body = JSON.generate({
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"outcome": "chargeback",
"occurred_at": "2026-08-20T14:32:00Z"
})
response = http.request(request)
puts response.code
puts response.body<?php
$payload = [
"request_id" => "550e8400-e29b-41d4-a716-446655440000",
"outcome" => "chargeback",
"occurred_at" => "2026-08-20T14:32:00Z"
];
$ch = curl_init("https://revylta.com/api/v1/outcomes");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"X-API-KEY: YOUR_SERVER_API_KEY"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status . PHP_EOL;
echo $response . PHP_EOL;Response
{
"status": "recorded",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"outcome": "chargeback",
"occurred_at": "2026-08-20T14:32:00Z"
}Errors
404 | No request with that request_id exists on your account. |
422 | outcome is missing or not one of the allowed labels. |