---
title: "Course attempt closed"
method: POST
path: "course.attempt.closed"
tags: ["Course"]
---

# Course attempt closed

`POST course.attempt.closed` (webhook)

Sent to your endpoint when an attempt is closed. This event is currently triggered only when learners finish an attempt, materialized through the reason attribute. The reason attribute potential values are expected to grow over time as new closure reasons will be supported.

## Headers

- `webhook-signature` string, required
- `webhook-id` string, required
- `webhook-timestamp` string, required

## Payload

- object
  - `type` 'course.attempt.closed', required — The type of the event.
  - `timestamp` integer, required — The date and time when the event was triggered in your platform, in the Unix epoch format (number of milliseconds that have elapsed since January 1, 1970).
  - `data` AttemptClosedDTO, required
    - `attemptId` string, ObjectId, required — The unique ID of the attempt.
    - `closedAt` string, date-time, required — The date and time when the attempt was closed, in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
    - `userId` string, ObjectId, required — The unique ID of the user who closed the attempt.
    - `courseId` string, ObjectId, required — The unique ID of the course.
    - `reason` 'learnerFinished', required — The reason for closing the attempt.
    - `context` AttemptClosedContextDTO, required
      - `pathId` string, ObjectId — The unique ID of the path if the course is played in the path context.
      - `pathSessionId` string, ObjectId — The unique ID of the path session if the course is played in the path context.

## Acknowledgement `2XX`

The event is considered as accepted for any 2xx response code.

## Other responses

- `default` — The event is considered as rejected for any other response code. The event emission will be retried later.

---

[API](https://skmtc.dev/360learning/apis/webhook-api.md) · [All operations](https://skmtc.dev/360learning/apis/webhook-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/360learning/webhook-api/revisions/18374878903d/schema)
