> ## 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>

<Warning>
  The Webhook pages are still being worked on, naming is not definitive.
</Warning>

## Available Trigger Events

### Step Pending

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

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

**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.

**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
}
```
