POST  /webhook/subscribe

Request Headers

Header

Description

X-Auth-Account-Url (required)The base URL of the account, e.g. https://myaccount.ispringlearn.com
X-Auth-Email (required)The login of Account Owner and Account Administrator.
X-Auth-Password (required)

The password of Account Owner and Account Administrator.

ParameterDescription
subscriberName (required)The name of an existing subscriber.
subscriptionAn array of data with subscription settings.
subscription.subscriptionType

The type of event the user has subscribed to: 

  • USER_REGISTERED
  • LEARNERS_ENROLLED_IN_COURSE
  • TRAINING_MEETING_ADDED
  • TRAINING_MEETING_REMOVED
  • TRAINING_MEETING_UPDATED
  • TRAINING_SESSION_PARTICIPANTS_ADDED
  • TRAINING_SESSION_PARTICIPANT_REMOVED
  • COURSE_COMPLETED_SUCCESSFULLY
subscription.params

An array of data with possible parameters (filters) by event:

  • LEARNERS_ENROLLED_IN_COURSE (userIds, courseIds)
  • TRAINING_SESSION_PARTICIPANTS_ADDED (userIds)
  • TRAINING_SESSION_PARTICIPANT_REMOVED (userIds)
  • COURSE_COMPLETED_SUCCESSFULLY (userIds, courseIds)

Sample Request

curl --location 'https://api-learn.ispringlearn.com/webhook/subscribe' \
--header 'X-Auth-Account-Url: https://myaccount.ispringlearn.com' \
--header 'X-Auth-Email: email@email.com' \
--header 'X-Auth-Password: password' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
  "subscriberName": "name",
  "subscription": {
    "subscriptionType": "LEARNERS_ENROLLED_IN_COURSE",
    "params": [
        {
        	"name": "userIds",
        	"value": "[\"d15e8c54-c26f-11ed-b604-0a768b65ead7\", \"d15e8c54-c26f-11ed-b604-0a768b65ead7\"]"
        }
    ]
  }
XML

Response Codes

Code

Text

Description

200

ОК

The subscription has been added.

400

Bad Request

A request error.

401

Unauthorized

An authorization error.

403

Permission Denied

The user doesn't have enough permissions.

404

Subscriber not found

The subscriber was not found.