Skip to content

Course Created

The course.created event is triggered when a new course is created in the system.

Event Properties

PropertyTypeDescription
idstringThe unique identifier of the course
namestringThe name of the course
descriptionstringThe description of the course
statestringThe current state of the course
typestringThe type of the course (always “Course”)
created_atstringThe timestamp when the course was created
updated_atstringThe timestamp when the course was last updated
slugstringThe URL-friendly slug of the course
plansarrayAn array of plans associated with the course

Plan Properties

Each plan in the plans array has the following properties:

PropertyTypeDescription
idstringThe unique identifier of the plan
namestringThe name of the plan
descriptionstringA description of the plan
currencystringThe currency code for the plan’s price
amountintegerThe price amount in the smallest currency unit
created_atstringThe timestamp when the plan was created
updated_atstringThe timestamp when the plan was last updated

Example Payload

{
"type": "course.created",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Introduction to Programming",
"description": "Learn the basics of coding with this comprehensive course.",
"state": "draft",
"type": "Course",
"created_at": "2023-05-15T14:30:00Z",
"updated_at": "2023-05-15T14:30:00Z",
"slug": "intro-to-programming",
"plans": [
{
"id": "plan_123",
"name": "Basic Plan",
"description": "Access to all course materials for 3 months",
"currency": "TWD",
"amount": 5000,
"created_at": "2023-05-15T14:35:00Z",
"updated_at": "2023-05-15T14:35:00Z"
},
{
"id": "plan_456",
"name": "Premium Plan",
"description": "Lifetime access to course materials and weekly Q&A sessions",
"currency": "TWD",
"amount": 1900,
"created_at": "2023-05-15T14:36:00Z",
"updated_at": "2023-05-15T14:36:00Z"
}
]
}
}