Docupilot templates API

The templates API from Docupilot — 21 operation(s) for templates.

OpenAPI Specification

docupilot-templates-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Docupilot accounts APIs ai templates API
  version: '1.0'
  description: Docupilot accounts APIs
  termsOfService: https://docupilot.app/terms-and-conditions/
  contact:
    name: Team Docupilot
    email: support@docupilot.app
tags:
- name: templates
paths:
  /dashboard/api/v2/templates/:
    get:
      operationId: list_templates
      summary: Get list of templates
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: query
        name: delivery_type
        schema:
          type: array
          items:
            type: string
            enum:
            - aws_s3
            - azure_blob_storage
            - box_drive
            - docu_sign
            - dropbox
            - email
            - eversign
            - google_drive
            - hellosign
            - one_drive
            - podio
            - sftp
            - sharepoint
            - sign_now
            - signable
            - signature
            - webhook
            - yousign
            - zoho_crm
        description: Filter templates by configured delivery type (supports multiple values)
        explode: false
        style: form
      - in: query
        name: folder
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - in: query
        name: output_type
        schema:
          type: string
          enum:
          - docx
          - html
          - jpeg
          - pdf
          - png
          - pptx
          - xlsx
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: search
        schema:
          type: string
        description: Search templates by title
      - in: query
        name: status
        schema:
          type: string
          enum:
          - active
          - test
        description: Filter templates by status. Active maps to published templates and test maps to unpublished templates.
      - in: query
        name: type
        schema:
          type: string
          enum:
          - docx
          - dpt_pdf
          - fillable_pdf
          - g_document
          - g_presentation
          - g_spreadsheet
          - html
          - pptx
          - xlsx
      tags:
      - templates
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTemplateList'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
    post:
      operationId: create_template
      summary: Create template
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - templates
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/NewTemplate'
        required: true
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
          description: ''
        '413':
          content:
            text/html:
              schema:
                description: Uploaded File Is Too Large.
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/api/v2/templates/{id}/:
    get:
      operationId: get_template
      summary: Get one template
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
    put:
      operationId: update_template
      summary: Update template
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Template'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Template'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Template'
        required: true
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
    patch:
      operationId: update_template_content
      summary: Update template content
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUpdateNewTemplate'
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
          description: ''
        '413':
          content:
            text/html:
              schema:
                description: Uploaded File Is Too Large.
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
    delete:
      operationId: trash_template
      summary: Move template to trash
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{id}/copy/:
    post:
      operationId: copy_template
      summary: Copy template including preferences, deliveries
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CopyTemplate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CopyTemplate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CopyTemplate'
        required: true
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{id}/delivery_count/:
    get:
      operationId: get_template_delivery_count
      summary: Get the count of deliveries linked to a template
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryCount'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{id}/download/:
    get:
      operationId: download_template_file
      summary: Download template file
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      - in: query
        name: version_id
        schema:
          type: string
        description: Template version selector. Supports a numeric version id, `latest`, or `live`.
      tags:
      - templates
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{id}/editor_version/:
    patch:
      operationId: update_template_editor_version
      summary: Update the template editor version between v1 and v2
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedEditorVersion'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedEditorVersion'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedEditorVersion'
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditorVersion'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{id}/inline_image/:
    post:
      operationId: upload_inline_image_of_template
      summary: Upload inline image of template
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadTemplateImage'
        required: true
      security:
      - SessionAuthentication: []
      responses:
        '200':
          description: No response body
        '413':
          content:
            text/html:
              schema:
                description: Uploaded File Is Too Large.
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{id}/migrate_to_native_syntax/:
    post:
      operationId: migrate_to_native_syntax
      summary: Migrate DocuSign template to native signature delivery
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MigrateToNativeSyntaxRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/MigrateToNativeSyntaxRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/MigrateToNativeSyntaxRequest'
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MigrateToNativeSyntaxError'
          description: ''
  /dashboard/api/v2/templates/{id}/permanent_delete/:
    delete:
      operationId: delete_template_permanently
      summary: Delete a template permanently from trash
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{id}/preview/:
    get:
      operationId: preview_template
      summary: Preview template
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: query
        name: format
        schema:
          type: string
          enum:
          - json
          - octet-stream
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      - in: query
        name: version_id
        schema:
          type: string
        description: Template version selector. Supports a numeric version id, `latest`, or `live`.
      tags:
      - templates
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{id}/publish/:
    post:
      operationId: publish_latest_template_version
      summary: Publish latest template version
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateVersion'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{id}/restore/:
    put:
      operationId: restore_template_from_trash
      summary: Restore a template from trash
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      tags:
      - templates
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestoreTemplateResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{id}/schema/:
    get:
      operationId: get_template_schema
      summary: Get template schema
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      - in: query
        name: version_id
        schema:
          type: string
        description: Template version selector. Supports a numeric version id, `latest`, or `live`.
      tags:
      - templates
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TemplateSchema'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{id}/schema/detail/:
    get:
      operationId: get_detailed_template_schema
      summary: Get template split schema
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this document.
        required: true
      - in: query
        name: version_id
        schema:
          type: string
        description: Template version selector. Supports a numeric version id, `latest`, or `live`.
      tags:
      - templates
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateSchemaDetail'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{template_id}/permissions/:
    get:
      operationId: list_template_sharing
      summary: Get all shared permissions for specific template
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: template_id
        schema:
          type: integer
        required: true
      tags:
      - templates
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TemplateSharing'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
    post:
      operationId: create_template_sharing_permission
      summary: Create template sharing permission
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: template_id
        schema:
          type: integer
        required: true
      tags:
      - templates
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TemplateSharing'
          application/x-www-form-urlencoded:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TemplateSharing'
          multipart/form-data:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TemplateSharing'
        required: true
      security:
      - SessionAuthentication: []
      responses:
        '201':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TemplateSharing'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/api/v2/templates/{template_id}/permissions/{id}/:
    get:
      operationId: get_template_sharing
      summary: Get specific permission 

# --- truncated at 32 KB (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/docupilot/refs/heads/main/openapi/docupilot-templates-api-openapi.yml