{"openapi":"3.1.0","info":{"title":"Crier API","version":"1.0.0","description":"Message relay for AI agents. Pay per message via x402 (requirements arrive in the PAYMENT-REQUIRED header AND the 402 JSON body). Free endpoints are rate limited per IP with X-RateLimit-* headers; 429s carry Retry-After. Full reference: https://crier.vimabrosta.com/llms-full.txt","x-guidance":"Crier delivers a message from your agent to a person or a system and keeps retrying after your session ends. Use POST /v1/email ($0.01) to email a person, POST /v1/sms ($0.05) to text a phone number, POST /v1/webhook ($0.005) to deliver a signed webhook to a URL. Every paid route answers HTTP 402 with exact requirements; pay (USDC on Base or Solana) and retry the identical request with an Idempotency-Key header. The 202 carries a delivery id and a one-time secret; GET /v1/deliveries/{id} with the secret as a Bearer token reports whether it was sent. POST /v1/validate is free and tells you whether a message would be accepted before you pay.","contact":{"email":"contact@vimabrosta.com"}},"servers":[{"url":"https://crier.vimabrosta.com"}],"components":{"securitySchemes":{"deliverySecret":{"type":"http","scheme":"bearer","description":"The one-time secret returned at purchase, as a Bearer token."},"secretQuery":{"type":"apiKey","in":"query","name":"secret","description":"The same one-time secret as a query parameter."}}},"paths":{"/v1/validate":{"post":{"summary":"Free pre-flight: would this message be accepted (schema, destination policy, suppression, caps)","security":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"enum":["email","sms","webhook"]},"message":{"type":"object"}},"required":["channel","message"]},"example":{"channel":"email","message":{"to":"person@example.com","subject":"Your order 42 shipped","text":"Tracking number 1Z999. It arrives Thursday.","reply_to":"ops@your-company.example","from_name":"Order Desk"}}}}},"responses":{"200":{"description":"valid, deliverable, problem; nothing sent, nothing charged"},"429":{"description":"rate limited (30/min/IP)"}}}},"/v1/email":{"post":{"summary":"Send an email to a person ($0.01)","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to","subject","text"],"properties":{"to":{"type":"string","format":"email"},"subject":{"type":"string","maxLength":200},"text":{"type":"string","maxLength":20000,"description":"Plain text body. A footer naming the relay and an unsubscribe link is appended."},"html":{"type":"string","description":"Optional HTML body, 64KB max; the same footer is appended."},"reply_to":{"type":"string","format":"email"},"from_name":{"type":"string","maxLength":40,"description":"Shown as \"<from_name> via Crier\"; the address is always the relay's."}}},"example":{"to":"person@example.com","subject":"Your order 42 shipped","text":"Tracking number 1Z999. It arrives Thursday.","reply_to":"ops@your-company.example","from_name":"Order Desk"}}}},"responses":{"202":{"description":"queued; response includes one-time secret, masked destination, links, receipt, resume_hint","content":{"application/json":{"schema":{"type":"object"},"example":{"id":"dl_...","secret":"dls_...","channel":"email","status":"queued","to":"p***@example.com","links":{"status":"https://crier.vimabrosta.com/v1/deliveries/dl_..."}}}}},"402":{"description":"Payment Required ($0.01, x402). Requirements in the PAYMENT-REQUIRED header and the JSON body; retry with PAYMENT-SIGNATURE."},"422":{"description":"invalid request, destination_unavailable, or URL policy (not charged)"},"429":{"description":"destination_rate_limited (not charged; Retry-After given)"}}}},"/v1/webhook":{"post":{"summary":"Deliver a signed webhook to a URL ($0.005)","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","body"],"properties":{"url":{"type":"string","format":"uri","description":"Public http(s) receiver."},"method":{"type":"string","enum":["POST","PUT"],"default":"POST"},"body":{"description":"A JSON value (sent as application/json) or a string (sent as text/plain unless content_type says otherwise). 16KB max."},"content_type":{"type":"string"},"headers":{"type":"object","description":"Up to 5 custom headers; names must start with X- and not X-Crier-."}}},"example":{"url":"https://your-system.example/hooks/agent","body":{"event":"task.done","task_id":"42","summary":"Report generated."},"headers":{"X-Task":"42"}}}}},"responses":{"202":{"description":"queued; response includes one-time secret, masked destination, links, receipt, resume_hint","content":{"application/json":{"schema":{"type":"object"},"example":{"id":"dl_...","secret":"dls_...","channel":"webhook","status":"queued","to":"https://your-system.example","links":{"status":"https://crier.vimabrosta.com/v1/deliveries/dl_..."}}}}},"402":{"description":"Payment Required ($0.005, x402). Requirements in the PAYMENT-REQUIRED header and the JSON body; retry with PAYMENT-SIGNATURE."},"422":{"description":"invalid request, destination_unavailable, or URL policy (not charged)"},"429":{"description":"destination_rate_limited (not charged; Retry-After given)"}}}},"/v1/deliveries/{id}":{"get":{"summary":"Delivery status (free)","security":[{"deliverySecret":[]},{"secretQuery":[]}],"responses":{"200":{"description":"channel, status, to (masked), attempts, provider_id, provider_status, last_error, sent_at, resume_hint"},"404":{"description":"unknown id or wrong secret (uniform)"},"429":{"description":"rate limited (120/min/IP)"}}},"delete":{"summary":"Cancel a delivery that has not been sent (free)","security":[{"deliverySecret":[]},{"secretQuery":[]}],"responses":{"200":{"description":"cancelled, or already final"},"404":{"description":"unknown id or wrong secret"}}}},"/v1/quote":{"get":{"summary":"Machine-readable pricing and limits (free)","security":[],"responses":{"200":{"description":"products, prices, limits, notes"}}}},"/healthz":{"get":{"summary":"Service health","security":[],"responses":{"200":{"description":"ok"},"503":{"description":"degraded"}}}}}}