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

# Save Org Document Template

> Save org document template. Requires company-wide document management access in the effective organization.

Not available to API keys yet. It will need `documents:write`.

## OpenAPI

````yaml api-reference/openapi.json POST /hris/save-org-document-template
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/save-org-document-template:
    post:
      operationId: saveOrgDocumentTemplate
      summary: Save Org Document Template
      description: >-
        Save org document template. Requires company-wide document management
        access in the effective organization.


        Not available to API keys yet. It will need `documents:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveOrgDocumentTemplateRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaveOrgDocumentTemplateResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    SaveOrgDocumentTemplateRequest:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
        templateId:
          type: string
          format: uuid
        expectedRevision:
          type: integer
          minimum: 0
        name:
          type: string
          minLength: 1
          maxLength: 250
        subjectType:
          type: string
          enum:
            - PERSON
            - EMPLOYMENT
            - CONTRACTOR
            - GRANT
        category:
          type: string
          enum:
            - EMPLOYMENT_AGREEMENT
            - CONTRACTOR_AGREEMENT
            - CIIAA
            - EMPLOYMENT_VERIFICATION
            - GRANT_AGREEMENT
            - OTHER_ONBOARDING_DOCUMENT
        googleDocUrl:
          type: string
          format: uri
        signingSetup:
          type: string
          enum:
            - RECIPIENT_ONLY
            - RECIPIENT_AND_COMPANY
        signatoryId:
          type:
            - string
            - 'null'
          format: uuid
        tokuConfirmedSource:
          const: false
      required:
        - requestId
        - name
        - subjectType
        - googleDocUrl
        - signingSetup
        - signatoryId
    SaveOrgDocumentTemplateResponse:
      type: object
      properties:
        templateId:
          type: string
          format: uuid
        name:
          type: string
        subjectType:
          type: string
          enum:
            - PERSON
            - EMPLOYMENT
            - CONTRACTOR
            - GRANT
        category:
          type: string
          enum:
            - EMPLOYMENT_AGREEMENT
            - CONTRACTOR_AGREEMENT
            - CIIAA
            - EMPLOYMENT_VERIFICATION
            - GRANT_AGREEMENT
            - OTHER_ONBOARDING_DOCUMENT
        status:
          type: string
          enum:
            - DRAFT
            - PUBLISHED
        editRevision:
          type: integer
        currentVersionNumber:
          type:
            - integer
            - 'null'
        hasDraft:
          type: boolean
        checks:
          type: string
          enum:
            - VALID
            - INVALID
            - UNAVAILABLE
            - NOT_CHECKED
        sourceUrl:
          type: string
          format: uri
        signingSetup:
          type: string
          enum:
            - RECIPIENT_ONLY
            - RECIPIENT_AND_COMPANY
        signatoryId:
          type:
            - string
            - 'null'
          format: uuid
        report:
          type:
            - object
            - 'null'
          properties:
            status:
              type: string
              enum:
                - VALID
                - INVALID
                - UNAVAILABLE
            checkedAt:
              type: string
            sourceRevision:
              type:
                - string
                - 'null'
            registryVersion:
              type: string
            fields:
              type: array
              items:
                type: object
                properties:
                  key:
                    type: string
                  label:
                    type:
                      - string
                      - 'null'
                  status:
                    type: string
                    enum:
                      - known
                      - unknown
                      - unavailable
                  occurrences:
                    type: integer
                    minimum: 1
                  locations:
                    type: array
                    items:
                      type: string
                    maxItems: 5000
                  contractTypes:
                    type: array
                    items:
                      type: string
                      enum:
                        - Fixed-term
                        - Open-ended
                    maxItems: 2
                  suggestions:
                    type: array
                    items:
                      type: string
                    maxItems: 3
                required:
                  - key
                  - label
                  - status
                  - occurrences
                  - locations
                  - suggestions
              maxItems: 1000
            anchors:
              type: array
              items:
                type: object
                properties:
                  anchor:
                    type: string
                  role:
                    type: string
                  required:
                    type: boolean
                  present:
                    type: boolean
                required:
                  - anchor
                  - role
                  - required
                  - present
              maxItems: 30
            issues:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  key:
                    type: string
                  role:
                    type: string
                    enum:
                      - recipient
                      - company
                  suggestions:
                    type: array
                    items:
                      type: string
                    maxItems: 3
                required:
                  - code
                  - message
                  - suggestions
              maxItems: 1000
          required:
            - status
            - checkedAt
            - sourceRevision
            - registryVersion
            - fields
            - anchors
            - issues
        history:
          type: array
          items:
            type: object
            properties:
              versionId:
                type: string
                format: uuid
              number:
                type: integer
              publishedAt:
                type: string
              sourceRevision:
                type: string
              hash:
                type: string
            required:
              - versionId
              - number
              - publishedAt
              - sourceRevision
              - hash
        integrationAccount:
          type: string
          format: email
        isStarter:
          type: boolean
        requesterEmail:
          type:
            - string
            - 'null'
          format: email
      required:
        - templateId
        - name
        - subjectType
        - category
        - status
        - editRevision
        - currentVersionNumber
        - hasDraft
        - checks
        - sourceUrl
        - signingSetup
        - signatoryId
        - report
        - history
        - integrationAccount
        - isStarter
        - requesterEmail
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
