Add a trainer or guest presenter to a live session.

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

Adds a member to a live workshop or live lesson: role 2 adds an academy trainer as co-trainer, role 4 invites a guest presenter by email, and role 1 replaces the primary trainer.

Endpoint

post https://{TrainerCentral-API-Domain}/tc/api/v1/trainer/sessionMembers.json

OAuth Scope

TrainerCentral.sessionapi.CREATECopied!

Headers

tc-orgIdstring(Required)

ID of the academy (orgId).

Example
51517414

Request Body

application/json
sessionMemberJSON Object(Optional)

The trainer or guest presenter to add.

Hide Sub-Attributes
sessionIdlong(Optional)

ID of the live session.

userIdlong(Optional)

User ID (zuid) of an academy trainer or admin. Required for role 1 and 2.

roleinteger(Optional)

Role to give. Allowed: 1=Primary trainer (replaces the current one), 2=Co-trainer, 4=Guest presenter.

firstNamestring(Optional)

Guest presenter first name (role 4).

lastNamestring(Optional)

Guest presenter last name (role 4).

emailIdstring(Optional)

Guest presenter email address (role 4; required there).

namestring(Optional)

Guest presenter display name (role 4).

statusstring(Optional)

Membership status. Send 1 (Active).

sourceinteger(Optional)

How the member is added. Allowed: 1=Added by a trainer (role 1, 2), 2=Other (guest presenters), 4=Zapier, 6=Zoho Flow.

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request POST \
  --url https://trainercentral.zoho.com/tc/api/v1/trainer/sessionMembers.json \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/json' \
  --header 'tc-orgId: 51517414' \
  --data '{"sessionMember":{"sessionId":3000000000050,"userId":"51456902","role":2,"status":"1","source":1}}'

Body Parameters

Add a co-trainer.

Add a co-trainer.

Change the primary trainer.

Invite a guest presenter.

Copied!
  {
    "sessionMember": {
      "sessionId": 3000000000050,
      "userId": "51456902",
      "role": 2,
      "status": "1",
      "source": 1
    }
  }
                
  {
    "sessionMember": {
      "sessionId": 3000000000050,
      "userId": "51456903",
      "role": 1,
      "status": "1",
      "source": 1
    }
  }
                
  {
    "sessionMember": {
      "sessionId": 3000000000050,
      "emailId": "alex.guest@example.com",
      "firstName": "Alex",
      "lastName": "Morgan",
      "name": "Alex Morgan",
      "role": 4,
      "source": 2
    }
  }
                
▼ Show full

Response Parameters

sessionMembersJSON Array

Session member records created by this call.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
sessionMemberIdstring

ID of the session member (registration).

emailIdstring

Email address of the member.

namestring

Name of the member.

userIdstring

User ID of the member.

sessionIdstring

ID of the session.

orgIdstring

ID of the academy (orgId).

rolestring

Role in the session. Allowed: 1=Trainer, 2=Co-trainer, 3=Learner, 4=Guest presenter.

idstring

Same as sessionMemberId.

statusstring

Registration status. Allowed: 1=Registered, 0=Invited, -1=Waiting for approval, -2=Denied, -3=Cancelled by learner, -4=Invitation cancelled.

registerstring

true when the learner has registered.

sourcestring

How the member was added. Allowed: 1=Invited, 2=Self registration, 3=CRM, 4=Zapier invite, 5=Zapier registration, 6=Zoho Flow invite, 7=Zoho Flow registration.

paymentStatusstring

Allowed: 0=Yet to pay, 1=Paid, 2=Failed, 3=Cancelled, 4=Refunded, 5=Unpaid (inactive), 6=Unpaid, -2=Pending.

orgMemberIdstring

Academy member ID.

createdTimestring

Added time in epoch milliseconds.

lastUpdatedTimestring

Last updated time in epoch milliseconds.

mailStatusstring

Invite mail status. Allowed: 0=Not sent, 1=Sent, 2=Failed.

courseMembersarray

Course member records created for a live lesson. Absent for live workshops.

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 - sessionId in the body does not match a session in this academy. Pass a valid sessionId. Do not retry unchanged.

ST_401

SESSION_DELETED - The session was deleted. Use a session that is not deleted. Do not retry unchanged.

ST_102

UNAUTHORISED_ACCESS - The user is not an academy owner or admin or the primary trainer, or the plan does not allow this trainer change. Use one of these roles or upgrade the plan; do not retry unchanged.

ST_361

NOT_ORG_MEMBER - userId is not an active trainer or admin of this academy. Pass a valid zuid. Do not retry unchanged.

ST_84

INVALID_ACTION - More than one primary trainer (role 1) was sent. Send one per call. Do not retry unchanged.

ST_87

MODIFY_TRAINERS_NOT_ALLOWED_DUE_TO_SESSION_IS_LIVE - The primary trainer cannot change while an occurrence is live. Retry after it ends.

ST_408

PLAN_NOT_SUFFICIENT - source 4 (Zapier) or 6 (Zoho Flow) is not on the academy plan. Send source 1 or 2, or upgrade the plan. Do not retry unchanged.

ST_800

INTEGRATION_DISABLED - source 4 (Zapier) or 6 (Zoho Flow) is turned off for the academy. Turn it on or send source 1 or 2. Do not retry unchanged.

ST_85

SESSION_MEMBERS_CREATE_FAILED - A co-trainer was sent for an on-demand lesson, source or role is missing, or adding failed. Use a live session and send the required keys; if it still fails, retry later.

Response Example

Response after adding a co-trainer.

200
200
400
500
Copied!
  {
    "sessionMembers": [
      {
        "sessionMemberId": "3000000000065",
        "id": "3000000000065",
        "sessionId": "3000000000050",
        "userId": "51456902",
        "name": "Rahul Menon",
        "emailId": "rahul.menon@example.com",
        "role": "2",
        "status": "1",
        "source": "1",
        "orgId": "51517414",
        "mailStatus": "0"
      }
    ]
  }
                
  {
    "error": {
      "code": "string",
      "codeStr": "string",
      "message": "string"
    }
  }
                
500 Request failed; see the error code.
▼ Show full

Rate Limits

Duration1 minute
Threshold20

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