Employment records & compliance

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.

POSThttps://api.toku.com/hris/create-tax-form-envelope

Not available to API keys.

curl --request POST \
  --url 'https://api.toku.com/hris/create-tax-form-envelope' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "formType": "W4",
  "stateCode": "string",
  "roleInOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "overrideTerminatedReason": "string"
}'
200 response
{
  "pdfBase64": "string",
  "filename": "string",
  "formType": "string",
  "signingUrl": "string",
  "envelopeId": "string",
  "templateInstanceId": "string",
  "docusignError": "string",
  "formState": "ready_to_sign",
  "stateMessage": "string"
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.

Body

application/json

formTypestringrequired

Available options: W4, W8, W9, STATE_TAX, I9

stateCodestring

Allowed: 2 to 2 characters

roleInOrgIdstring<uuid>
overrideTerminatedReasonstring

Allowed: 10 to 1000 characters

Response

200Successful response
pdfBase64stringrequired
filenamestringrequired
formTypestringrequired
signingUrlstring | nullrequired
envelopeIdstring | nullrequired
templateInstanceIdstring | null
docusignErrorstring | nullrequired
formStatestringrequired

Available options: ready_to_sign, awaiting_countersignature, finalizing, signed, preview_only

stateMessagestring | nullrequired
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits