Generate a W2 form [DEMO]Copy Pagepost https://api.gusto-demo.com/v1/sandbox/generate_w2Demo actionThis action is only available in the Demo environment Generates a W2 document for testing purposes. scope: employees:writeBody Paramsemployee_idstringrequiredThe employee UUID.yearintegerMust be equal to or more recent than 2015. If not specified, defaults to the previous year.HeadersX-Gusto-API-VersionstringenumDefaults to 2026-02-01Determines the date-based API version associated with your API call. If none is provided, your application's minimum API version is used.2026-02-01Allowed:2026-02-01Responses 201Created 404Not Found The requested resource does not exist. Make sure the provided UUID is valid. 422Unprocessable Entity This may happen when the body of your request contains errors such as invalid_attribute_value, or the request fails due to an invalid_operation. See the Errors Categories guide for more details.Updated 14 days ago