{"openapi":"3.1.0","info":{"title":"WAKE402 API","version":"1.0.0","description":"Schedule one future HTTPS callback for or shortly after the requested time. Pay $0.002 USDC once through x402 v2. No account, API key, or subscription. Delivery is at-least-once, not exactly-once.","x-guidance":"WAKE402 schedules one future HTTPS callback. POST /v1/wake accepts an absolute UTC time; POST /v1/wake-after accepts a relative delay and is Coinbase/CDP Bazaar-capable. Both paid operations purchase the same one-shot service for 0.002 USDC on Base Mainnet (eip155:8453) in production. A valid unpaid request returns x402 HTTP 402. A Payment Identifier and wake402-request-commitment are required; the same payer must sign the payment authorization and request commitment. Preserve the exact request body between the initial 402 and paid retry. Delivery is at-least-once, with callback attempts for or shortly after the requested time. Use /quickstart for the shortest supported integration path.","termsOfService":"https://wake402.agentwake.workers.dev/legal/terms/draft-2026-08-v1"},"security":[],"servers":[{"url":"https://wake402.agentwake.workers.dev"}],"tags":[{"name":"Wake","description":"Paid one-shot callback scheduling"},{"name":"Discovery"},{"name":"Legal","description":"Draft legal discovery surfaces; LEGAL_READY is false.","externalDocs":{"description":"WAKE402 legal draft index","url":"https://wake402.agentwake.workers.dev/legal"}}],"paths":{"/v1/wake":{"post":{"operationId":"scheduleWake","security":[],"tags":["Wake"],"summary":"Pay once and schedule one HTTPS callback","description":"A valid unpaid request returns x402 v2 HTTP 402 with PAYMENT-REQUIRED. Retry with PAYMENT-SIGNATURE, a required Payment Identifier, and the required wake402-request-commitment v1 payer signature over the exact canonical request. Settlement occurs before a wake or Workflow is created. The callback is attempted for or shortly after the requested UTC time, from 60 seconds through 24 hours ahead. Redirects are not followed. Delivery is at-least-once with up to three retries for network, timeout, 408, 425, 429, and 5xx failures.","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"Base64 x402 v2 payment payload supplied after the initial 402.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WakeRequest"},"example":{"callback":"https://agent.example.com/wake","at":"2026-08-30T13:56:29.907Z"}}}},"responses":{"201":{"description":"Payment settled and persistent Workflow scheduled.","headers":{"PAYMENT-RESPONSE":{"description":"Base64 x402 v2 settlement response.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WakeCreated"}}}},"400":{"description":"Invalid JSON, callback, timestamp, or payment payload.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"402":{"description":"Payment required or invalid. Read PAYMENT-REQUIRED for x402 v2 requirements.","headers":{"PAYMENT-REQUIRED":{"description":"Base64 x402 v2 payment requirements.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error","wake402_delivery_contract"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}},"wake402_delivery_contract":{"$ref":"#/components/schemas/Wake402DeliveryContract"}}}}}},"409":{"description":"Payment Identifier conflicts with an existing request/authorization binding, reconciliation is already active, or the exact authorization is terminally unable to settle.","headers":{"Retry-After":{"description":"Seconds before retrying when reconciliation is active.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"500":{"description":"A settled payment was retained but infrastructure scheduling or persistence failed. The response never claims scheduled.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"503":{"description":"Payment configuration/storage/RPC is unavailable, or the original settlement remains indeterminate. Retry only the identical request and exact authorization; no fresh nonce is accepted.","headers":{"Retry-After":{"description":"Seconds before retrying the identical request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}}},"x-x402":{"version":2,"scheme":"exact","price":"$0.002","asset":"USDC","network":"eip155:8453","network_name":"Base Mainnet","payment_identifier_required":true,"request_commitment":{"extension":"wake402-request-commitment","required":true,"version":"1","signatureScheme":"eip712","domain":{"name":"WAKE402","version":"1","chainId":"derived from accepted.network","verifyingContract":"accepted.asset"},"primaryType":"WakeRequest","signedFields":["protocol","paymentIdentifier","requestFingerprint","callback","at","network","asset","amount","payTo"],"requestCanonicalization":{"callback":"validated WHATWG HTTPS URL serialized with URL.toString()","at":"validated UTC timestamp serialized with Date.toISOString()","requestFingerprint":"sha256(utf8(JSON.stringify({callback:<canonical>,at:<canonical>})))"},"payerBinding":"recovered commitment signer must equal the payer returned by official x402 verification and the verified EIP-3009 authorization.from","proofPath":"extensions.wake402-request-commitment.proof.signature","client_helper":"createWake402RequestCommitmentClientExtension"},"settlement_reconciliation":{"exact_authorization_only":true,"automatic_resubmission":false,"positive_proof":"finalized AuthorizationUsed plus exact Transfer and transaction calldata on the configured token/network","cancellation_is_payment":false}},"x-wake402-delivery-contract":{"version":"1","delivery_semantics":"at-least-once","successful_delivery_guaranteed":false,"exact_second_timing_guaranteed":false,"timing":{"expectation":"for or shortly after the requested scheduled time","successful_delivery_sla_guaranteed":false},"schedule":{"min_delay_seconds":60,"max_delay_seconds":86400},"callback":{"method":"POST","content_type":"application/json","redirects_followed":false,"timeout_ms":5000,"authentication":{"mode":"none"},"idempotency_key":{"header":"Idempotency-Key","present":true,"value_semantics":"wake_id"},"body":{"format":"fixed","additional_properties":false,"fields":{"type":{"const":"wake402.wake"},"wake_id":{"value_semantics":"wake_id"},"scheduled_at":{"value_semantics":"scheduled wake time"},"fired_at":{"value_semantics":"delivery attempt time"}}}},"retry":{"first_delivery_attempt":"at-or-after-scheduled-time","retry_limit":3,"maximum_total_attempts":4,"initial_retry_delay":"5 seconds","backoff":"exponential","network_failures_retryable":true,"callback_timeout_retryable":true,"retryable_http_statuses":[408,425,429,500,501,502,503,504,505,506,507,508,510,511],"other_http_failures_retryable":false},"failure":{"terminal_state":"delivery_failed","successful_delivery_sla_guaranteed":false,"callback_response_body_retained":false,"automatic_refund_on_delivery_failure":false},"expiry":{"absolute_wall_clock_delivery_expiry_guaranteed":false,"semantics":"delivery processing ends on success, non-retryable failure, or bounded retry exhaustion; no absolute wall-clock expiry is promised"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]}}},"/v1/wake-after":{"post":{"operationId":"scheduleWakeAfter","security":[],"tags":["Wake","Discovery"],"summary":"Pay once and schedule one HTTPS callback after a delay","description":"Coinbase/CDP Bazaar-capable relative-time alias for the same one-shot WAKE402 service. A valid unpaid request returns x402 v2 HTTP 402 before body validation. delay_seconds must be an integer from 60 through 86400. The server durably anchors scheduled_for once to the first verified payment-attempt timestamp; settlement retries, reconciliation, completed replays, and recovery reuse that immutable timestamp. Settlement and Workflow behavior are identical to POST /v1/wake. This route is BAZAAR_CAPABLE, not claimed live or listed.","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"Base64 x402 v2 payment payload supplied after the initial 402.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WakeAfterRequest"},"example":{"callback":"https://agent.example.com/wake","delay_seconds":300}}}},"responses":{"201":{"description":"Payment settled and the shared persistent Workflow scheduled. scheduled_for is the server-derived immutable UTC time.","headers":{"PAYMENT-RESPONSE":{"description":"Base64 x402 v2 settlement response.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WakeCreated"}}}},"400":{"description":"Invalid JSON, callback, delay_seconds, payment payload, or request commitment.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"402":{"description":"Payment required or invalid. Read PAYMENT-REQUIRED for x402 v2 requirements and the Bazaar declaration.","headers":{"PAYMENT-REQUIRED":{"description":"Base64 x402 v2 payment requirements.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error","wake402_delivery_contract"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}},"wake402_delivery_contract":{"$ref":"#/components/schemas/Wake402DeliveryContract"}}}}}},"409":{"description":"Payment Identifier conflicts with the immutable callback/delay or authorization binding, or reconciliation is already active.","headers":{"Retry-After":{"description":"Seconds before retrying when reconciliation is active.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"500":{"description":"A settled payment was retained but immutable scheduling or Workflow confirmation failed.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"503":{"description":"Payment configuration/storage/RPC is unavailable, or settlement remains indeterminate. Retry only the identical request and exact authorization.","headers":{"Retry-After":{"description":"Seconds before retrying the identical request.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}}},"x-x402":{"version":2,"scheme":"exact","price":"$0.002","asset":"USDC","network":"eip155:8453","network_name":"Base Mainnet","payment_identifier_required":true,"bazaar_capable":true,"request_commitment":{"extension":"wake402-request-commitment","required":true,"version":"2","signatureScheme":"eip712","domain":{"name":"WAKE402","version":"2","chainId":"derived from accepted.network","verifyingContract":"accepted.asset"},"primaryType":"WakeAfterRequest","signedFields":["protocol","paymentIdentifier","requestFingerprint","callback","delaySeconds","network","asset","amount","payTo"],"requestCanonicalization":{"callback":"validated WHATWG HTTPS URL serialized with URL.toString()","delaySeconds":"validated request delay_seconds integer from 60 through 86400","requestFingerprint":"sha256(utf8(JSON.stringify({protocol:\"WAKE402_RELATIVE_REQUEST_V1\",callback:<canonical>,delay_seconds:<integer>})))"},"scheduledTimeDerivation":{"anchor":"immutable payment_attempts.first_verified_at","formula":"scheduled_at = first_verified_at + delay_seconds","recomputeFromRetryTime":false},"payerBinding":"recovered commitment signer must equal the payer returned by official x402 verification and the verified EIP-3009 authorization.from","proofPath":"extensions.wake402-request-commitment.proof.signature","client_helper":"createWake402RelativeRequestCommitmentClientExtension"},"settlement_reconciliation":{"exact_authorization_only":true,"automatic_resubmission":false,"immutable_time_anchor":"payment_attempts.first_verified_at","cancellation_is_payment":false}},"x-wake402-delivery-contract":{"version":"1","delivery_semantics":"at-least-once","successful_delivery_guaranteed":false,"exact_second_timing_guaranteed":false,"timing":{"expectation":"for or shortly after the requested scheduled time","successful_delivery_sla_guaranteed":false},"schedule":{"min_delay_seconds":60,"max_delay_seconds":86400},"callback":{"method":"POST","content_type":"application/json","redirects_followed":false,"timeout_ms":5000,"authentication":{"mode":"none"},"idempotency_key":{"header":"Idempotency-Key","present":true,"value_semantics":"wake_id"},"body":{"format":"fixed","additional_properties":false,"fields":{"type":{"const":"wake402.wake"},"wake_id":{"value_semantics":"wake_id"},"scheduled_at":{"value_semantics":"scheduled wake time"},"fired_at":{"value_semantics":"delivery attempt time"}}}},"retry":{"first_delivery_attempt":"at-or-after-scheduled-time","retry_limit":3,"maximum_total_attempts":4,"initial_retry_delay":"5 seconds","backoff":"exponential","network_failures_retryable":true,"callback_timeout_retryable":true,"retryable_http_statuses":[408,425,429,500,501,502,503,504,505,506,507,508,510,511],"other_http_failures_retryable":false},"failure":{"terminal_state":"delivery_failed","successful_delivery_sla_guaranteed":false,"callback_response_body_retained":false,"automatic_refund_on_delivery_failure":false},"expiry":{"absolute_wall_clock_delivery_expiry_guaranteed":false,"semantics":"delivery processing ends on success, non-retryable failure, or bounded retry exhaustion; no absolute wall-clock expiry is promised"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]}}},"/v1/wakes/{wake_id}":{"get":{"operationId":"getWake","security":[],"tags":["Wake"],"summary":"Read safe public wake state","parameters":[{"name":"wake_id","in":"path","required":true,"schema":{"type":"string","pattern":"^wk_[a-f0-9]{32}$"}}],"responses":{"200":{"description":"Safe wake state; callback and payment metadata are omitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WakeState"}}}},"404":{"description":"Wake not found.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}}}}},"/v1/stats":{"get":{"operationId":"getStats","security":[],"tags":["Wake"],"summary":"Read aggregate stats computed from D1","responses":{"200":{"description":"Persisted aggregate product metrics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"}}}}}}},"/health":{"get":{"operationId":"health","security":[],"summary":"Read service and D1 health","responses":{"200":{"description":"Healthy.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"ok"}},"required":["status"]}}}},"503":{"description":"D1 unavailable.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}}}}},"/openapi.json":{"get":{"operationId":"openApi","security":[],"tags":["Discovery"],"summary":"OpenAPI 3.1 document","responses":{"200":{"description":"This document."}}}},"/llms.txt":{"get":{"operationId":"llmsText","security":[],"tags":["Discovery"],"summary":"Plain-text agent instructions","responses":{"200":{"description":"Machine-readable service guide."}}}},"/robots.txt":{"get":{"operationId":"robotsText","security":[],"tags":["Discovery"],"summary":"Crawler policy","responses":{"200":{"description":"Crawler policy."}}}},"/legal":{"get":{"operationId":"legalIndex","security":[],"tags":["Legal"],"summary":"English legal working-draft index","externalDocs":{"description":"Machine-readable legal status","url":"https://wake402.agentwake.workers.dev/legal.json"},"responses":{"200":{"description":"English legal working-draft index."}}}},"/legal/terms/draft-2026-08-v1":{"get":{"operationId":"draftTerms","security":[],"tags":["Legal"],"summary":"English Terms working draft 2026-08-v1","responses":{"200":{"description":"Draft terms; not effective or legally finalized."}}}},"/acceptable-use":{"get":{"operationId":"acceptableUse","security":[],"tags":["Legal"],"summary":"English Acceptable Use Policy working draft","responses":{"200":{"description":"Draft acceptable-use policy."}}}},"/privacy":{"get":{"operationId":"privacyNotice","security":[],"tags":["Legal"],"summary":"English privacy notice working draft","responses":{"200":{"description":"Draft privacy notice."}}}},"/imprint":{"get":{"operationId":"imprintDraft","security":[],"tags":["Legal"],"summary":"English imprint working template","responses":{"200":{"description":"Incomplete imprint draft with pending operator fields."}}}},"/de/legal":{"get":{"operationId":"germanLegalIndex","security":[],"tags":["Legal"],"summary":"German legal working-draft index","responses":{"200":{"description":"German legal working-draft index."}}}},"/de/legal/terms/draft-2026-08-v1":{"get":{"operationId":"germanDraftTerms","security":[],"tags":["Legal"],"summary":"German Terms / AGB working draft 2026-08-v1","responses":{"200":{"description":"German draft terms; not effective or legally finalized."}}}},"/de/acceptable-use":{"get":{"operationId":"germanAcceptableUse","security":[],"tags":["Legal"],"summary":"German Acceptable Use Policy working draft","responses":{"200":{"description":"German draft acceptable-use policy."}}}},"/de/privacy":{"get":{"operationId":"germanPrivacyNotice","security":[],"tags":["Legal"],"summary":"German privacy notice working draft","responses":{"200":{"description":"German draft privacy notice."}}}},"/de/imprint":{"get":{"operationId":"germanImprintDraft","security":[],"tags":["Legal"],"summary":"German imprint working template","responses":{"200":{"description":"Incomplete German imprint draft with pending operator fields."}}}},"/legal.json":{"get":{"operationId":"legalJson","security":[],"tags":["Legal","Discovery"],"summary":"Machine-readable legal draft status","responses":{"200":{"description":"Draft legal status. legal_ready is false.","content":{"application/json":{"schema":{"type":"object","required":["service","status","legal_ready","external_legal_review","default_language","languages","terms"],"properties":{"service":{"type":"string","const":"WAKE402"},"status":{"type":"string","const":"draft"},"legal_ready":{"type":"boolean","const":false},"external_legal_review":{"type":"string","const":"pending"},"default_language":{"type":"string","const":"en"},"languages":{"type":"object"},"terms":{"type":"object"}}}}}}}}},"/":{"get":{"operationId":"landingPage","security":[],"summary":"Human landing page","responses":{"200":{"description":"WAKE402 website."}}}}},"components":{"schemas":{"Error":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":true,"required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_CALLBACK","INVALID_TIMESTAMP","INVALID_DELAY","TIMESTAMP_TOO_SOON","TIMESTAMP_TOO_FAR","PAYMENT_REQUIRED","PAYMENT_INVALID","PAYMENT_SETTLEMENT_FAILURE","PAYMENT_SETTLEMENT_INDETERMINATE","PAYMENT_SETTLEMENT_IN_PROGRESS","PAYMENT_SETTLEMENT_TERMINAL","PAYMENT_IDEMPOTENCY_CONFLICT","PAYMENT_CONFIGURATION_ERROR","PAID_STATE_PERSISTENCE_FAILURE","WORKFLOW_CREATION_FAILURE","SCHEDULING_STATE_FAILURE","WAKE_NOT_FOUND","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}},"Wake402DeliveryContract":{"type":"object","const":{"version":"1","delivery_semantics":"at-least-once","successful_delivery_guaranteed":false,"exact_second_timing_guaranteed":false,"timing":{"expectation":"for or shortly after the requested scheduled time","successful_delivery_sla_guaranteed":false},"schedule":{"min_delay_seconds":60,"max_delay_seconds":86400},"callback":{"method":"POST","content_type":"application/json","redirects_followed":false,"timeout_ms":5000,"authentication":{"mode":"none"},"idempotency_key":{"header":"Idempotency-Key","present":true,"value_semantics":"wake_id"},"body":{"format":"fixed","additional_properties":false,"fields":{"type":{"const":"wake402.wake"},"wake_id":{"value_semantics":"wake_id"},"scheduled_at":{"value_semantics":"scheduled wake time"},"fired_at":{"value_semantics":"delivery attempt time"}}}},"retry":{"first_delivery_attempt":"at-or-after-scheduled-time","retry_limit":3,"maximum_total_attempts":4,"initial_retry_delay":"5 seconds","backoff":"exponential","network_failures_retryable":true,"callback_timeout_retryable":true,"retryable_http_statuses":[408,425,429,500,501,502,503,504,505,506,507,508,510,511],"other_http_failures_retryable":false},"failure":{"terminal_state":"delivery_failed","successful_delivery_sla_guaranteed":false,"callback_response_body_retained":false,"automatic_refund_on_delivery_failure":false},"expiry":{"absolute_wall_clock_delivery_expiry_guaranteed":false,"semantics":"delivery processing ends on success, non-retryable failure, or bounded retry exhaustion; no absolute wall-clock expiry is promised"}}},"WakeRequest":{"type":"object","additionalProperties":false,"required":["callback","at"],"properties":{"callback":{"type":"string","format":"uri","maxLength":2048,"description":"Public HTTPS URL on standard port 443."},"at":{"type":"string","format":"date-time","description":"UTC timestamp ending in Z, 60 seconds to 24 hours ahead."}}},"WakeAfterRequest":{"type":"object","additionalProperties":false,"required":["callback","delay_seconds"],"properties":{"callback":{"type":"string","format":"uri","maxLength":2048,"description":"Public HTTPS URL on standard port 443."},"delay_seconds":{"type":"integer","minimum":60,"maximum":86400,"description":"Delay after the first durable payment verification; retries preserve the original derived scheduled time."}}},"WakeCreated":{"type":"object","additionalProperties":false,"required":["wake_id","status","scheduled_for","delivery_semantics","status_url"],"properties":{"wake_id":{"type":"string","pattern":"^wk_[a-f0-9]{32}$"},"status":{"type":"string","const":"scheduled"},"scheduled_for":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC Date.toISOString() value."},"delivery_semantics":{"type":"string","const":"at-least-once"},"status_url":{"type":"string","format":"uri","description":"HTTPS URL on the same WAKE402 origin at /v1/wakes/{wake_id}, without credentials, query, or fragment."}}},"WakeState":{"type":"object","additionalProperties":false,"required":["wake_id","status","scheduled_at","attempt_count","delivered_at"],"properties":{"wake_id":{"type":"string"},"status":{"type":"string","enum":["paid_but_not_scheduled","scheduled","delivering","delivered","delivery_failed"]},"scheduled_at":{"type":"string","format":"date-time"},"attempt_count":{"type":"integer","minimum":0},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"Stats":{"type":"object","additionalProperties":false,"required":["wakes_scheduled","wakes_delivered","wakes_failed","delivery_success_rate","usdc_paid"],"properties":{"wakes_scheduled":{"type":"integer","minimum":0},"wakes_delivered":{"type":"integer","minimum":0},"wakes_failed":{"type":"integer","minimum":0},"delivery_success_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"usdc_paid":{"type":"string","pattern":"^\\d+\\.\\d{2}$"}}}}},"externalDocs":{"description":"WAKE402 Agent Quickstart and executable TypeScript example","url":"https://wake402.agentwake.workers.dev/quickstart"},"x-wake402":{"environment":"production","network":"eip155:8453","supported_networks":["eip155:84532","eip155:8453"],"production_price_usdc":"0.002","delivery_contract":{"version":"1","delivery_semantics":"at-least-once","successful_delivery_guaranteed":false,"exact_second_timing_guaranteed":false,"timing":{"expectation":"for or shortly after the requested scheduled time","successful_delivery_sla_guaranteed":false},"schedule":{"min_delay_seconds":60,"max_delay_seconds":86400},"callback":{"method":"POST","content_type":"application/json","redirects_followed":false,"timeout_ms":5000,"authentication":{"mode":"none"},"idempotency_key":{"header":"Idempotency-Key","present":true,"value_semantics":"wake_id"},"body":{"format":"fixed","additional_properties":false,"fields":{"type":{"const":"wake402.wake"},"wake_id":{"value_semantics":"wake_id"},"scheduled_at":{"value_semantics":"scheduled wake time"},"fired_at":{"value_semantics":"delivery attempt time"}}}},"retry":{"first_delivery_attempt":"at-or-after-scheduled-time","retry_limit":3,"maximum_total_attempts":4,"initial_retry_delay":"5 seconds","backoff":"exponential","network_failures_retryable":true,"callback_timeout_retryable":true,"retryable_http_statuses":[408,425,429,500,501,502,503,504,505,506,507,508,510,511],"other_http_failures_retryable":false},"failure":{"terminal_state":"delivery_failed","successful_delivery_sla_guaranteed":false,"callback_response_body_retained":false,"automatic_refund_on_delivery_failure":false},"expiry":{"absolute_wall_clock_delivery_expiry_guaranteed":false,"semantics":"delivery processing ends on success, non-retryable failure, or bounded retry exhaustion; no absolute wall-clock expiry is promised"}}}}