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

# Upload an HTML template

> Uploads HTML and CSS as a template for a given document. Templates are stored in the database and rendered to PDF using Chrome.



## OpenAPI

````yaml api-reference/pdfs.yaml post /templates/upload-html
openapi: 3.0.3
info:
  title: pdfs
  description: >-
    The PDFs service takes a stored PDF template and fills in placeholder fields
    with the values you give it. It then sends back the completed PDF for you to
    save, email, or use however you want.
  version: 1.0.0
servers:
  - url: https://pdfs.platform.arb.inc
security: []
tags:
  - name: /
  - name: markdown
  - name: pleadings
  - name: templates
paths:
  /templates/upload-html:
    post:
      tags:
        - templates
      summary: Upload an HTML template
      description: >-
        Uploads HTML and CSS as a template for a given document. Templates are
        stored in the database and rendered to PDF using Chrome.
      operationId: uploadHTMLTemplate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - documentID
                - html
              properties:
                documentID:
                  type: string
                  description: The ID of the template.
                  example: employmentAgreement
                html:
                  type: string
                css:
                  type: string
                  description: Optional CSS styles for the template.
                  example: 'body { font-family: ''Times New Roman''; font-size: 12pt; }'
      responses:
        '200':
          description: HTML template successfully uploaded.
          content:
            text/plain:
              schema:
                type: string
                example: successfully uploaded HTML template
        '400':
          description: Invalid request or HTML template syntax error.
          content:
            text/plain:
              schema:
                type: string
                example: >-
                  Invalid HTML template syntax: template: validation:1:
                  unexpected EOF
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      description: access token
      scheme: bearer
      bearerFormat: JWT

````