> ## Documentation Index
> Fetch the complete documentation index at: https://docs.schoolmaker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Payloads

Webhooks allow you to receive real-time HTTP notifications when specific events occur in your SchoolMaker instance. When an event is triggered, we'll send a POST request to your configured webhook URL with a JSON payload containing event details.

## Request Format

All webhook notifications are sent as POST requests with the following characteristics:

* Content-Type: `application/json`
* Request body: JSON object containing event data
* Webhook URL: The endpoint URL you configured to receive notifications

> [!WARNING]
>
> Make sure your webhook endpoint can handle POST requests and process JSON payloads.

> [!WARNING]
>
> The Webhook pages are still being worked on, naming is not definitive.

## Available Trigger Events

### Step Pending

**Event Name:** `element_pending` \\

**Description:** Triggers when a member submits an answer that needs to be corrected.

**Optional Step Type Filter:** Use `extra_parameters.step_type` to filter by `input_text`, `textarea`, `post`, `topic`, `milestone`, or `file_upload`. Leave empty to include all applicable step types.

**Payload Example:**

```json theme={null}
{
  "id": "string",
  "user_type": "string",
  "email": "string",
  "full_name": "string",
  "program_name": "string",
  "program_completion_percentage": 0,
  "section_name": "string",
  "section_completion_percentage": 0,
  "lesson_name": "string", 
  "lesson_completion_percentage": 0,
  "step_name": "string",
  "step_completion_date": "string",
  "see_in_schoolmaker": "string",
  "status": "string",
  "step_id": "string",
  "step_type": "string",
  "reviewer_id": "string",
  "step_is_optional": "string",
  "answer": "string",
  "quiz_completion_rate": "string",
  "quiz_data": [
    {
      "question": "string",
      "member_answer": "string", 
      "result": "string"
    }
  ],
  "form_data": [
    {
      "question": "string",
      "answer": "string"
    }
  ],
  "comment_text": "string",
  "comment_link": "string",
  "post_link": "string",
  "step_file_upload_url": "string",
  "milestone_proof_url": "string"
}
```

### Step Completion

**Event Name:** `element_completed` \\

**Description:** Triggered when a member completes an element (step, lesson, section, etc.) in a course.

**Optional Step Type Filter:** Use `extra_parameters.step_type` to filter by `basic`, `input_text`, `textarea`, `link`, `quiz`, `post`, `topic`, `milestone`, `file_upload`, or `form`. Leave empty to include all step types.

**Payload Example:**

```json theme={null}
{
  "id": "string",
  "user_type": "string",
  "email": "string",
  "full_name": "string",
  "program_name": "string",
  "program_completion_percentage": 0,
  "section_name": "string",
  "section_completion_percentage": 0,
  "lesson_name": "string", 
  "lesson_completion_percentage": 0,
  "step_name": "string",
  "step_completion_date": "string",
  "see_in_schoolmaker": "string",
  "status": "string",
  "step_id": "string",
  "step_type": "string",
  "reviewer_id": "string",
  "step_is_optional": "string",
  "answer": "string",
  "quiz_completion_rate": "string",
  "quiz_data": [
    {
      "question": "string",
      "member_answer": "string", 
      "result": "string"
    }
  ],
  "form_data": [
    {
      "question": "string",
      "answer": "string"
    }
  ],
  "comment_text": "string",
  "comment_link": "string",
  "post_link": "string",
  "step_file_upload_url": "string",
  "milestone_proof_url": "string"
}
```

### New Member Offer Access

**Event Name:** `member_joining_offer` \\

**Description:** Triggered when a new or existing member gets access to an offer.

**Payload Example:**

```json theme={null}
{
  "email_member": "string",
  "offer_name": "string",
  "offer_id": "string"
}
```

### New Payment

**Event Name:** `new_payment` \\

**Description:** Triggered when a successful payment is processed for an offer, and also triggered for each installment or subscription payment.

**Payload Example:**

```json theme={null}
{
  "email_member": "string",
  "first_name_member": "string",
  "last_name_member": "string",
  "offer_name": "string",
  "offer_id": "string",
  "transaction_creation_date": "string",
  "transaction_status": "string",
  "price": 0,
  "currency": "string",
  "price_type": "one-time | recurring | multiple-installments"
} 
```

### Member Inactivity

**Event Name:** `member_inactivity` \\

**Description:** Triggered when a member is detected as inactive, coinciding with the SchoolMaker inactivity notification.

**Payload Example:**

```json theme={null}
{
  "email_member": "string",
  "first_name_member": "string",
  "last_name_member": "string",
  "offers": [
    {
      "offer_id": "string",
      "offer_name": "string"
    }
  ],
  "programs": [
    {
      "id": "string",
      "name": "string",
      "program_completion_percentage": 0
    }
  ]
}
```

### Gamification Level Passed

**Event Name:** `gamification_level_passed` \\

**Description:** Triggered when a member reaches a new level in the community gamification feature.

**Payload Example:**

```json theme={null}
{
  "email_member": "string",
  "first_name_member": "string",
  "last_name_member": "string",
  "level_unlocked": 0
}
```

### Conversation Message Received

**Event Name:** `conversation_message_received` \\

**Description:** Triggered when a User receives a new message in a conversation group.

The `related_step` field is `null` when the conversation is not associated with a program step. The `participants_preview` field contains up to ten participants, and `recent_messages_preview` contains up to three messages sent before the current message. For system-generated messages, `author_type` and `author_name` may be `null`.

The `message.attachments` array contains each attached file's `filename`, `content_type`, `byte_size`, `url` and `url_expires_at`. The URLs work without a SchoolMaker login and are generated with a six-day lifetime. Keep these private links secure. Messages without files and deleted messages have an empty attachment array. Attachments belong to the current message, not `recent_messages_preview`.

To retrieve this message with fresh attachment URLs, use [Get a Conversation Message](https://docs.schoolmaker.com/api-reference/endpoints/conversations/messages/get.md) with `message.id` and a `user_id` from `received_by_users`. The selected User must still participate in the conversation, and the authenticated school and owner must be active. Reading does not join the conversation or mark messages as read. Deleted messages return no attachments. Links issued before deletion remain usable until expiration.

**Payload Example:**

```json theme={null}
{
  "event_type": "conversation_message_received",
  "message": {
    "id": "string",
    "content": "string",
    "created_at": "string",
    "author": {
      "id": "string",
      "type": "Member | User",
      "name": "string",
      "email": "string"
    },
    "attachments": [
      {
        "filename": "answer.png",
        "content_type": "image/png",
        "byte_size": 12034,
        "url": "https://example.com/files/answer.png?signature=example",
        "url_expires_at": "2026-10-11T09:00:00Z"
      }
    ]
  },
  "received_by_users": [
    {
      "id": "string",
      "type": "User",
      "name": "string",
      "email": "string"
    }
  ],
  "conversation_group": {
    "id": "string",
    "title": "string",
    "participants_count": 0,
    "participants_preview": [
      {
        "id": "string",
        "type": "Member | User",
        "name": "string"
      }
    ],
    "created_at": "string",
    "last_activity_at": "string"
  },
  "related_step": {
    "step_progress_id": "string",
    "step_id": "string",
    "step_name": "string",
    "lesson_id": "string",
    "lesson_name": "string",
    "section_id": "string",
    "section_name": "string",
    "program_id": "string",
    "program_name": "string"
  },
  "recent_messages_preview": [
    {
      "id": "string",
      "author_type": "Member | User",
      "author_name": "string",
      "content": "string",
      "created_at": "string"
    }
  ],
  "url": "string"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.