{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":536,"path":"api-reference/rest-apis/reassignassessment-PATCH-userId.md","title":"Reassign Assessment - PATCH /\\{userId\\}","bundle":null,"doc_type":null,"release":"australia","body":"\n# Reassign Assessment - PATCH /\\{userId\\}\n\nReassigns an assessment instance to a different user. Use this endpoint when you need to transfer ownership of an in-progress assessment from the current assignee to another user.\n\nThe assessment must be in the “Open” state to be reassigned. This endpoint updates the primary owner on the assessment instance persona record, effectively changing who is responsible for completing the assessment.\n\nCommon use cases include:\n\n-   Transferring assessment responsibility when an employee changes roles or leaves the organization.\n-   Correcting an incorrectly assigned assessment.\n-   Delegating assessment completion to a more appropriate team member.\n\n**Note:** The requesting user must have write access to the assessment’s persona assignment record to perform the reassignment.\n\n## URL format\n\nVersioned URL: `PATCH /api/sn_smart_asmt/{api_version}/instance/asmt/{asmtInstanceId}/user/{userId}`\n\nDefault URL: `PATCH /api/sn_smart_asmt/instance/asmt/{asmtInstanceId}/user/{userId}`\n\n## Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr><tr><td>\n\nasmtInstanceId\n\n</td><td>\n\nRequired. Sys\\_id of the assessment instance to reassign.Table: Assessment Instance \\[sn\\_smart\\_asmt\\_instance\\]\n\nMaximum length: 32\n\nData type: String\n\n</td></tr><tr><td>\n\nuserId\n\n</td><td>\n\nRequired. Sys\\_id of the user to whom the assessment will be reassigned. Table: User \\[sys\\_user\\]\n\nMaximum length: 32\n\nData type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n## Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Supported values: application/json, application/xml, text/xml. Default: application/json.|\n|Authorization|Authentication credentials. Use Basic authentication with base64-encoded username:password, or an OAuth 2.0 bearer token.|\n|Content-Type|Not required for this endpoint as there is no request body, but if provided, supported values are: application/json, application/xml, text/xml.|\n\n|Header|Description|\n|------|-----------|\n|Content-Type|Data format of the response body. Matches the Accept header value or defaults to application/json.|\n|X-Is-Logged-In|Flag that indicates whether the requesting user is logged in. Possible values: true, false.|\n|X-Transaction-ID|Unique identifier for the transaction, useful for debugging and support requests.|\n\n## Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table><thead><tr><th>\n\nStatus code\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n200\n\n</td><td>\n\nSuccess. The assessment was successfully reassigned to the specified user. No response body is returned.\n\n</td></tr><tr><td>\n\n400\n\n</td><td>\n\nBad Request. The request is missing required path parameters. Possible error messages:\n\n-   `Assessment id is not passed.`\n-   `User id is not passed.`\n\n</td></tr><tr><td>\n\n403\n\n</td><td>\n\nForbidden. The requesting user doesn't have authorization to reassign this assessment. This occurs when the user lacks write access to the assessment’s persona assignment record.Error message: `User not authorized to reassign.`\n\n</td></tr><tr><td>\n\n404\n\n</td><td>\n\nNot Found. The specified resource doesn't exist. Possible error messages:\n\n-   `Assessment instance not found.`\n-   `User not found.`\n-   `Persona assignment record for assessor is not available for the assessment.`\n\n</td></tr><tr><td>\n\n406\n\n</td><td>\n\nNot acceptable. The reassignment can't be completed due to business rule constraints. Possible error messages:\n\n-   `Assessment can’t be reassigned as it's not in {state_name} state` - Assessment must be in Open state.\n-   `Assessment can’t be reassigned as it's already assigned to the current user`\n-   `Unable to reassign the assessment` - Generic failure during update.\n\n</td></tr></tbody>\n</table>## Response body parameters \\(JSON or XML\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nReturn object containing results of the reassignment.```\n{\n  \"error\": {Object},\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nerror\n\n</td><td>\n\nObject containing error details.Data type: Object\n\n```\n\"error\": {\n  \"detail\": \"String\",\n  \"message\": \"String\"\n  }\n```\n\n</td></tr><tr><td>\n\nerror.message\n\n</td><td>\n\nHuman-readable description of the error that occurred. Examples:\n\n-   `Assessment ID isn't passed.`\n-   `User not authorized to reassign.`\n-   `Assessment instance not found.`\n\n Data type: String\n\n</td></tr><tr><td>\n\nerror.detail\n\n</td><td>\n\nAdditional details about the error, if available. May be empty.Data type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td>\n\nIndicates the outcome of the request. Possible values: `\"failure\"` \\(when an error occurs\\). Successful responses \\(HTTP 200\\) return an empty body with no status field.\n\n</td></tr></tbody>\n</table>## cURL request\n\nThis PATCH example reassigns the assessment with ID `4d812fed47f8835060b5e65d416d431a` to the user with ID `62826bf03710200044e0bfc8bcbe5df1`.\n\n```\ncurl \"https://testsae.service-now.com/api/sn_smart_asmt/instance/asmt/4d812fed47f8835060b5e65d416d431a/user/62826bf03710200044e0bfc8bcbe5df1\" \\\n--request PATCH \\\n--header \"Accept:application/json\" \\\n--user 'admin':'admin'\n```\n\nResponse:\n\n```\n{\n  \"error\": {\n    \"message\": \"Assessment can't be reassigned as it is already assigned to the current user\",\n    \"detail\": \"\"\n  },\n  \"status\": \"failure\"\n}\n```\n\n**Parent Topic:**[Reassign Assessment API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/reassign-assessment-api.md)\n\n"}}