{
  "openapi": "3.1.0",
  "info": {
    "title": "zpe-forms",
    "version": "7.0.2",
    "description": "The form backend on zpe.vc/forms: a page a stranger fills in, every submission landing in the account that owns the form, and the console's own data. A stranger writes with one public id and no session; an account reads and changes its own rows either with the door's session (what the console itself does) or with a key (what a machine does), and both end at the same account. The machine surface answers at exactly one base, /_/api/v1, and the document below is served at /_/api/v1/openapi.json. The unversioned machine paths this app answered before the move are 308 signposts at their versioned address."
  },
  "servers": [
    {
      "url": "/forms",
      "description": "zpe-forms on zpe.vc"
    }
  ],
  "paths": {
    "/_/api/v1/forms/{publicId}/submissions": {
      "post": {
        "operationId": "postFormsByIdSubmissions",
        "summary": "Write one submission to the form that owns this public id",
        "tags": [
          "submissions"
        ],
        "parameters": [
          {
            "name": "publicId",
            "in": "path",
            "description": "The form's public id, the one its `/f/<publicId>` link carries.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "A value that names this attempt. Send the same one when retrying and the answer is the submission the first call wrote (`200`) instead of a second row; present and empty is refused. The form's own page cannot set a header, so it carries the same value in a body field of the same name.",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The stranger's answers, as an object keyed by the keys the form's own questions declare. A key the form never declared is refused (`422`), so read the form's page for the set. `Idempotency-Key` may ride here instead of the header, because the page's own form cannot set one.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "Idempotency-Key": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "The page's copy of the retry handle: the same value the `Idempotency-Key` header carries. Lifted out of the body before the questions are judged, never stored as an answer."
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "Idempotency-Key": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "The page's copy of the retry handle: the same value the `Idempotency-Key` header carries. Lifted out of the body before the questions are judged, never stored as an answer."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "Idempotency-Key": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "The page's copy of the retry handle: the same value the `Idempotency-Key` header carries. Lifted out of the body before the questions are judged, never stored as an answer."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Nothing new was written: this `Idempotency-Key` already wrote a submission to this form, and this is the id of the row the first call wrote.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string",
                      "description": "The submission's id inside the account that owns the form. Not a credential."
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "The submission was written to the account that owns this form. The body names its id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "id"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string",
                      "description": "The submission's id inside the account that owns the form. Not a credential."
                    }
                  }
                }
              }
            }
          },
          "303": {
            "description": "The caller posted the page's own form rather than asking for JSON, so the answer is the page it came from (or `?redirect=`, or the form's page with `sent=1`). No body."
          },
          "400": {
            "description": "The body is not JSON, or is not an object, or `Idempotency-Key` was sent empty or longer than 200 characters.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing or does not open this account",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "This account may not do that",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "That public id names no form on this deployment.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "The body is over this deployment's `MAX_SUBMISSION_BYTES`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is not `application/json`, `application/x-www-form-urlencoded` or `multipart/form-data`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A question the form declares was left unanswered, a value is too long or is not the shape its key asks for, nothing at all was filled in, or the body carries a key the form never declared. Nothing was written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "options": {
        "operationId": "optionsFormsByIdSubmissions",
        "summary": "CORS preflight for the write path, answered before any credential",
        "tags": [
          "submissions"
        ],
        "parameters": [
          {
            "name": "publicId",
            "in": "path",
            "description": "The form's public id, the one its `/f/<publicId>` link carries.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content: the preflight's policy is in the headers (`access-control-allow-origin`, `-methods`, `-headers`, `-max-age`) and the answer carries no body. Answered before any credential is read."
          },
          "500": {
            "description": "The deployment failed while answering. The wrapper answers this for any matched route whose handler throws, so it is published rather than left for a caller to discover.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The database schema could not be created, so the request was refused before it reached the handler. Nothing was read and nothing was written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/_/api/v1/submissions": {
      "get": {
        "operationId": "getSubmissions",
        "summary": "Read the 200 most recent submissions of every form this account owns",
        "tags": [
          "submissions"
        ],
        "responses": {
          "200": {
            "description": "Every form this account owns, and its 200 most recent submissions, newest first, each named by the form it came from.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "No key and no session: the caller is not signed in at the door, or the key it sent is unknown, revoked or expired.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "This credential opens no account here, this key is not granted this app, or — on a write — the request came from another origin.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "This key has spent its ceiling of 120 requests in the current minute; `retry-after` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "This app failed while answering",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The door did not answer, or this deployment could not create its schema, so nothing was read and nothing was written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/_/api/v1/console/me": {
      "get": {
        "operationId": "getConsoleMe",
        "summary": "Who the caller is, as the door names them",
        "tags": [
          "account"
        ],
        "responses": {
          "200": {
            "description": "The account the door named for this caller, and the email the session carries (`null` for a key, which names no person).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "No key and no session: the caller is not signed in at the door, or the key it sent is unknown, revoked or expired.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "This credential opens no account here, this key is not granted this app, or — on a write — the request came from another origin.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "This key has spent its ceiling of 120 requests in the current minute; `retry-after` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "This app failed while answering",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The door did not answer, or this deployment could not create its schema, so nothing was read and nothing was written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/_/api/v1/console/forms": {
      "get": {
        "operationId": "getConsoleForms",
        "summary": "List this account's forms, oldest first, with a submission count and the last one's time",
        "tags": [
          "forms"
        ],
        "responses": {
          "200": {
            "description": "This account's forms, oldest first, each with its submission count and the time of its last one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "No key and no session: the caller is not signed in at the door, or the key it sent is unknown, revoked or expired.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "This credential opens no account here, this key is not granted this app, or — on a write — the request came from another origin.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "This key has spent its ceiling of 120 requests in the current minute; `retry-after` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "This app failed while answering",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The door did not answer, or this deployment could not create its schema, so nothing was read and nothing was written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postConsoleForms",
        "summary": "Create a form in this account; the slug comes from the name and the public id is minted here",
        "tags": [
          "forms"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "A value that names this attempt. Send the same one when retrying and the answer is the form the first call wrote (`200`) instead of `a form named … already exists`; present and empty is refused.",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The form's name. Its slug is derived once, here, and never moves."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Nothing new was written: this `Idempotency-Key` already created a form in this account, and this is the row the first call wrote.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "form"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "form": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "public_id",
                        "created_at",
                        "updated_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The form's slug, unique inside the account."
                        },
                        "name": {
                          "type": "string"
                        },
                        "public_id": {
                          "type": "string",
                          "description": "The unguessable id a stranger's page is addressed by."
                        },
                        "created_at": {
                          "type": "integer"
                        },
                        "updated_at": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "The form was created in this account. Its slug comes from the name.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "form"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "form": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "public_id",
                        "created_at",
                        "updated_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The form's slug, unique inside the account."
                        },
                        "name": {
                          "type": "string"
                        },
                        "public_id": {
                          "type": "string",
                          "description": "The unguessable id a stranger's page is addressed by."
                        },
                        "created_at": {
                          "type": "integer"
                        },
                        "updated_at": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The body names no form, its name has no letter or digit, the name is one of this app's own addresses, a form with that name already exists in this account, or `Idempotency-Key` was sent empty or over 200 characters.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing or does not open this account",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "This account may not do that",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Nothing is here",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/_/api/v1/console/forms/{id}": {
      "get": {
        "operationId": "getConsoleFormsById",
        "summary": "One form of this account, with its submission stats and its last 30 days",
        "tags": [
          "forms"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The form's slug, unique within this account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The form, its question set (`null` when it inherits the three defaults), its submission stats and its last 30 days.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "The path carries a malformed percent escape, so the slug cannot be read and no form can be addressed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key and no session: the caller is not signed in at the door, or the key it sent is unknown, revoked or expired.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "This credential opens no account here, this key is not granted this app, or — on a write — the request came from another origin.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No form in this account answers to that slug.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "This key has spent its ceiling of 120 requests in the current minute; `retry-after` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "This app failed while answering",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The door did not answer, or this deployment could not create its schema, so nothing was read and nothing was written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "patchConsoleFormsById",
        "summary": "Rename a form or replace its question set; the slug and the public id do not move",
        "tags": [
          "forms"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The form's slug, unique within this account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The new name. A form's address is fixed at creation."
                  },
                  "fields": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "description": "The form's own questions, in the order the page asks them, or null to inherit the three defaults. Replaces the whole set.",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label",
                        "kind",
                        "required"
                      ],
                      "properties": {
                        "key": {
                          "type": "string",
                          "description": "What a submission is keyed by: a letter, then letters, digits or underscores."
                        },
                        "label": {
                          "type": "string",
                          "description": "The question in the owner's words, up to 80 characters."
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "text",
                            "email",
                            "url",
                            "textarea"
                          ]
                        },
                        "required": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The form was renamed or its question set replaced; the row published is the one now stored.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "The body is not JSON, is not an object, carries neither a name nor a field set, or names a field set this app will not store.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key and no session: the caller is not signed in at the door, or the key it sent is unknown, revoked or expired.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "This credential opens no account here, this key is not granted this app, or — on a write — the request came from another origin.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No form in this account answers to that slug, so nothing was changed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "The body is larger than this deployment's `MAX_SUBMISSION_BYTES`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body is neither `application/json` nor `application/x-www-form-urlencoded`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "This key has spent its ceiling of 120 requests in the current minute; `retry-after` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "This app failed while answering",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The door did not answer, or this deployment could not create its schema, so nothing was read and nothing was written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteConsoleFormsById",
        "summary": "Delete a form and every submission it received",
        "tags": [
          "forms"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The form's slug, unique within this account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The form and every submission it received were deleted; `deleted` counts the rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "The path carries a malformed percent escape, so the slug cannot be read and no form can be addressed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key and no session: the caller is not signed in at the door, or the key it sent is unknown, revoked or expired.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "This credential opens no account here, this key is not granted this app, or — on a write — the request came from another origin.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No form in this account answers to that slug, so nothing was deleted.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "This key has spent its ceiling of 120 requests in the current minute; `retry-after` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "This app failed while answering",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The door did not answer, or this deployment could not create its schema, so nothing was read and nothing was written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/_/api/v1/console/forms/{id}/submissions": {
      "get": {
        "operationId": "getConsoleFormsByIdSubmissions",
        "summary": "This form's submissions, newest first",
        "tags": [
          "submissions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The form's slug, unique within this account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many rows to return; the deployment caps it.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "This form's submissions, newest first, capped by `limit` and by this deployment's own ceiling.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "The path carries a malformed percent escape, so the slug cannot be read and no form can be addressed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key and no session: the caller is not signed in at the door, or the key it sent is unknown, revoked or expired.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "This credential opens no account here, this key is not granted this app, or — on a write — the request came from another origin.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No form in this account answers to that slug.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "This key has spent its ceiling of 120 requests in the current minute; `retry-after` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "This app failed while answering",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The door did not answer, or this deployment could not create its schema, so nothing was read and nothing was written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/_/api/v1/console/forms/{id}/submissions/{submissionId}": {
      "delete": {
        "operationId": "deleteConsoleFormsByIdSubmissionsById",
        "summary": "Delete one submission of this account's form",
        "tags": [
          "submissions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The form's slug, unique within this account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "submissionId",
            "in": "path",
            "description": "The submission's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The submission was deleted; `deleted` counts the row.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A path segment carries a malformed percent escape, so the form or the submission cannot be addressed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "No key and no session: the caller is not signed in at the door, or the key it sent is unknown, revoked or expired.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "This credential opens no account here, this key is not granted this app, or — on a write — the request came from another origin.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No submission in this account's form answers to that id, so nothing was deleted.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "This key has spent its ceiling of 120 requests in the current minute; `retry-after` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "This app failed while answering",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The door did not answer, or this deployment could not create its schema, so nothing was read and nothing was written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/_/api/v1/console/settings": {
      "get": {
        "operationId": "getConsoleSettings",
        "summary": "What this deployment does about mail, which is not a setting a form can hold",
        "tags": [
          "account"
        ],
        "responses": {
          "200": {
            "description": "What this deployment does about mail for submissions: nothing is sent, so `settings` is null and `managed` is the estate.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "No key and no session: the caller is not signed in at the door, or the key it sent is unknown, revoked or expired.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "This credential opens no account here, this key is not granted this app, or — on a write — the request came from another origin.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "This key has spent its ceiling of 120 requests in the current minute; `retry-after` says when to try again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "This app failed while answering",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The door did not answer, or this deployment could not create its schema, so nothing was read and nothing was written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key minted on the account's settings page at zpe.vc/home/settings. Send it as `Authorization: Bearer <key>`."
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem+json: `type`, `title`, `status`, `code` and `instance`, plus `detail` when a person should read a sentence.",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "instance"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string",
            "enum": [
              "bad-request",
              "unauthenticated",
              "malformed",
              "unknown",
              "mismatch",
              "revoked",
              "expired",
              "another-account",
              "scope-refused",
              "grant-refused",
              "forbidden",
              "not-found",
              "method-not-allowed",
              "conflict",
              "gone",
              "payload-too-large",
              "unsupported-media-type",
              "unprocessable",
              "rate-limited",
              "payment-required",
              "not-open",
              "internal",
              "unavailable"
            ]
          },
          "instance": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-surface": {
    "app": "zpe-forms",
    "base": "/_/api/v1",
    "document": "/_/api/v1/openapi.json",
    "generated_by": "zpe-kit machineDocument"
  },
  "x-zpe-routes": 12,
  "x-zpe-documented": 12,
  "x-zpe-internal": []
}
