Cancel enrollments

Cancel the enrollments you list, the same as on the course's Enrollments tab.

POST https://cotlet.dev/api/v1/ispring/enrollment/cancel

write Confirm

Cancels each enrollment_id from list_enrollments and returns the ones that were cancelled. Department Administrators can cancel only enrollments of users in their departments. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: cancel_enrollment
NameTypeDescription
enrollment_ids string[] required string[] Enrollments from list_enrollments.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/ispring/enrollment/cancel \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enrollment_ids":["enrollment ids"]}'
Python
result = client.call("ispring", "cancel_enrollment", {"enrollment_ids":["enrollment ids"]})
Node.js
const result = await cotlet.call('ispring', 'cancel_enrollment', {"enrollment_ids":["enrollment ids"]});
CLI
cotlet call ispring cancel_enrollment --data '{"enrollment_ids":["enrollment ids"]}'

Example response

JSON

{
  "cancelled": 1,
  "enrollment_ids": [
    "e_70a0f1"
  ]
}

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.