Create a Sign Document via API

  • Profile Image
    mr.shashikan
    Asked on January 30, 2026 at 1:19 PM

    const express = require("express");

    const bodyParser = require("body-parser");

    const axios = require("axios");


    const app = express();

    app.use(bodyParser.json());


    const JOTFORM_API_KEY = "<my api key goes here>";

    const BASE_URL = "https://api.jotform.com";


    // 🔴 Your Sign TEMPLATE ID

    const SIGN_TEMPLATE_ID = "260294945219060";


    /**

     * Create Sign link for athlete

     */

    app.post("/create-sign-link", async (req, res) => {

      try {

        const { athleteId, signerName, signerEmail } = req.body;


        if (!athleteId || !signerName) {

          return res.status(400).json({ error: "Missing data" });

        }


        /**

         * 1️⃣ Create document from template

         */

        const createResp = await axios.post(

          `${BASE_URL}/sign/document/${SIGN_TEMPLATE_ID}/create`,

          {

            signers: [

              {

                name: signerName,

                email: signerEmail || "" // email optional if no invite

              }

            ],

            metadata: {

              athlete_id: athleteId

            }

          },

          {

            headers: {

              Authorization: `Bearer ${JOTFORM_API_KEY}`

            }

          }

        );


        const documentId = createResp.data?.content?.id;

        if (!documentId) {

          return res.status(500).json({ error: "Document creation failed" });

        }


        /**

         * 2️⃣ Generate signing link (NO INVITE)

         */

        const linkResp = await axios.get(

          `${BASE_URL}/sign/document/${documentId}/link`,

          {

            headers: {

              Authorization: `Bearer ${JOTFORM_API_KEY}`

            }

          }

        );


        const signUrl = linkResp.data?.content?.url;


        if (!signUrl) {

          return res.status(500).json({ error: "Failed to generate sign link" });

        }


        /**

         * 3️⃣ Save this signUrl in DB mapped to athlete

         * (You do this part)

         */


        res.json({

          athlete_id: athleteId,

          document_id: documentId,

          sign_url: signUrl

        });

      } catch (err) {

        console.error(err.response?.data || err.message);

        res.status(500).json({ error: "Server error" });

      }

    });


    app.listen(3000, () => {

      console.log("Server running on port 3000");

    });

    I got this code generated by jotform AI.

    BUT, ERROR I am getting is 404.
    at this
    `${BASE_URL}/sign/document/${SIGN_TEMPLATE_ID}/create`.
    Please help me to fix this.

  • Profile Image
    Podo: Support Specialist
    Replied on January 30, 2026 at 1:19 PM

    Hi shashikant,

    Thanks for reaching out to Jotform Support. I'm an AI assistant here to assist you.

    The 404 error you are encountering at the endpoint https://api.jotform.com/sign/document/{SIGN_TEMPLATE_ID}/create indicates that this URL is not a valid or supported API endpoint in Jotform's API for creating sign documents from templates.

    Based on the available Jotform Sign documentation and API usage, there is no direct API endpoint documented for creating a sign document from a template using the URL pattern you are using.

    To create signable documents, Jotform typically uses the Workspace page or the Sign Builder interface, and the API endpoints for sign documents do not include a /create path under /sign/document/{templateId}.

    Therefore, the 404 error suggests that the endpoint you are trying to call does not exist or is incorrect.

    What you can do:

    1. Verify the API documentation: Check the latest Jotform API documentation for the correct endpoint to create sign documents from templates.
    2. Use the Workspace UI: Create sign documents from templates through the Jotform Workspace and Sign Builder interface as described in the Jotform Sign usage guide.
    3. Contact Jotform support or check developer resources: If you need to automate this via API, confirm if there is a supported API endpoint for this action or if there is an alternative method.

    Currently, the API endpoint /sign/document/{templateId}/create is not recognized and causes a 404 error.

    Give it a try and let us know how it goes.

  • Profile Image
    mr.shashikan
    Replied on January 30, 2026 at 1:21 PM

    I checked, could not find exact endpoint to create document. most of them are related to form and submission.

  • Profile Image
    Podo: Support Specialist
    Replied on January 30, 2026 at 1:21 PM

    Hi shashikant,

    I understand you couldn't find an exact API endpoint for creating a sign document from a template, as most endpoints are related to forms and submissions.

    Currently, Jotform does not provide a direct API endpoint to create sign documents from templates programmatically. The integration and creation of signable documents are primarily managed through the Jotform Workspace and Sign Builder interface.

    As an alternative, you might consider using the form builder features or integrating with third-party services like DocuSign if you need advanced signing workflows. For example, you can add a DocuSign field to your form using the Form Builder, which allows you to collect signatures seamlessly.

    Here’s how to add a DocuSign field to your form:

    1. In Form Builder, click on Add Element on the left side of the page.
    2. Under the Widgets tab, search for DocuSign and add it to your form.
    3. Authenticate your DocuSign account in the widget settings.
    4. Configure the document title and other settings as needed.

    You can also explore connecting Jotform and DocuSign via Zapier for automation.

    Give it a try and let us know if you need any help.

  • Profile Image
    mr.shashikan
    Replied on January 30, 2026 at 1:23 PM

    Can I get this reply from the developers who manages the API?


  • Profile Image
    Podo: Support Specialist
    Replied on January 30, 2026 at 1:23 PM

    Hi shashikant,

    One of our Support Team members will take it from here to follow up shortly.

  • Profile Image
    Hakan Enterprise Customer Success Engineer
    Replied on January 30, 2026 at 1:44 PM

    Hi Shashikant,

    I see that you started chatting with Podo and seeking more information about an API call. As Podo mentioned, there is not an endpoint regarding creating document. The full list of the API endpoints, you can refer to Jotform API Documentation page.

    Give it a try and let us know if you have any other questions.

  • S
    Shashikant
    Replied on January 30, 2026 at 10:19 PM

    Hi Hakan,


    Thanks for your reply,

    I looked into the API Document but, I could not find the link which can help me.

    Let me explain my requirement.

    I created jotform sign document and invite link is:

    https://www.jotform.com/sign/260294841846061/invite/01kg7tqsw3db61cc2cab2e0a2e?athlete_id=123.

    If you see this link, there is athlete_id=123. I want to set this value in the sign document any of the field. Once signer signs, it should be sent to the webhook. This way I would get to know that who has signed the document by checking athlete_id value in my database.

    Is this possible to achieve? If yes, please suggest the steps.

    To tried by adding prefill[athlete_id]=123 in the query string as below, by adding a short text field but could not work:
    https://www.jotform.com/sign/260294841846061/invite/01kg7tqsw3db61cc2cab2e0a2e?prefill[athlete_id]=123.

    To do above I follow this video:
    https://www.jotform.com/help/71-prepopulating-fields-to-your-jotform-via-url-parameters/

    Help me to set the passed value in the sign document field, or suggest some other way to achieve this with the sign document so that I can get athlete_id in the webhook to check who has signed.


    Thank you,

    Shashikant Pandit

  • Profile Image
    Sonnyfer Enterprise Support
    Replied on January 31, 2026 at 12:10 AM

    Hi Shashikant,

    As creating a Sign Document via API isn't available yet, I've gone ahead and escalated your request to our developers as Feature Request. Exactly when or if it's developed depends on their workload, how viable it is, and how many other users also request it. If there are any updates, we’ll circle back to this thread and let you know.

    I’ve also gone ahead and moved your other question to a separate thread to keep things tidy, and someone from our Support Team will help you out with it here.

    Thanks for your patience and understanding, we appreciate it. Create a Sign Document via API Image 1 Screenshot 20

  • Profile Image
    tammy151
    Replied on March 18, 2026 at 3:30 AM

    @all its viable, get on it