{
    "openapi": "3.1.0",
    "info": {
        "title": "Fox Grove Forms API",
        "version": "1.0.0",
        "description": "Manage hosted forms for static websites and read their submissions.\n\nAuthenticate with a team API token (Team \u2192 API tokens in the dashboard) sent as `Authorization: Bearer <token>`. Tokens have the `read` ability, and optionally `write` for creating, updating and deleting. Every token only sees its own team. API access needs the Pro or Agency plan.\n\nVisitors submit forms to the public, unauthenticated `submit_url` of each form (`POST /api/forms/{token}`), as JSON or multipart form data. That endpoint is not part of this authenticated API.\n\nAI agents can use the same operations as tools through the MCP server at https://foxgrove.media/mcp with the same Bearer token."
    },
    "servers": [
        {
            "url": "https://foxgrove.media/api/v1"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "Team",
            "description": "The token's team, plan limits and usage."
        },
        {
            "name": "Forms",
            "description": "Create, read, update and delete forms and their fields."
        },
        {
            "name": "Submissions",
            "description": "Read and delete stored form submissions."
        }
    ],
    "paths": {
        "/team": {
            "get": {
                "tags": [
                    "Team"
                ],
                "operationId": "getTeam",
                "summary": "Get the team, its plan limits and usage",
                "responses": {
                    "200": {
                        "description": "The team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Team"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "The team's plan does not include the API (or a plan limit was reached).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required ability (read or write) or is not linked to a team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (60 requests per minute per token).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/field-types": {
            "get": {
                "tags": [
                    "Forms"
                ],
                "operationId": "listFieldTypes",
                "summary": "List the field types a form can use",
                "responses": {
                    "200": {
                        "description": "Field types.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/FieldType"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "The team's plan does not include the API (or a plan limit was reached).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required ability (read or write) or is not linked to a team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (60 requests per minute per token).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/forms": {
            "get": {
                "tags": [
                    "Forms"
                ],
                "operationId": "listForms",
                "summary": "List forms",
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 50
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of forms.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Form"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "description": "URLs of the first, last, previous and next pages."
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "Pagination details: current_page, last_page, per_page, total."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "The team's plan does not include the API (or a plan limit was reached).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required ability (read or write) or is not linked to a team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (60 requests per minute per token).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Forms"
                ],
                "operationId": "createForm",
                "summary": "Create a form",
                "description": "Requires the `write` ability. Without `fields`, the form starts with name, email and message fields. Fields are rendered in the order given.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/FormInput"
                                    },
                                    {
                                        "required": [
                                            "name"
                                        ]
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The created form.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Form"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "The team's plan does not include the API (or a plan limit was reached).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required ability (read or write) or is not linked to a team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (60 requests per minute per token).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/forms/{form}": {
            "parameters": [
                {
                    "name": "form",
                    "in": "path",
                    "required": true,
                    "description": "The form token (16 characters), e.g. from the embed code.",
                    "schema": {
                        "type": "string"
                    }
                }
            ],
            "get": {
                "tags": [
                    "Forms"
                ],
                "operationId": "getForm",
                "summary": "Get a form with its settings, fields and embed code",
                "responses": {
                    "200": {
                        "description": "The form.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Form"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No form (or submission) with that identifier belongs to the token's team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "The team's plan does not include the API (or a plan limit was reached).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required ability (read or write) or is not linked to a team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (60 requests per minute per token).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "tags": [
                    "Forms"
                ],
                "operationId": "updateForm",
                "summary": "Update a form",
                "description": "Requires the `write` ability. Send only the keys to change. When `fields` is sent it replaces all of the form's fields; read the form first to edit a single field. PUT is accepted as an alias.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/FormInput"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The updated form.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Form"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No form (or submission) with that identifier belongs to the token's team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "The team's plan does not include the API (or a plan limit was reached).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required ability (read or write) or is not linked to a team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (60 requests per minute per token).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Forms"
                ],
                "operationId": "deleteForm",
                "summary": "Delete a form",
                "description": "Requires the `write` ability. Moves the form to the trash; it stops loading on websites and can be restored from the dashboard.",
                "responses": {
                    "204": {
                        "description": "Deleted."
                    },
                    "404": {
                        "description": "No form (or submission) with that identifier belongs to the token's team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "The team's plan does not include the API (or a plan limit was reached).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required ability (read or write) or is not linked to a team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (60 requests per minute per token).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/forms/{form}/submissions": {
            "get": {
                "tags": [
                    "Submissions"
                ],
                "operationId": "listSubmissions",
                "summary": "List a form's submissions, newest first",
                "parameters": [
                    {
                        "name": "form",
                        "in": "path",
                        "required": true,
                        "description": "The form token (16 characters), e.g. from the embed code.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "description": "Only submissions on or after this date/time (ISO 8601).",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "until",
                        "in": "query",
                        "description": "Only submissions on or before this date/time (ISO 8601).",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Case-insensitive text to look for in any submitted value.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "unread",
                        "in": "query",
                        "description": "Only submissions nobody has opened in the dashboard.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 50
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of submissions.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Submission"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "description": "URLs of the first, last, previous and next pages."
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "Pagination details: current_page, last_page, per_page, total."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No form (or submission) with that identifier belongs to the token's team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "The team's plan does not include the API (or a plan limit was reached).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required ability (read or write) or is not linked to a team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (60 requests per minute per token).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/forms/{form}/submissions/{submission}": {
            "parameters": [
                {
                    "name": "form",
                    "in": "path",
                    "required": true,
                    "description": "The form token (16 characters), e.g. from the embed code.",
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "name": "submission",
                    "in": "path",
                    "required": true,
                    "schema": {
                        "type": "integer"
                    }
                }
            ],
            "get": {
                "tags": [
                    "Submissions"
                ],
                "operationId": "getSubmission",
                "summary": "Get a submission",
                "responses": {
                    "200": {
                        "description": "The submission.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Submission"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No form (or submission) with that identifier belongs to the token's team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "The team's plan does not include the API (or a plan limit was reached).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required ability (read or write) or is not linked to a team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (60 requests per minute per token).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Submissions"
                ],
                "operationId": "deleteSubmission",
                "summary": "Delete a submission",
                "description": "Requires the `write` ability. Moves the submission to the trash; it can be restored from the dashboard.",
                "responses": {
                    "204": {
                        "description": "Deleted."
                    },
                    "404": {
                        "description": "No form (or submission) with that identifier belongs to the token's team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "The team's plan does not include the API (or a plan limit was reached).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required ability (read or write) or is not linked to a team.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (60 requests per minute per token).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "A team API token."
            }
        },
        "schemas": {
            "FieldType": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "text",
                            "email",
                            "tel",
                            "number",
                            "url",
                            "date",
                            "time",
                            "textarea",
                            "select",
                            "radio",
                            "checkboxes",
                            "checkbox",
                            "state",
                            "file",
                            "hidden",
                            "submit",
                            "reset",
                            "open-div",
                            "close-div",
                            "horizontal-rule"
                        ]
                    },
                    "label": {
                        "type": "string"
                    },
                    "collects_input": {
                        "type": "boolean",
                        "description": "False for layout and button types (open-div, close-div, horizontal-rule, submit, reset)."
                    },
                    "has_options": {
                        "type": "boolean",
                        "description": "True for select, radio and checkboxes, which need options."
                    },
                    "accepts_options": {
                        "type": "boolean",
                        "description": "True for select, radio, checkboxes and checkbox. Options are optional for a checkbox."
                    }
                }
            },
            "Field": {
                "type": "object",
                "required": [
                    "type"
                ],
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "text",
                            "email",
                            "tel",
                            "number",
                            "url",
                            "date",
                            "time",
                            "textarea",
                            "select",
                            "radio",
                            "checkboxes",
                            "checkbox",
                            "state",
                            "file",
                            "hidden",
                            "submit",
                            "reset",
                            "open-div",
                            "close-div",
                            "horizontal-rule"
                        ],
                        "description": "open-div / close-div wrap the fields between them in a <div> (put layout classes in wrapper_css)."
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^[A-Za-z0-9_\\-]+$",
                        "maxLength": 100,
                        "description": "Key used in submissions, emails and exports. Required and unique for input types. Name an email field \"email\" to enable auto-replies and Mailchimp."
                    },
                    "label": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Required for input types; button text for submit/reset."
                    },
                    "required": {
                        "type": "boolean",
                        "default": false
                    },
                    "show_label": {
                        "type": "boolean",
                        "default": true,
                        "description": "Hidden labels are still read by screen readers."
                    },
                    "published": {
                        "type": "boolean",
                        "default": true,
                        "description": "False hides the field from the live form (it is not rendered or validated) but keeps it, and its past submission values, on the form."
                    },
                    "placeholder": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Placeholder text; the value for hidden fields; helper text for checkboxes; empty-option text for dropdowns."
                    },
                    "options": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        },
                        "description": "Choices for select, radio and checkboxes fields (required; checkboxes values are submitted as an array). Optional for a checkbox: one value is what the checkbox submits instead of \"Yes\"; two or more (as items or one comma-separated string) make a group where visitors can tick several, submitted as an array."
                    },
                    "input_css": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Extra CSS classes on the input."
                    },
                    "wrapper_css": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "CSS classes on the field wrapper (or the group, for open-div)."
                    }
                }
            },
            "FormInput": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Form name, shown in the dashboard and as the heading when show_title is true."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000,
                        "description": "Optional intro text shown above the fields."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "Whether the form loads on websites and accepts submissions."
                    },
                    "show_title": {
                        "type": "boolean",
                        "description": "Show the form name as a heading."
                    },
                    "success_message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Message shown after a successful submission (when there is no redirect_url)."
                    },
                    "redirect_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "description": "Send visitors to this http(s) URL after submitting."
                    },
                    "form_css": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "CSS classes on the element that wraps all fields, e.g. \"grid grid-cols-2 gap-4\"."
                    },
                    "submit_text": {
                        "type": "string",
                        "maxLength": 100,
                        "description": "Submit button text."
                    },
                    "submit_css": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Extra CSS classes for the submit button."
                    },
                    "show_cancel": {
                        "type": "boolean",
                        "description": "Show a reset button."
                    },
                    "cancel_text": {
                        "type": "string",
                        "maxLength": 100,
                        "description": "Reset button text."
                    },
                    "cancel_css": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Extra CSS classes for the reset button."
                    },
                    "captcha_enabled": {
                        "type": "boolean",
                        "description": "Require hCaptcha on submissions."
                    },
                    "allowed_domains": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "maxItems": 20,
                        "items": {
                            "type": "string"
                        },
                        "description": "Only accept submissions from these domains (e.g. \"example.com\", \"*.example.com\"). Null accepts any."
                    },
                    "notify_enabled": {
                        "type": "boolean",
                        "description": "Email each submission to notify_emails."
                    },
                    "notify_emails": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "maxItems": 10,
                        "items": {
                            "type": "string",
                            "format": "email"
                        },
                        "description": "Notification recipients. Null sends to the team owner."
                    },
                    "auto_reply_enabled": {
                        "type": "boolean",
                        "description": "Email the submitter (needs a field named \"email\", the plan feature, and a subject and body)."
                    },
                    "auto_reply_subject": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Auto-reply subject. {{ field_name }} placeholders are replaced with submitted values."
                    },
                    "auto_reply_body": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100000,
                        "description": "Auto-reply body, plain text or HTML, with {{ field_name }} placeholders."
                    },
                    "auto_reply_from_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100,
                        "description": "Auto-reply sender name. Defaults to the team name."
                    },
                    "auto_reply_from_email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "description": "Sender address; only used for domains verified with the mail provider."
                    },
                    "auto_reply_reply_to": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "description": "Reply-to address for auto-replies."
                    },
                    "mailchimp_enabled": {
                        "type": "boolean",
                        "description": "Add submitters to a Mailchimp audience (needs the plan feature and Mailchimp connected for the team)."
                    },
                    "mailchimp_audience_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100,
                        "description": "Mailchimp audience (list) ID."
                    },
                    "mailchimp_double_opt_in": {
                        "type": "boolean",
                        "description": "Ask new subscribers to confirm by email first."
                    },
                    "fields": {
                        "type": "array",
                        "maxItems": 100,
                        "items": {
                            "$ref": "#/components/schemas/Field"
                        },
                        "description": "The complete, ordered list of fields. Replaces existing fields on update."
                    }
                }
            },
            "Form": {
                "type": "object",
                "properties": {
                    "token": {
                        "type": "string",
                        "description": "Public identifier used in embed codes and URLs."
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Form name, shown in the dashboard and as the heading when show_title is true."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000,
                        "description": "Optional intro text shown above the fields."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "Whether the form loads on websites and accepts submissions."
                    },
                    "show_title": {
                        "type": "boolean",
                        "description": "Show the form name as a heading."
                    },
                    "success_message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Message shown after a successful submission (when there is no redirect_url)."
                    },
                    "redirect_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "description": "Send visitors to this http(s) URL after submitting."
                    },
                    "form_css": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "CSS classes on the element that wraps all fields, e.g. \"grid grid-cols-2 gap-4\"."
                    },
                    "submit_text": {
                        "type": "string",
                        "maxLength": 100,
                        "description": "Submit button text."
                    },
                    "submit_css": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Extra CSS classes for the submit button."
                    },
                    "show_cancel": {
                        "type": "boolean",
                        "description": "Show a reset button."
                    },
                    "cancel_text": {
                        "type": "string",
                        "maxLength": 100,
                        "description": "Reset button text."
                    },
                    "cancel_css": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Extra CSS classes for the reset button."
                    },
                    "captcha_enabled": {
                        "type": "boolean",
                        "description": "Require hCaptcha on submissions."
                    },
                    "allowed_domains": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "maxItems": 20,
                        "items": {
                            "type": "string"
                        },
                        "description": "Only accept submissions from these domains (e.g. \"example.com\", \"*.example.com\"). Null accepts any."
                    },
                    "notify_enabled": {
                        "type": "boolean",
                        "description": "Email each submission to notify_emails."
                    },
                    "notify_emails": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "maxItems": 10,
                        "items": {
                            "type": "string",
                            "format": "email"
                        },
                        "description": "Notification recipients. Null sends to the team owner."
                    },
                    "auto_reply_enabled": {
                        "type": "boolean",
                        "description": "Email the submitter (needs a field named \"email\", the plan feature, and a subject and body)."
                    },
                    "auto_reply_subject": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Auto-reply subject. {{ field_name }} placeholders are replaced with submitted values."
                    },
                    "auto_reply_body": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100000,
                        "description": "Auto-reply body, plain text or HTML, with {{ field_name }} placeholders."
                    },
                    "auto_reply_from_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100,
                        "description": "Auto-reply sender name. Defaults to the team name."
                    },
                    "auto_reply_from_email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "description": "Sender address; only used for domains verified with the mail provider."
                    },
                    "auto_reply_reply_to": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "description": "Reply-to address for auto-replies."
                    },
                    "mailchimp_enabled": {
                        "type": "boolean",
                        "description": "Add submitters to a Mailchimp audience (needs the plan feature and Mailchimp connected for the team)."
                    },
                    "mailchimp_audience_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100,
                        "description": "Mailchimp audience (list) ID."
                    },
                    "mailchimp_double_opt_in": {
                        "type": "boolean",
                        "description": "Ask new subscribers to confirm by email first."
                    },
                    "fields": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Field"
                        }
                    },
                    "embed": {
                        "type": "object",
                        "description": "How to put the form on a website.",
                        "properties": {
                            "snippet": {
                                "type": "string",
                                "description": "HTML to paste where the form should appear."
                            },
                            "script_url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "html_url": {
                                "type": "string",
                                "format": "uri",
                                "description": "GET returns {\"html\": \"...\"} with the rendered form."
                            },
                            "submit_url": {
                                "type": "string",
                                "format": "uri",
                                "description": "Public endpoint visitors POST submissions to (JSON or form data, keyed by field name)."
                            }
                        }
                    },
                    "accepting_submissions": {
                        "type": "boolean",
                        "description": "False when the form is inactive or the team has no active plan."
                    },
                    "submissions_count": {
                        "type": "integer"
                    },
                    "dashboard_url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "Submission": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "form_token": {
                        "type": "string"
                    },
                    "values": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Submitted values keyed by field name. File fields hold the original file name; checkbox groups hold an array of the ticked values."
                    },
                    "files": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "field": {
                                    "type": "string"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "size": {
                                    "type": "integer"
                                },
                                "mime_type": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "url": {
                                    "type": "string",
                                    "format": "uri",
                                    "description": "Download link that expires after 30 minutes."
                                }
                            }
                        }
                    },
                    "read": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "Team": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "plan": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Null when the team has no active plan (its forms are paused).",
                        "properties": {
                            "key": {
                                "type": "string",
                                "enum": [
                                    "starter",
                                    "pro",
                                    "agency"
                                ]
                            },
                            "name": {
                                "type": "string"
                            },
                            "limits": {
                                "type": "object",
                                "description": "forms, submissions (per month), members, upload_kb. Null means unlimited."
                            },
                            "features": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "enum": [
                                        "auto_reply",
                                        "file_uploads",
                                        "mailchimp",
                                        "api"
                                    ]
                                }
                            }
                        }
                    },
                    "on_trial": {
                        "type": "boolean"
                    },
                    "trial_ends_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "usage": {
                        "type": "object",
                        "properties": {
                            "forms": {
                                "type": "integer"
                            },
                            "submissions_this_month": {
                                "type": "integer"
                            },
                            "members": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "Error": {
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string"
                    },
                    "code": {
                        "type": "string",
                        "description": "Present for some errors, e.g. plan_limit_reached."
                    }
                }
            },
            "ValidationError": {
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "description": "Messages keyed by the payload field, e.g. \"fields.2.name\"."
                    }
                }
            }
        }
    }
}