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

# Create a template

> Upload a PDF or DOCX file to create a new template. The file must be under 40MB and be either a PDF, DOC, or DOCX file.



## OpenAPI

````yaml /api-reference/openapi.json post /v0/templates
openapi: 3.0.0
info:
  title: Formable API
  version: 1.0.0
  description: >-
    The Formable API lets you embed e-signature and document redlining workflows
    directly into your product. Create templates, send documents for signature,
    run collaborative redline negotiations, and retrieve completed documents.
servers:
  - url: https://formable-production.up.railway.app/api
    description: Production
  - url: http://localhost:4000/api
    description: Local
security:
  - bearerAuth: []
tags:
  - name: Templates
    description: Upload documents and generate editor URLs.
  - name: Signature Requests
    description: Send documents for e-signature and retrieve signed results.
  - name: Redlining
    description: Create and manage collaborative redline negotiations.
  - name: Billing
    description: Retrieve usage information.
  - name: Health
    description: Service health checks.
paths:
  /v0/templates:
    post:
      tags:
        - Templates
      summary: Create a template
      description: >-
        Upload a PDF or DOCX file to create a new template. The file must be
        under 40MB and be either a PDF, DOC, or DOCX file.
      operationId: createTemplate
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
                - filename
              properties:
                file:
                  type: string
                  format: binary
                  description: The PDF or DOCX file to upload (max 40MB).
                filename:
                  type: string
                  description: The name of the file including extension.
                  example: document.docx
      responses:
        '200':
          description: Template created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  templateId:
                    type: string
                    description: The unique identifier of the created template.
                    example: abc123xyz
                  editTemplateAccess:
                    type: object
                    description: Template editing access information.
                    properties:
                      editUrl:
                        type: string
                        format: uri
                        description: URL to access the template editor.
                        example: https://app.formabledocs.com/template-setup/abc123xyz
                      expiresAt:
                        type: string
                        format: date-time
                        description: >-
                          ISO 8601 timestamp when the edit access expires (1 day
                          from creation by default).
                        example: '2024-01-16T10:30:00.000Z'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '413':
          description: File size exceeds 40MB limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: File size exceeds the 40MB limit
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  responses:
    BadRequestError:
      description: Bad request - missing or invalid parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: templateId is required
    UnauthorizedError:
      description: Unauthorized - missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Auth token not valid
    InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal server error
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: A human-readable error message.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        OAuth 2.0 client credentials access token, passed as a Bearer token in
        the Authorization header.

````