Approve or reject an access request.

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

Approves (status 2) or rejects (status 3) a learner's request to join a private course. An approved learner can then enroll.

Endpoint

put https://{TrainerCentral-API-Domain}/tc/api/v1/trainer/updateCourseAttendee/{courseMemberId}.json

OAuth Scope

TrainerCentral.courseapi.UPDATECopied!

Headers

tc-orgIdstring(Required)

ID of the academy (orgId).

Example
51517414

Path Parameters

courseMemberIdstring(Required)

ID of the access request (courseMembersId).

Request Body

application/json
courseMembersJSON Array(Required)

Status change, as an array with one item.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
statusinteger(Required)

New membership status. Allowed: 2=Approve request, 3=Reject request, 11=Prospect, 50=Enrolled, 51=Blocked.

courseIdlong(Optional)

ID of the course the membership must belong to.

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request PUT \
  --url https://trainercentral.zoho.com/tc/api/v1/trainer/updateCourseAttendee/{courseMemberId}.json \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/json' \
  --header 'tc-orgId: 51517414' \
  --data '{"courseMembers":[{"status":2}]}'

Body Parameters

Approve a request.

Approve a request.

Reject a request for a given course.

Copied!
  {
    "courseMembers": [
      {
        "status": 2
      }
    ]
  }
                
  {
    "courseMembers": [
      {
        "status": 3,
        "courseId": 3000000000022
      }
    ]
  }
                
▼ Show full

Response Parameters

courseMemberJSON Object

The course member after the change.

Hide Sub-Attributes
courseMembersIdstring

ID of the course member (courseMemberId).

idstring

Same as courseMembersId.

courseIdstring

ID of the course or group.

coursestring

Same as courseId.

userIdstring

User ID (zuid) of the member.

orgMemberIdstring

Academy member ID.

orgIdstring

ID of the academy (orgId).

rolestring

Role in the course. Allowed: 0=Course admin, 1=Trainer, 3=Learner, 4=Previewer.

statusstring

Membership status. Allowed: 0=None, 1=Access requested, 2=Approved, 3=Rejected, 10=Invited, 11=Prospect, 50=Enrolled, 51=Blocked.

currentStatusstring

Learner progress status. Allowed: 1=Invited, 2=Access requested, 3=Access rejected, 4=Access approved, 5=Free preview, 6=Prospect, 7=Enrolled, 8=Accessed, 9=Access revoked, 10=Blocked, 11=Preview user, 12=Deleted.

namestring

Full name of the member.

emailstring

Email of the member; * when hidden from trainers.

imageUrlstring

Profile image URL.

completionPercentagestring

Course completion percentage (0-100).

completionTypestring

How the course was completed. Allowed: 0=By the learner, 1=Marked by a trainer.

completedLessonstring

Number of lessons completed.

totalLessonstring

Total number of lessons in the course.

timestring

Last membership change in epoch milliseconds.

invitedTimestring

Invite time in epoch milliseconds.

enrolledTimestring

First enrollment time in epoch milliseconds.

completedTimestring

Completion time in epoch milliseconds.

accessedTimestring

Last time the learner opened the course, in epoch milliseconds.

lastLoginstring

Last sign-in time in epoch milliseconds.

ipAddressstring

IP address of the last sign-in.

countrystring

Country of the last sign-in.

isCertificateIssuedstring

true when a certificate has been issued.

isBadgeIssuedstring

true when a badge has been issued.

totalRevenuestring

Amount the learner paid, in the academy base currency.

formattedTotalRevenuestring

totalRevenue with the currency symbol.

expiryTimestring

Access expiry time in epoch milliseconds.

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_84

INVALID_ACTION - Invalid courseMemberId or status, or the learner is already enrolled. Send a valid courseMemberId and status 2 or 3. Do not retry unchanged.

ST_102

UNAUTHORISED_ACCESS - The user is not an academy owner, admin or trainer of this course. Do not retry with the same token.

Response Example

Request approved.

200
200
400
500
Copied!
  {
    "courseMember": {
      "courseMembersId": "3000000000091",
      "id": "3000000000091",
      "courseId": "3000000000022",
      "userId": "51456991",
      "orgMemberId": "3000000000003",
      "orgId": "51517414",
      "role": "3",
      "status": "2",
      "currentStatus": "4",
      "completionPercentage": "0",
      "time": "1785241782247"
    }
  }
                
  {
    "error": {
      "code": "string",
      "codeStr": "string",
      "message": "string"
    }
  }
                
500 Request failed; see the error code.
▼ Show full

Rate Limits

Duration1 minute
Threshold10

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.