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

# Create your first template

<Frame>
  <img className="block" src="https://mintcdn.com/alohi/KnYKDC0EFTC2S5WS/resources/guides/create-your-first-template.svg?fit=max&auto=format&n=KnYKDC0EFTC2S5WS&q=85&s=bdcae6df25dfc9ea13346354e1a6526b" alt="Create your first template" width="733" height="314" data-path="resources/guides/create-your-first-template.svg" />
</Frame>

<Steps>
  <Step title="Create Your First Template">
    A **Template** is a reusable envelope that you can use to create multiple envelopes with the same document and recipient settings. Learn more about [Template](/concepts/template).

    To create a new template, see the <a href="/api-reference/endpoints/signplus/create-new-template" target="_blank">POST /v2/template</a> endpoint documentation.

    ```bash Create template theme={null}
    curl --request POST \
      --url https://restapi.sign.plus/v2/template \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
      "name": "My wonderful template"
    }'
    ```

    On success, the API will return a response with the template ID in a format like `66873403520e051cdb834df`. Get the template ID from the response to use in the next steps.
  </Step>

  <Step title="Add a Document into Your Template">
    A **Document** is a file that you want to get signed by recipients. You can add one or more documents in an Template.
    Learn more about [Documents](/concepts/document).

    To add a document to the template, see the <a href="/api-reference/endpoints/signplus/add-template-document" target="_blank">POST /v2/template/\{template\_id}/document</a> endpoint documentation.

    ```bash Add document theme={null}
    curl --request POST \
      --url https://restapi.sign.plus/v2/template/{template_id}/document \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: multipart/form-data' \
      --form 'file=<string>'
    ```

    On success, the API will return a response with the document ID in a format like `66873403520e051cdb834df`. Get the document ID from the response to use in the next steps.
  </Step>

  <Step title="Set a Recipient to Your Template">
    A **Recipient** is a person who will sign the document in the envelope. You can add one or more recipients to an envelope in a specific order using signing steps.
    Learn more about [Signing Steps](/concepts/signing-steps).

    To add a recipient to the template, see the <a href="/api-reference/endpoints/signplus/add-template-signing-steps" target="_blank">POST /v2/template/\{template\_id}/signing\_steps</a> endpoint documentation.

    ```bash Add signing steps theme={null}
    curl --request POST \
      --url https://restapi.sign.plus/v2/template/{template_id}/signing_steps \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
      "signing_steps": [
        {
          "recipients": [
            {
              "name": "John Doe",
              "email": "john.doe@gmail.com",
              "role": "SIGNER",
            }
          ]
        }
      ]
    }'
    ```

    On success, the API will return a response with the recipient ID in a format like `66873403520e051cdb834df` under the signing steps. Get the recipient ID from the response to use in the next steps.
  </Step>

  <Step title="Insert a Signature Annotation in Your Document">
    A **Signature Annotation** serves as a designated placeholder within a document where the recipient is required to sign. You can include one or more signature annotations in a document. These annotations can be added alongside other types of annotations, such as text fields, date fields, and checkboxes. For further details, visit [Annotation](/concepts/annotation).

    Before adding the annotation, you need to define your signature in the Sign.Plus platform.

    <Frame>
      <video controls>
        <source src="https://mintcdn.com/alohi/KnYKDC0EFTC2S5WS/resources/get-started/quickstart/define-signature.mp4?fit=max&auto=format&n=KnYKDC0EFTC2S5WS&q=85&s=bada09f54d93facc4827698b1f9041bb" type="video/mp4" data-path="resources/get-started/quickstart/define-signature.mp4" />

        Your browser does not support the video tag.
      </video>
    </Frame>

    To learn how to add a signature annotation to a document, refer to the [POST /v2/document/\{template\_id}/annotation](/api-reference/endpoints/signplus/add-template-annotation) endpoint documentation.

    ```bash Add annotation theme={null}
    curl --request POST \
      --url https://restapi.sign.plus/v2/template/{tmeplate_id}/annotation \
      --header 'Authorization: <api-key>' \
      --header 'Content-Type: application/json' \
      --data '{
      "recipient_id": "<string>",
      "document_id": "<string>",
      "page": 1,
      "x": 50,
      "y": 20,
      "width": 20,
      "height": 60,
      "required": true,
      "type": "SIGNATURE",
      "signature": {
        "id": ""
      },
      "initials": null,
      "text": null,
      "datetime": null,
      "checkbox": null
    }'
    ```

    On success, the API will return the inserted annotation.
  </Step>

  <Step title="Create a new envelope from your template">
    You successfully created a template, added a document, set a recipient, and inserted a signature annotation. Now, it's time to create a new envelope from the template.

    To create a new envelope, see the <a href="/api-reference/endpoints/signplus/create-new-envelope-from-template" target="_blank">POST /v2/envelope/\{template\_id}</a> endpoint documentation.

    ```bash Create envelope from template theme={null}
    curl --request POST \
    --url https://restapi.sign.plus/v2/envelope/{template_id} \
    --header 'Authorization: <api-key>' \
    --data '{
    "name": "My wonderful envelope from template",
    }'
    ```

    On success, the API will give you a response with the envelope ID in a format like `66873403520e051cdb834df`. Get the envelope ID from the response to set the recipients details and send the envelope for signature.
  </Step>
</Steps>
