Invite users

Invite people by email as learner, instructor or manager, optionally into a group.

POST https://cotlet.dev/api/v1/learnupon/users/invite

write Confirm

Sends an invite to each address, with the default user type learner. With group_id, the invitees join that group when they accept, and courses assigned to the group enroll them then. Invitees stay pending until they accept. A manager can be invited but cannot get a group before accepting. Admin invites are not made by this tool. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: invite_users
NameTypeDescription
emails array required array Email addresses to invite.
user_type enum enum learner, instructor or manager. Default: learner.
group_id string string Group the invitees join on accepting.
expires date date Date when access runs out.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/learnupon/users/invite \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"emails":["maria.nowak@example.com","tom.reyes@example.com"],"user_type":"learner","group_id":"4821"}'
Python
result = client.call("learnupon", "invite_users", {"emails":["maria.nowak@example.com","tom.reyes@example.com"],"user_type":"learner","group_id":"4821"})
Node.js
const result = await cotlet.call('learnupon', 'invite_users', {"emails":["maria.nowak@example.com","tom.reyes@example.com"],"user_type":"learner","group_id":"4821"});
CLI
cotlet call learnupon invite_users --data '{"emails":["maria.nowak@example.com","tom.reyes@example.com"],"user_type":"learner","group_id":"4821"}'

Example response

JSON

{
  "invited": 2,
  "group_id": "4821",
  "status": "pending",
  "emails": [
    "maria.nowak@example.com",
    "tom.reyes@example.com"
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.