> ## 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.

# Update Grant Template

> Updates a template and replaces its items, then regenerates vestings/lockups for unprocessed grants using it.

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

## OpenAPI

````yaml api-reference/openapi.json POST /tga/update-grant-template
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /tga/update-grant-template:
    post:
      operationId: updateGrantTemplate
      summary: Update Grant Template
      description: >-
        Updates a template and replaces its items, then regenerates
        vestings/lockups for unprocessed grants using it.


        Not available to API keys yet. It will need `grants:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGrantTemplateRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateGrantTemplateResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    UpdateGrantTemplateRequest:
      type: object
      properties:
        grantTemplateID:
          type: string
          format: uuid
        templateName:
          type: string
          minLength: 1
          maxLength: 200
        templateDescription:
          type: string
          maxLength: 5000
        vestingCSVContent:
          type: array
          items:
            type: object
            properties:
              sequence:
                oneOf:
                  - type: string
                  - type: number
              percentageAllocation:
                oneOf:
                  - type: string
                  - type: number
              timeFrameUnit:
                oneOf:
                  - type: string
                  - type: number
              preferredDate:
                oneOf:
                  - type: string
                  - type: string
                    format: date-time
            required:
              - sequence
              - percentageAllocation
              - timeFrameUnit
          maxItems: 500
        lockupCSVContent:
          type: array
          items:
            type: object
            properties:
              sequence:
                oneOf:
                  - type: string
                  - type: number
              percentageAllocation:
                oneOf:
                  - type: string
                  - type: number
              timeFrameUnit:
                oneOf:
                  - type: string
                  - type: number
              preferredDate:
                oneOf:
                  - type: string
                  - type: string
                    format: date-time
            required:
              - sequence
              - percentageAllocation
              - timeFrameUnit
          maxItems: 500
        vestingFrequencyType:
          type: string
          enum:
            - MONTHLY
            - QUARTERLY
            - SEMIANNUALLY
            - YEARLY
            - CUSTOM
            - DAILY
            - WEEKLY
        lockupFrequencyType:
          type: string
          enum:
            - MONTHLY
            - QUARTERLY
            - SEMIANNUALLY
            - YEARLY
            - CUSTOM
            - DAILY
            - WEEKLY
        daysBetweenVestingAndFirstLockup:
          type: integer
          minimum: 0
        lockupStartDate:
          type: string
          maxLength: 100
        eomLogic:
          type: boolean
        roundToWholeTokens:
          type: boolean
      required:
        - grantTemplateID
    UpdateGrantTemplateResponse:
      type: object
      properties:
        isSuccess:
          type: boolean
        error:
          type: string
        message:
          type: string
      required:
        - isSuccess
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
