curl -X PUT https://xenarch.dev/v1/sites/b2c3d4e5.../pricing \
-H "Authorization: Bearer xk_pub_abc123..." \
-H "Content-Type: application/json" \
-d '{
"default_price_usd": "0.003",
"rules": [
{"path_pattern": "/premium/*", "price_usd": "0.01"},
{"path_pattern": "/api/*", "price_usd": "0.05"},
{"path_pattern": "/public/*", "price_usd": "0"}
]
}'
{
"rules_applied": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Sites
Update Pricing
Update x402 pay-per-crawl pricing for a site — set the default USDC price and path-specific pricing rules for AI agent content access.
PUT
/
v1
/
sites
/
{site_id}
/
pricing
curl -X PUT https://xenarch.dev/v1/sites/b2c3d4e5.../pricing \
-H "Authorization: Bearer xk_pub_abc123..." \
-H "Content-Type: application/json" \
-d '{
"default_price_usd": "0.003",
"rules": [
{"path_pattern": "/premium/*", "price_usd": "0.01"},
{"path_pattern": "/api/*", "price_usd": "0.05"},
{"path_pattern": "/public/*", "price_usd": "0"}
]
}'
{
"rules_applied": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}curl -X PUT https://xenarch.dev/v1/sites/b2c3d4e5.../pricing \
-H "Authorization: Bearer xk_pub_abc123..." \
-H "Content-Type: application/json" \
-d '{
"default_price_usd": "0.003",
"rules": [
{"path_pattern": "/premium/*", "price_usd": "0.01"},
{"path_pattern": "/api/*", "price_usd": "0.05"},
{"path_pattern": "/public/*", "price_usd": "0"}
]
}'
Notes
path_patternuses fnmatch-style globs:*matches a single segment,**is not supported at the API level- Rules are evaluated in order — first match wins
- A price of
"0"makes the path free for bots - Replaces all existing rules for the site