Course Enrollment Prompt Service
API Contract
REST
/api/v1/enrollment-prompts
5 endpoints
GET
/api/v1/enrollment-prompts/api/v1/enrollment-prompts
List enrollment prompts. Filter by mentor or notification to check prompt history.
Public
Response Example
{
"data": [
{
"prompt_id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"mentor_id": "mentor_sarah_chen",
"notification_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"course_type": "first_aid_level_2",
"deep_link": "https://app.example.com/enroll?course=first_aid_level_2&mentor=mentor_sarah_chen",
"is_triggered": true,
"triggered_at": "2026-03-16T08:05:00Z",
"created_at": "2026-03-16T08:05:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1
}
}
GET
/api/v1/enrollment-prompts/api/v1/enrollment-prompts/:prompt_id
Get a specific enrollment prompt record.
Public
Response Example
{
"prompt_id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"mentor_id": "mentor_sarah_chen",
"notification_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"course_type": "first_aid_level_2",
"deep_link": "https://app.example.com/enroll?course=first_aid_level_2&mentor=mentor_sarah_chen",
"is_triggered": true,
"triggered_at": "2026-03-16T08:05:00Z",
"created_at": "2026-03-16T08:05:00Z"
}
POST
/api/v1/enrollment-prompts/api/v1/enrollment-prompts
Trigger an enrollment prompt for a mentor. Generates a deep link and marks as triggered.
Public
Request Example
{
"mentor_id": "mentor_sarah_chen",
"notification_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"course_type": "first_aid_level_2"
}
Response Example
{
"prompt_id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"mentor_id": "mentor_sarah_chen",
"notification_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"course_type": "first_aid_level_2",
"deep_link": "https://app.example.com/enroll?course=first_aid_level_2&mentor=mentor_sarah_chen",
"is_triggered": true,
"triggered_at": "2026-03-26T11:00:00Z",
"created_at": "2026-03-26T11:00:00Z"
}
PUT
/api/v1/enrollment-prompts/api/v1/enrollment-prompts/:prompt_id
Update an enrollment prompt (e.g., mark re-triggered or update course type).
Public
Request Example
{
"course_type": "first_aid_level_2_refresher",
"is_triggered": true,
"triggered_at": "2026-03-27T09:00:00Z"
}
Response Example
{
"prompt_id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"mentor_id": "mentor_sarah_chen",
"notification_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"course_type": "first_aid_level_2_refresher",
"deep_link": "https://app.example.com/enroll?course=first_aid_level_2_refresher&mentor=mentor_sarah_chen",
"is_triggered": true,
"triggered_at": "2026-03-27T09:00:00Z",
"created_at": "2026-03-16T08:05:00Z"
}
DELETE
/api/v1/enrollment-prompts/api/v1/enrollment-prompts/:prompt_id
Delete an enrollment prompt record.
Public
Response Example
{
"deleted": true,
"prompt_id": "e5f6a7b8-c9d0-1234-efab-345678901234"
}