> ## Documentation Index
> Fetch the complete documentation index at: https://formbnb.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Save Form HTML

> Save HTML template for a form to S3 storage.



## OpenAPI

````yaml PUT /forms/{id}/html
openapi: 3.1.0
info:
  title: FormBnB API
  version: 1.0.0
  description: API for FormBnB - Form backend as a service
servers:
  - url: https://api.formbnb.com
security: []
paths:
  /forms/{id}/html:
    put:
      tags:
        - Forms
        - HTML
      summary: Save form HTML
      description: Save HTML template for a form to S3 storage.
      parameters:
        - schema:
            type: string
            description: Form ID
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveFormHtmlRequest'
      responses:
        '200':
          description: HTML saved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaveFormHtmlResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Form not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Storage error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    SaveFormHtmlRequest:
      type: object
      properties:
        html:
          type: string
          minLength: 1
          description: HTML content for the form page
      required:
        - html
    SaveFormHtmlResponse:
      type: object
      properties:
        success:
          type: boolean
        html_url:
          type: string
          nullable: true
      required:
        - success
        - html_url
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: >-
        Authentication using either a FormBnB session JWT (issued by /auth) or
        an API key (prefixed with sk_). Both token types are passed as Bearer
        tokens in the Authorization header.

````