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

# Get a template

> Returns the full template (roles, documents, fields, merge fields and the questions its documents ask) plus the current email, reminder and expiry config. Answer a document question by id in `documentAnswers` when creating a package from the template.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/templates/{templateId}
openapi: 3.0.3
info:
  title: FlowSign API
  version: 1.0.0
  description: >-
    Public v1 API for FlowSign. Every endpoint is authenticated with a Bearer
    API key (prefix `fsk_`). Errors use `{ error, details? }`; success responses
    wrap payload data as `{ data }`.


    An organisation is divided into workspaces. A key belongs to the
    organisation and acts in one workspace per request: pass `X-Workspace-Id`
    (see `GET /api/v1/workspaces`) or omit it to act in the default workspace.
    Packages, templates, contacts and members are scoped to the workspace the
    call acts in.
servers:
  - url: https://my.flowsign.app
    description: Production
security:
  - ApiKey: []
paths:
  /api/v1/templates/{templateId}:
    get:
      tags:
        - Templates
      summary: Get a template
      description: >-
        Returns the full template (roles, documents, fields, merge fields and
        the questions its documents ask) plus the current email, reminder and
        expiry config. Answer a document question by id in `documentAnswers`
        when creating a package from the template.
      operationId: getTemplatesByTemplateId
      parameters:
        - schema:
            type: string
          required: true
          name: templateId
          in: path
        - schema:
            type: string
            description: >-
              The workspace to act in, from `GET /api/v1/workspaces`. Omit to
              act in the organisation's default workspace. A workspace the key's
              user cannot act in is treated as omitted.
          required: false
          name: x-workspace-id
          in: header
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      status:
                        type: string
                        enum:
                          - DRAFT
                          - ACTIVE
                          - ARCHIVED
                      tags:
                        type: array
                        items:
                          type: string
                      signingMode:
                        type: string
                        enum:
                          - PARALLEL
                          - SEQUENTIAL
                          - WORKFLOW
                      roles:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            actionType:
                              type: string
                              enum:
                                - SIGNER
                                - VIEWER
                                - CC
                            order:
                              type: integer
                          required:
                            - id
                            - name
                            - actionType
                            - order
                      documents:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            title:
                              type: string
                            pageCount:
                              type: integer
                            order:
                              type: integer
                            isSupplemental:
                              type: boolean
                          required:
                            - id
                            - title
                            - pageCount
                            - order
                            - isSupplemental
                      fields:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                              enum:
                                - text
                                - signature
                                - date
                                - initial
                                - comment
                                - name
                                - email
                                - company
                                - title
                                - number
                                - checkbox
                                - radio
                                - dropdown
                                - formula
                                - payment
                                - label
                                - attachment
                            pageNumber:
                              type: integer
                            isRequired:
                              type: boolean
                            placeholder:
                              type: string
                              nullable: true
                            defaultValue:
                              type: string
                              nullable: true
                            documentId:
                              type: string
                            roleId:
                              type: string
                              nullable: true
                          required:
                            - id
                            - type
                            - pageNumber
                            - isRequired
                            - placeholder
                            - defaultValue
                            - documentId
                            - roleId
                      mergeFields:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            key:
                              type: string
                            label:
                              type: string
                            defaultValue:
                              type: string
                              nullable: true
                          required:
                            - id
                            - key
                            - label
                            - defaultValue
                      documentQuestions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            documentId:
                              type: string
                            question:
                              type: string
                            askedWhen:
                              type: object
                              nullable: true
                              properties:
                                questionId:
                                  type: string
                                optionId:
                                  type: string
                                  nullable: true
                              required:
                                - questionId
                                - optionId
                            options:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  label:
                                    type: string
                                  isDefault:
                                    type: boolean
                                required:
                                  - id
                                  - label
                                  - isDefault
                          required:
                            - id
                            - documentId
                            - question
                            - askedWhen
                            - options
                      emailSubject:
                        type: string
                        nullable: true
                      emailMessage:
                        type: string
                        nullable: true
                      expirationDays:
                        type: integer
                        nullable: true
                      reminderDaysAfterSend:
                        type: integer
                        nullable: true
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                      metadata:
                        type: object
                        additionalProperties:
                          type: string
                        description: >-
                          Default custom field values a package launched from
                          this template starts with.
                    required:
                      - id
                      - name
                      - description
                      - status
                      - tags
                      - signingMode
                      - roles
                      - documents
                      - fields
                      - mergeFields
                      - documentQuestions
                      - emailSubject
                      - emailMessage
                      - expirationDays
                      - reminderDaysAfterSend
                      - createdAt
                      - updatedAt
                      - metadata
                required:
                  - data
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Caller's plan does not include this feature (publicApi / webhooks)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: API key present but caller lacks the required permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Request failed schema validation; details keyed by field
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded; see `Retry-After`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        details:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - error
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: fsk_*

````