Show the events behind one violation
The drill-down for a single violation. /violations tells you value is absent on 4,102 of 10,000 order_completed; this returns the most recent events that are actually missing it, with session_id and page URL, so you can see which template or campaign is responsible.
Every violation in the /violations response carries a ready-to-call samples link with the right parameters already filled in — you rarely need to build this URL by hand.
Deliberately never sampled: sampling a search for rare events returns a confident empty result. It stays cheap by reading newest-first and stopping once it has limit rows, so the volume of the event name barely matters when matches exist. The one slow case is a violation with no matching events at all — proving that requires reading every event of that name — which returns window_too_large.
curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/contracts/samples?location_id=example_string&event=order_completed&key=value&kind=missing_required&date_from=2026-07-27&date_to=2026-08-03&limit=5" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/contracts/samples?location_id=example_string&event=order_completed&key=value&kind=missing_required&date_from=2026-07-27&date_to=2026-08-03&limit=5"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/contracts/samples?location_id=example_string&event=order_completed&key=value&kind=missing_required&date_from=2026-07-27&date_to=2026-08-03&limit=5", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://mythic-analytics.gulp.workers.dev/client/v1/contracts/samples?location_id=example_string&event=order_completed&key=value&kind=missing_required&date_from=2026-07-27&date_to=2026-08-03&limit=5", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/contracts/samples?location_id=example_string&event=order_completed&key=value&kind=missing_required&date_from=2026-07-27&date_to=2026-08-03&limit=5')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"event": "order_completed",
"key": "value",
"kind": "missing_required",
"expected_type": "example_string",
"window": {
"date_from": "last 1 day",
"date_to": "now",
"sample": {
"keeping": "1/10 of events",
"note": "example_string"
}
},
"samples": [
{
"event_id": "018f2c1a-7b3e-7c9d-a1b2-c3d4e5f60718",
"session_id": "sess_9f2c1a7b",
"distinct_id": "example_string",
"timestamp": "2024-12-25T10:00:00Z",
"url": "https://shop.example.com/checkout/thank-you",
"observed_type": "absent",
"value_sample": "example_string"
}
],
"note": "example_string"
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please try again later",
"code": 429,
"retryAfter": 3600
}
/client/v1/contracts/samples
Target server for requests. Edit to use your own host.
Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need contracts:read or contracts:write. See Using an mcp_ key over HTTP.
ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need contracts:read or contracts:write. See Using an mcp_ key over HTTP.Location to scope to. Required for ak_ keys (or send the X-Location-Id header); ignored for sk_.
Event name the violation is on.
The violating property key.
Which violation to find examples of. type_mismatch reads the expected type from the stored contract — it cannot be supplied as a parameter, so you cannot "find" mismatches against a type you never declared.
Start of the window, ISO 8601 date or timestamp. Defaults to 1 day ago.
End of the window (inclusive day), ISO 8601. Defaults to now.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need contracts:read or contracts:write. See Using an mcp_ key over HTTP.
Query Parameters
Location to scope to. Required for ak_ keys (or send the X-Location-Id header); ignored for sk_.
Which violation to find examples of. type_mismatch reads the expected type from the stored contract — it cannot be supplied as a parameter, so you cannot "find" mismatches against a type you never declared.
missing_requirednull_valuetype_mismatchStart of the window, ISO 8601 date or timestamp. Defaults to 1 day ago.
2026-07-27