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

# Create Document



## OpenAPI

````yaml /actionkit/openapi.json POST /projects/{project_id}/tools/#PANDA_DOC_CREATE_DOCUMENT
openapi: 3.0.0
info:
  title: ActionKit Tools API
  version: 1.0.0
servers:
  - url: https://actionkit.useparagon.com
    description: US Cloud
security: []
paths:
  /projects/{project_id}/tools/#PANDA_DOC_CREATE_DOCUMENT:
    post:
      summary: Create Document
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              Your Paragon Project ID. You can copy your Project ID from your
              dashboard URL or by clicking Copy Project ID under the Environment
              switcher.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tool:
                  type: string
                  default: PANDA_DOC_CREATE_DOCUMENT
                parameters:
                  type: object
                  properties:
                    from:
                      type: string
                      description: 'From : Create a document from'
                      enum:
                        - pandadoc_template
                        - file
                    name:
                      type: string
                      description: >-
                        Name : Name the document you are creating. 

                        This field appears only when 'from' =
                        'pandadoc_template')
                    templateUuid:
                      type: string
                      description: >-
                        Template UUID : The ID of a template you want to use.
                        You can copy it from an in app template url such as
                        https://app.pandadoc.com/a/#/templates/{ID}/content. A
                        template ID is also obtained by listing templates.
                        (example: "hryJY9mqYZHjQCYQuSjRQg") 

                        This field appears only when 'from' =
                        'pandadoc_template')
                    recipients:
                      type: object
                      description: >-
                        Recipients : Update already existing recipients using
                        Recipient ID from document details or add new recipients
                        to the document (example: "[
                          {
                            "id": "MiySpPNiyhhmFXnDDrrawC",
                            "email": "john.doe@gmail.com",
                            "first_name": "John",
                            "last_name": "Doe"
                          }
                        ]") 

                        This field appears only when 'from' =
                        'pandadoc_template')
                      properties: {}
                    folderUuid:
                      type: string
                      description: >-
                        Folder UUID : The ID of the folder where the created
                        document should be stored. (example:
                        "QMDSzwabfFzTgjW4kUijqQ") 

                        This field appears only when 'from' =
                        'pandadoc_template')
                    tags:
                      type: string
                      description: >-
                        Tags : Mark your document with new tags (example: "[
                          "created_via_api",
                          "test_document"    
                        ]") 

                        This field appears only when 'from' =
                        'pandadoc_template')
                    tokens:
                      type: object
                      description: >-
                        Tokens : Update tokens or add new ones (example: "[
                          {
                            "name": "Favorite.Pet",
                            "value": "New Panda"
                          }
                        ]") 

                        This field appears only when 'from' =
                        'pandadoc_template')
                      properties: {}
                    fields:
                      type: object
                      description: >-
                        Fields : Update field values (example: "{
                          "Like": {
                            "value": false
                          },
                          "Date": {
                            "value": "2022-08-24T00:00:00.000Z"
                          }
                        }") 

                        This field appears only when 'from' =
                        'pandadoc_template')
                      properties: {}
                    metadata:
                      type: object
                      description: >-
                        Metadata : Update or add metadata (example: "{
                          "my_favorite_pet": "New Panda"
                        }") 

                        This field appears only when 'from' =
                        'pandadoc_template')
                      properties: {}
                    pricingTable:
                      type: object
                      description: >-
                        Pricing Table : Update or add metadata. See reference
                        (https://developers.pandadoc.com/reference/create-document-from-pandadoc-template#pricing-table) 
                        (example: "[
                          {
                            "name": "Pricing Table 1",
                            "sections": [
                              {
                                "title": "Sample Section",
                                "default": true
                              }
                            ]
                          }
                        ]") 

                        This field appears only when 'from' =
                        'pandadoc_template')
                      properties: {}
                    contentPlaceholders:
                      type: object
                      description: >-
                        Content Placeholders : You may replace Content Library
                        Item Placeholders with a few content library items each
                        and pre fill fields/variables values, pricing table
                        items, and assign recipients to roles from there. See
                        reference
                        (https://developers.pandadoc.com/reference/create-document-from-pandadoc-template#content-placeholder)
                        (example: "[
                          {
                            "block_id": "{{block_id}}",
                            "content_library_items": [...]
                          }   
                        ]") 

                        This field appears only when 'from' =
                        'pandadoc_template')
                      properties: {}
                    images:
                      type: object
                      description: >-
                        Images : You may pass a list of images to image blocks
                        (one image per block) for replacement. See a note about
                        linking images to templates below. Image formats
                        supported: GIF, JPG, PNG. (example: "[
                          {
                            "name": "Image 1",
                            "urls": [
                                "https://s3.amazonaws.com/pd-static-content/public-docs/pandadoc-panda-bear.png"
                            ]
                          }
                        ]") 

                        This field appears only when 'from' =
                        'pandadoc_template')
                      properties: {}
                    fileUrl:
                      type: string
                      description: >-
                        File URL : Specify a PDF/DocX/RTF File URL. (example:
                        "https://cdn2.hubspot.net/hubfs/2127247/public-templates/SamplePandaDocPdf_FormFields.pdf") 

                        This field appears only when 'from' = 'file')
                    data:
                      type: object
                      description: >-
                        Data : Specify data fields that should be used in this
                        document as JSON. (example: "{
                          "name": "Public Document", 
                          "recipients": [  
                              {  
                                  "email": "john.doe@useparagon.com",
                                  "first_name": "John",
                                  "last_name": "Dow",
                                  "role": "user"
                              }
                          ],
                          "fields": {  
                              "userName": {  
                                  "value": "John",
                                  "role": "user"
                              }
                          },
                          "metadata": {
                              "my_favorite_pet": "Panda"
                          },
                          "tags": [
                              "created_via_api"
                          ], 
                          "parse_form_fields": true
                        }") 

                        This field appears only when 'from' = 'file')
                      properties: {}
                  required:
                    - from
                    - name
                    - templateUuid
                    - recipients
                    - fileUrl
                    - data
                  x-integration: pandadoc
              required:
                - tool
                - parameters
      responses:
        '200':
          description: Success
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Your [Paragon User
        Token](/getting-started/installing-the-connect-sdk#setup) (JWT), which
        you can generate using your project's signing keys.

````