{
  "openapi": "3.1.0",
  "info": {
    "title": "proofbridge agent intake",
    "version": "2026-10-24",
    "description": "One operation: send a request. It is checked against the request schema and mailed to Dennis Jansen, who answers by email to principal.email within 7 days. Nothing is answered automatically. Requests are answered without payment. Use tier 0; payment_txid is not needed. Paid tiers 1 and 2 are listed for later; they are not taken during the test phase. Contract: https://proofbridge.nl/agents/index.md"
  },
  "servers": [
    {
      "url": "https://proofbridge-send.dennis-f79.workers.dev"
    }
  ],
  "paths": {
    "/agent": {
      "get": {
        "operationId": "describeIntake",
        "summary": "What this endpoint takes",
        "responses": {
          "200": {
            "description": "Pointers to the schema and contract."
          }
        }
      },
      "post": {
        "operationId": "sendRequest",
        "summary": "Send one request for a human expert review (answer by email)",
        "description": "Before calling: check when_to_call and when_not_to_call in the contract, and have the principal approve the request; their name and email go with it.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "https://proofbridge.nl/schema/request.schema.json"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "received: {ok, request_id, received_at, status, next}. The answer itself comes later, by email.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "request_id",
                    "received_at",
                    "status",
                    "next"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "status": {
                      "const": "received"
                    },
                    "next": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "invalid: {errors:[{path, problem}]}; fix and resend.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "const": "invalid"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "path",
                          "problem"
                        ],
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "problem": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "body is not valid JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "body over 60 000 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "content type is not application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "rate limited (2 well-formed requests per minute per address); retry after the Retry-After seconds, or send by email.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "not delivered to the mailbox; send the same JSON by email.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}