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

# Unarchive Document

> Clears archivedAt on an archived document belonging to the caller's org.

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

## OpenAPI

````yaml api-reference/openapi.json POST /tga/unarchive-document
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /tga/unarchive-document:
    post:
      operationId: unarchiveDocument
      summary: Unarchive Document
      description: |-
        Clears archivedAt on an archived document belonging to the caller's org.

        Not available to API keys yet. It will need `documents:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnarchiveDocumentRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnarchiveDocumentResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    UnarchiveDocumentRequest:
      type: object
      properties:
        documentID:
          type: string
          description: >-
            NOTE(ck): a .transform() rule is not mirrored here; TGA still
            enforces it

            NOTE(ck): a .refine() rule is not mirrored here; TGA still enforces
            it
      required:
        - documentID
    UnarchiveDocumentResponse:
      type: object
      properties:
        supersededAt:
          type:
            - string
            - 'null'
        documentID:
          type: string
        roleInOrgID:
          type: string
        investorEntityID:
          type:
            - string
            - 'null'
        documentName:
          type: string
        documentDescription:
          type:
            - string
            - 'null'
        documentType:
          type: string
          enum:
            - WARRANT_AGREEMENT
            - EXERCISE_NOTICE
            - PAYMENT_PROOF
            - GRANT_AGREEMENT
            - EIGHTY_THREE_B_ELECTION
            - EIGHTY_THREE_B_ELECTION_RECIEPT
            - RECIEPTS
            - SETTLEMENT_STATEMENT
            - SECTION_431_ELECTION_EMPLOYEE
            - SECTION_431_ELECTION_EMPLOYER
            - OTHER
        fileID:
          type: string
        signedAt:
          type:
            - string
            - 'null'
        archivedAt:
          type:
            - string
            - 'null'
        createdAt:
          type: string
        updatedAt:
          type: string
        deletedAt:
          type:
            - string
            - 'null'
        grantID:
          type:
            - string
            - 'null'
        warrantID:
          type:
            - string
            - 'null'
        legacyMigratedAt:
          type:
            - string
            - 'null'
        legacyModelID:
          type:
            - number
            - 'null'
        visibleToRole:
          type: boolean
        visibleToClientAdmin:
          type: boolean
        file:
          type: object
          properties:
            fileID:
              type: string
            orgID:
              type: string
            fileName:
              type: string
            mimeType:
              type: string
            fileKey:
              type: string
            fileBucket:
              type: string
            fileUploaded:
              type:
                - string
                - 'null'
            fileSizeInBytes:
              type:
                - string
                - 'null'
              pattern: ^-?\d+$
            createdByUserID:
              type:
                - string
                - 'null'
            createdAt:
              type: string
            updatedAt:
              type: string
            legacyMigratedAt:
              type:
                - string
                - 'null'
            legacyModelID:
              type:
                - number
                - 'null'
            type:
              type: string
            fileURL:
              type: string
            fileDownloadURL:
              type: string
          required:
            - fileID
            - orgID
            - fileName
            - mimeType
            - fileKey
            - fileBucket
            - fileUploaded
            - fileSizeInBytes
            - createdByUserID
            - createdAt
            - updatedAt
            - legacyMigratedAt
            - legacyModelID
            - type
            - fileURL
            - fileDownloadURL
        roleInOrg:
          type: object
          properties:
            hrAutomationOnly:
              type: boolean
            isServiceSeat:
              type: boolean
            invoiceApproverRoutingUpdatedAt:
              type:
                - string
                - 'null'
            legacyMigratedAt:
              type:
                - string
                - 'null'
            legacyModelID:
              type:
                - number
                - 'null'
            roleInOrgID:
              type: string
            personID:
              type: string
            orgID:
              type: string
            invitedByInvestorID:
              type:
                - string
                - 'null'
            invitedByRecipientID:
              type:
                - string
                - 'null'
            roleInOrgExternalID:
              type: number
            externalEmployeeID:
              type:
                - string
                - 'null'
            positionID:
              type:
                - string
                - 'null'
            jobTitle:
              type:
                - string
                - 'null'
            country:
              type:
                - string
                - 'null'
            countryCode:
              type:
                - string
                - 'null'
              enum:
                - ABW
                - AFG
                - AGO
                - AIA
                - ALA
                - ALB
                - AND
                - ARE
                - ARG
                - ARM
                - ASM
                - ATA
                - ATF
                - ATG
                - AUS
                - AUT
                - AZE
                - BDI
                - BEL
                - BEN
                - BES
                - BFA
                - BGD
                - BGR
                - BHR
                - BHS
                - BIH
                - BLR
                - BLZ
                - BMU
                - BOL
                - BRA
                - BRB
                - BRN
                - BTN
                - BVT
                - BWA
                - CAF
                - CAN
                - CCK
                - CHE
                - CHL
                - CHN
                - CIV
                - CMR
                - COD
                - COG
                - COK
                - COL
                - COM
                - CPV
                - CRI
                - CUB
                - CUW
                - CXR
                - CYM
                - CYP
                - CZE
                - DEU
                - DJI
                - DMA
                - DNK
                - DOM
                - DZA
                - ECU
                - EGY
                - ERI
                - ESH
                - ESP
                - EST
                - ETH
                - FIN
                - FJI
                - FLK
                - FRA
                - FRO
                - FSM
                - GAB
                - GBR
                - GEO
                - GGY
                - GHA
                - GIB
                - GIN
                - GLP
                - GMB
                - GNB
                - GNQ
                - GRC
                - GRD
                - GRL
                - GTM
                - GUF
                - GUM
                - GUY
                - HKG
                - HMD
                - HND
                - HRV
                - HTI
                - HUN
                - IDN
                - IMN
                - IND
                - IOT
                - IRL
                - IRN
                - IRQ
                - ISL
                - ISR
                - ITA
                - JAM
                - JEY
                - JOR
                - JPN
                - KAZ
                - KEN
                - KGZ
                - KHM
                - KIR
                - KNA
                - KOR
                - KWT
                - LAO
                - LBN
                - LBR
                - LBY
                - LCA
                - LIE
                - LKA
                - LSO
                - LTU
                - LUX
                - LVA
                - MAC
                - MAF
                - MAR
                - MCO
                - MDA
                - MDG
                - MDV
                - MEX
                - MHL
                - MKD
                - MLI
                - MLT
                - MMR
                - MNE
                - MNG
                - MNP
                - MOZ
                - MRT
                - MSR
                - MTQ
                - MUS
                - MWI
                - MYS
                - MYT
                - NAM
                - NCL
                - NER
                - NFK
                - NGA
                - NIC
                - NIU
                - NLD
                - NOR
                - NPL
                - NRU
                - NZL
                - OMN
                - PAK
                - PAN
                - PCN
                - PER
                - PHL
                - PLW
                - PNG
                - POL
                - PRI
                - PRK
                - PRT
                - PRY
                - PSE
                - PYF
                - QAT
                - REU
                - ROU
                - RUS
                - RWA
                - SAU
                - SDN
                - SEN
                - SGP
                - SGS
                - SHN
                - SJM
                - SLB
                - SLE
                - SLV
                - SMR
                - SOM
                - SPM
                - SRB
                - SSD
                - STP
                - SUR
                - SVK
                - SVN
                - SWE
                - SWZ
                - SXM
                - SYC
                - SYR
                - TCA
                - TCD
                - TGO
                - THA
                - TJK
                - TKL
                - TKM
                - TLS
                - TON
                - TTO
                - TUN
                - TUR
                - TUV
                - TWN
                - TZA
                - UGA
                - UKR
                - UMI
                - URY
                - USA
                - UZB
                - VAT
                - VCT
                - VEN
                - VGB
                - VIR
                - VNM
                - VUT
                - WLF
                - WSM
                - YEM
                - ZAF
                - ZMB
                - ZWE
                - null
            preferredInvoiceCurrency:
              type:
                - string
                - 'null'
            status:
              type:
                - string
                - 'null'
            lifecycleStatus:
              type:
                - string
                - 'null'
              enum:
                - INVITED
                - ONBOARDING
                - ACTIVE
                - OFFBOARDING
                - TERMINATED
                - ARCHIVED
                - null
            workEmail:
              type:
                - string
                - 'null'
            department:
              type:
                - string
                - 'null'
            legalEntity:
              type:
                - string
                - 'null'
            payrollEntity:
              type:
                - string
                - 'null'
            contractEntityID:
              type:
                - string
                - 'null'
            onboarded:
              type: boolean
            isTerminated:
              type: boolean
            privilegedAdmin:
              type: boolean
            isPrimaryAdmin:
              type: boolean
            isOrgMarketMaker:
              type: boolean
            role:
              type: string
              enum:
                - TOKU_ADMIN
                - CLIENT_ORG_ADMIN
                - CLIENT_ORG_APPROVER
                - FINANCE_ADMIN
                - USER
                - INVESTOR
                - SUB_INVESTOR
                - SUB_RECIPIENT
            employmentType:
              type:
                - string
                - 'null'
              enum:
                - CONTRACTOR
                - EMPLOYEE
                - EX_EMPLOYEE
                - ADVISOR
                - SERVICE_PROVIDER
                - OTHER
                - null
            revokedAt:
              type:
                - string
                - 'null'
            createdAt:
              type: string
            updatedAt:
              type: string
            payrollEmployeeID:
              type:
                - string
                - 'null'
            hasWelcomeEmailSent:
              type: boolean
            subEmploymentType:
              type:
                - string
                - 'null'
            remarks:
              type:
                - string
                - 'null'
            isITAdmin:
              type: boolean
            isExternalEmployee:
              type: boolean
            employeeSyncedSource:
              type:
                - string
                - 'null'
              enum:
                - CSV_UPLOAD
                - WORKDAY
                - ADP
                - UKG
                - TOKUEOR
                - TRINET
                - GUSTO
                - DEEL
                - BAMBOOHR
                - IMPORTED
                - OTHER
                - null
            investorFullName:
              type:
                - string
                - 'null'
            baseSalary:
              type:
                - string
                - 'null'
              pattern: ^-?\d+(?:\.\d+)?(?:e[+-]?\d+)?$
            baseSalaryCurrency:
              type:
                - string
                - 'null'
              enum:
                - TRY
                - ILS
                - CRC
                - TTD
                - SGD
                - JPY
                - AUD
                - NOK
                - INR
                - GBP
                - CHF
                - RUB
                - CAD
                - BRL
                - NGN
                - KRW
                - AED
                - LBP
                - EUR
                - NZD
                - ZAR
                - USD
                - USDC
                - USDT
                - USDP
                - PHP
                - PLN
                - RSD
                - HKD
                - TWD
                - AFN
                - AMD
                - ANG
                - AOA
                - ARS
                - AWG
                - AZN
                - BAM
                - BBD
                - BDT
                - BGN
                - BHD
                - BIF
                - BMD
                - BND
                - BOB
                - BSD
                - BTN
                - BWP
                - BYN
                - BZD
                - CDF
                - CLF
                - CLP
                - CNY
                - COP
                - CUC
                - CUP
                - CVE
                - CZK
                - DJF
                - DKK
                - DOP
                - DZD
                - EGP
                - ERN
                - ETB
                - FJD
                - FKP
                - GEL
                - GHS
                - GIP
                - GMD
                - GNF
                - GTQ
                - GYD
                - HNL
                - HRK
                - HTG
                - HUF
                - IDR
                - IQD
                - IRR
                - ISK
                - JMD
                - JOD
                - KES
                - KGS
                - KHR
                - KMF
                - KPW
                - KWD
                - KYD
                - KZT
                - LAK
                - LKR
                - LRD
                - LSL
                - LYD
                - MAD
                - MDL
                - MGA
                - MKD
                - MMK
                - MNT
                - MOP
                - MRU
                - MUR
                - MVR
                - MWK
                - MXN
                - MYR
                - MZN
                - NAD
                - NPR
                - NIO
                - OMR
                - PAB
                - PEN
                - PGK
                - PKR
                - PYG
                - QAR
                - RON
                - RWF
                - SAR
                - SBD
                - SCR
                - SDG
                - SHP
                - SLL
                - SOS
                - SRD
                - SSP
                - STN
                - SVC
                - SYP
                - SZL
                - TJS
                - TMT
                - TND
                - TOP
                - TZS
                - UAH
                - UGX
                - UYU
                - UZS
                - VES
                - VND
                - VUV
                - WST
                - XAF
                - XCD
                - XOF
                - XPF
                - YER
                - ZMW
                - SEK
                - THB
                - null
            baseSalaryPaymentType:
              type: string
              enum:
                - FIAT
                - TOKEN
            baseSalaryTokenTypeID:
              type:
                - string
                - 'null'
            baseSalaryTokenSymbol:
              type:
                - string
                - 'null'
            baseSalaryTokenNetwork:
              type:
                - string
                - 'null'
            baseSalaryPeriod:
              type:
                - string
                - 'null'
              enum:
                - HOURLY
                - MONTHLY
                - YEARLY
                - null
            stablecoinPayPercentage:
              type:
                - number
                - 'null'
            maxStablecoinPercentage:
              type:
                - number
                - 'null'
            taxMethod:
              type:
                - string
                - 'null'
              enum:
                - NO_TAX
                - MANUAL_TAX
                - TAX_ENGINE
                - BULK_UPLOAD
                - null
            withholdingPercentage:
              type:
                - string
                - 'null'
              pattern: ^-?\d+(?:\.\d+)?(?:e[+-]?\d+)?$
            lastLogin:
              type:
                - string
                - 'null'
            lastTestTxReminderBy:
              type:
                - string
                - 'null'
            lastTestTxReminderAt:
              type:
                - string
                - 'null'
            payrollFileNumber:
              type:
                - string
                - 'null'
            externalPayrollId:
              type:
                - string
                - 'null'
            lastOnboardingReminderBy:
              type:
                - string
                - 'null'
            lastOnboardingReminderAt:
              type:
                - string
                - 'null'
            address:
              type:
                - string
                - 'null'
            payrollGroup:
              type:
                - string
                - 'null'
            lastInactiveWalletReminderBy:
              type:
                - string
                - 'null'
            lastInactiveWalletReminderAt:
              type:
                - string
                - 'null'
            recipientType:
              type:
                - string
                - 'null'
              enum:
                - PERSON
                - ENTITY
                - null
            receiveNotificationEmails:
              type: boolean
            receiveInAppNotifications:
              type: boolean
            notificationEmailFrequency:
              type: string
              enum:
                - 'OFF'
                - IMMEDIATE
                - DAILY
            receiveSlackNotifications:
              type: boolean
            selfServeContractorOnboardingStatus:
              type: string
              enum:
                - NOT_STARTED
                - IN_PROGRESS
                - COMPLETED
            selfServeContractorOnboardingCompletedAt:
              type:
                - string
                - 'null'
            selfServeWelcomeEmailSentAt:
              type:
                - string
                - 'null'
            numberOfPayPeriodsPerYear:
              type: number
            managerRoleInOrgID:
              type:
                - string
                - 'null'
            managerPath:
              type: array
              items:
                type: string
            person:
              type: object
              properties:
                personID:
                  type: string
                givenName:
                  type: string
                familyName:
                  type: string
                middleName:
                  type:
                    - string
                    - 'null'
                createdAt:
                  type: string
                updatedAt:
                  type: string
                legacyMigratedAt:
                  type:
                    - string
                    - 'null'
                legacyModelID:
                  type:
                    - number
                    - 'null'
                mergedIntoPersonID:
                  type:
                    - string
                    - 'null'
                mergedAt:
                  type:
                    - string
                    - 'null'
                fullName:
                  type: string
              required:
                - personID
                - givenName
                - familyName
                - middleName
                - createdAt
                - updatedAt
                - legacyMigratedAt
                - legacyModelID
                - mergedIntoPersonID
                - mergedAt
                - fullName
          required:
            - hrAutomationOnly
            - isServiceSeat
            - invoiceApproverRoutingUpdatedAt
            - legacyMigratedAt
            - legacyModelID
            - roleInOrgID
            - personID
            - orgID
            - invitedByInvestorID
            - invitedByRecipientID
            - roleInOrgExternalID
            - externalEmployeeID
            - positionID
            - jobTitle
            - country
            - countryCode
            - preferredInvoiceCurrency
            - status
            - lifecycleStatus
            - workEmail
            - department
            - legalEntity
            - payrollEntity
            - contractEntityID
            - onboarded
            - isTerminated
            - privilegedAdmin
            - isPrimaryAdmin
            - isOrgMarketMaker
            - role
            - employmentType
            - revokedAt
            - createdAt
            - updatedAt
            - payrollEmployeeID
            - hasWelcomeEmailSent
            - subEmploymentType
            - remarks
            - isITAdmin
            - isExternalEmployee
            - employeeSyncedSource
            - investorFullName
            - baseSalary
            - baseSalaryCurrency
            - baseSalaryPaymentType
            - baseSalaryTokenTypeID
            - baseSalaryTokenSymbol
            - baseSalaryTokenNetwork
            - baseSalaryPeriod
            - stablecoinPayPercentage
            - maxStablecoinPercentage
            - taxMethod
            - withholdingPercentage
            - lastLogin
            - lastTestTxReminderBy
            - lastTestTxReminderAt
            - payrollFileNumber
            - externalPayrollId
            - lastOnboardingReminderBy
            - lastOnboardingReminderAt
            - address
            - payrollGroup
            - lastInactiveWalletReminderBy
            - lastInactiveWalletReminderAt
            - recipientType
            - receiveNotificationEmails
            - receiveInAppNotifications
            - notificationEmailFrequency
            - receiveSlackNotifications
            - selfServeContractorOnboardingStatus
            - selfServeContractorOnboardingCompletedAt
            - selfServeWelcomeEmailSentAt
            - numberOfPayPeriodsPerYear
            - managerRoleInOrgID
            - managerPath
            - person
      required:
        - supersededAt
        - documentID
        - roleInOrgID
        - investorEntityID
        - documentName
        - documentDescription
        - documentType
        - fileID
        - signedAt
        - archivedAt
        - createdAt
        - updatedAt
        - deletedAt
        - grantID
        - warrantID
        - legacyMigratedAt
        - legacyModelID
        - visibleToRole
        - visibleToClientAdmin
        - file
        - roleInOrg
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
