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

# Create Tax Form Envelope

> Generates a prefilled W-4/W-8/W-9/I-9/state tax PDF and creates a DocuSign envelope with embedded signing URL.

Not available to API keys.

## OpenAPI

````yaml api-reference/openapi.json POST /hris/create-tax-form-envelope
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/create-tax-form-envelope:
    post:
      operationId: createTaxFormEnvelope
      summary: Create Tax Form Envelope
      description: >-
        Generates a prefilled W-4/W-8/W-9/I-9/state tax PDF and creates a
        DocuSign envelope with embedded signing URL.


        Not available to API keys.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaxFormEnvelopeRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTaxFormEnvelopeResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    CreateTaxFormEnvelopeRequest:
      type: object
      properties:
        formType:
          type: string
          enum:
            - W4
            - W8
            - W9
            - STATE_TAX
            - I9
        stateCode:
          type: string
          minLength: 2
          maxLength: 2
        roleInOrgId:
          type: string
          format: uuid
        overrideTerminatedReason:
          type: string
          minLength: 10
          maxLength: 1000
      required:
        - formType
    CreateTaxFormEnvelopeResponse:
      type: object
      properties:
        pdfBase64:
          type: string
        filename:
          type: string
        formType:
          type: string
        signingUrl:
          type:
            - string
            - 'null'
        envelopeId:
          type:
            - string
            - 'null'
        templateInstanceId:
          type:
            - string
            - 'null'
        docusignError:
          type:
            - string
            - 'null'
        formState:
          type: string
          enum:
            - ready_to_sign
            - awaiting_countersignature
            - finalizing
            - signed
            - preview_only
        stateMessage:
          type:
            - string
            - 'null'
      required:
        - pdfBase64
        - filename
        - formType
        - signingUrl
        - envelopeId
        - docusignError
        - formState
        - stateMessage
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
