Rename a course test or change its description.

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Updates the name or description of a test in a course lesson; only the keys you send are changed. The path formId is the test's form UUID, not the test id; send type=3.

Endpoint

put https://{TrainerCentral-API-Domain}/tc/api/v1/trainer/session/{sessionId}/forms/{formUuid}.json

OAuth Scope

TrainerCentral.sessionapi.UPDATECopied!

Headers

tc-orgIdstring(Required)

ID of the academy (orgId).

Example
51517414

Path Parameters

sessionIdlong(Required)

ID of the course lesson (sessionId) that holds the test.

Example
21603000000354002
formUuidstring(Required)

Form UUID of the test (the part of tests[].formId before the underscore), not the test id.

Example
7305cb9e-3913-49d7-8cb9-eebd159f5281

Query Parameters

typestring(Required)

Form type. Allowed: 3=Test.

Example
3

Request Body

application/json
formJSON Object(Required)

Name and description to change; send at least one.

Hide Sub-Attributes
namestring(Optional)

New name of the test. Max 50 characters.

descriptionstring(Optional)

Instructions shown before the test. Supports rich text. An empty string clears it.

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request PUT \
  --url 'https://trainercentral.zoho.com/tc/api/v1/trainer/session/21603000000354002/forms/7305cb9e-3913-49d7-8cb9-eebd159f5281.json?type=3' \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/json' \
  --header 'tc-orgId: 51517414' \
  --data '{"form":{"name":"Business Fundamentals Assessment","description":"<p>Answer all questions on SaaS metrics, business planning and cash flow.</p>"}}'

Body Parameters

Rename a test and replace its instructions.

Rename a test and replace its instructions.

Rename a test only.

Copied!
  {
    "form": {
      "name": "Business Fundamentals Assessment",
      "description": "<p>Answer all questions on SaaS metrics, business planning and cash flow.</p>"
    }
  }
                
  {
    "form": {
      "name": "Module 1 Quiz"
    }
  }
                
▼ Show full

Response Parameters

formJSON Object

The test form after the update.

Hide Sub-Attributes
formIdstring

Test form ID (formUuid_sessionId). The part before the underscore is the form UUID.

formIdValuestring

Form UUID of the test. Returned only by Create Course Test.

idstring

Same as formId.

sessionIdstring

ID of the lesson that holds the test.

namestring

Name of the test.

descriptionstring

Test instructions. Supports rich text.

typestring

Form type. Always 3 (Test).

errorJSON Object

Error details.

Hide Sub-Attributes
codestring

Deprecated numeric error code (for example ST_202). Prefer codeStr; omitted from doc samples.

codeStrstring

Error code name (ShowtimeErrorCode / err_code_str), for example MISSING_PARAMETER.

messagestring

Error message.

Possible Error Codes

HTTP CodeError CodeDescription
500ST_79

INVALID_SESSION - The sessionId is not a lesson in this academy. Use tests[].sessionId from List Course Tests; do not retry unchanged.

ST_401

SESSION_DELETED - The lesson (sessionId) is deleted. Use an existing lesson; do not retry unchanged.

ST_102

UNAUTHORISED_ACCESS - The user cannot edit this test. Use an academy owner, admin, course trainer or lesson owner; do not retry unchanged.

ST_819

TEST_FEATURE_UNAVAILABLE - The academy plan does not include graded tests. Upgrade the plan; do not retry until then.

ST_64

UNABLE_TO_RETRIEVE_TALK_SETTINGS_DATA - No test with this form UUID in the lesson, or type is not 3. Send the part of tests[].formId before the underscore and type=3; do not retry unchanged.

Response Example

Renamed test.

200
200
400
500
Copied!
  {
    "form": {
      "id": "7305cb9e-3913-49d7-8cb9-eebd159f5281_21603000000354002",
      "formId": "7305cb9e-3913-49d7-8cb9-eebd159f5281_21603000000354002",
      "sessionId": "21603000000354002",
      "name": "Business Fundamentals Assessment",
      "description": "<p>Answer all questions on SaaS metrics, business planning and cash flow.</p>",
      "type": "3"
    }
  }
                
  {
    "error": {
      "code": "string",
      "codeStr": "string",
      "message": "string"
    }
  }
                
500 Request failed; see the error code.
▼ Show full