> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidoc.dreamclass.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidoc.dreamclass.io/_mcp/server.

# Student

POST https://
Content-Type: application/json

Webhook related to student data, trigged upon

- Student created: STUDENT_CREATED
    
- Student updated: STUDENT_UPDATED
    
- Student deleted: STUDENT_DELETED
    

Using the provided id, use the GetStudent API to retrieve more data.

Reference: https://apidoc.dreamclass.io/dream-class-api/webhooks/student

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /:
    post:
      operationId: student
      summary: Student
      description: |-
        Webhook related to student data, trigged upon

        - Student created: STUDENT_CREATED
            
        - Student updated: STUDENT_UPDATED
            
        - Student deleted: STUDENT_DELETED
            

        Using the provided id, use the GetStudent API to retrieve more data.
      tags:
        - subpackage_webhooks
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhooks_Student_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                data:
                  $ref: >-
                    #/components/schemas/PostRequestBodyContentApplicationJsonSchemaData
                type:
                  type: string
                tenant:
                  type: string
                signature:
                  type: string
                timestamp:
                  type: integer
              required:
                - id
                - data
                - type
                - tenant
                - signature
                - timestamp
servers:
  - url: https:/
    description: https://{server}
  - url: https://your-webhook-url
    description: https://your-webhook-url
components:
  schemas:
    PostRequestBodyContentApplicationJsonSchemaData:
      type: object
      properties:
        id:
          type: integer
        email:
          type: string
          format: email
        mobile:
          type: string
        address:
          type: string
        lastname:
          type: string
        birthdate:
          type: string
          format: date
        firstname:
          type: string
        telephone:
          type: string
        birthplace:
          type: string
        middlename:
          description: Any type
      required:
        - id
        - email
        - mobile
        - address
        - lastname
        - birthdate
        - firstname
        - telephone
        - birthplace
      title: PostRequestBodyContentApplicationJsonSchemaData
    Webhooks_Student_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Webhooks_Student_Response_200

```

## Examples



**Request**

```json
{
  "id": "bb04e52e-3f2d-4f49-8d43-2d18c11d56b6",
  "data": {
    "id": 76,
    "email": "test@test.com",
    "mobile": "123456789",
    "address": "Roland 12, California",
    "lastname": "Connor",
    "birthdate": "2024-09-30",
    "firstname": "John",
    "telephone": "123456789",
    "birthplace": "California"
  },
  "type": "STUDENT_CREATED",
  "tenant": "my-school",
  "signature": "pkYxwEpEYu5vV9c8jNsJuA8Gc5sXuo8v7/7opYEucqU=",
  "timestamp": 1727862002327
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://https/"

payload = {
    "id": "bb04e52e-3f2d-4f49-8d43-2d18c11d56b6",
    "data": {
        "id": 76,
        "email": "test@test.com",
        "mobile": "123456789",
        "address": "Roland 12, California",
        "lastname": "Connor",
        "birthdate": "2024-09-30",
        "firstname": "John",
        "telephone": "123456789",
        "birthplace": "California"
    },
    "type": "STUDENT_CREATED",
    "tenant": "my-school",
    "signature": "pkYxwEpEYu5vV9c8jNsJuA8Gc5sXuo8v7/7opYEucqU=",
    "timestamp": 1727862002327
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://https/';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"id":"bb04e52e-3f2d-4f49-8d43-2d18c11d56b6","data":{"id":76,"email":"test@test.com","mobile":"123456789","address":"Roland 12, California","lastname":"Connor","birthdate":"2024-09-30","firstname":"John","telephone":"123456789","birthplace":"California"},"type":"STUDENT_CREATED","tenant":"my-school","signature":"pkYxwEpEYu5vV9c8jNsJuA8Gc5sXuo8v7/7opYEucqU=","timestamp":1727862002327}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://https/"

	payload := strings.NewReader("{\n  \"id\": \"bb04e52e-3f2d-4f49-8d43-2d18c11d56b6\",\n  \"data\": {\n    \"id\": 76,\n    \"email\": \"test@test.com\",\n    \"mobile\": \"123456789\",\n    \"address\": \"Roland 12, California\",\n    \"lastname\": \"Connor\",\n    \"birthdate\": \"2024-09-30\",\n    \"firstname\": \"John\",\n    \"telephone\": \"123456789\",\n    \"birthplace\": \"California\"\n  },\n  \"type\": \"STUDENT_CREATED\",\n  \"tenant\": \"my-school\",\n  \"signature\": \"pkYxwEpEYu5vV9c8jNsJuA8Gc5sXuo8v7/7opYEucqU=\",\n  \"timestamp\": 1727862002327\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://https/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"id\": \"bb04e52e-3f2d-4f49-8d43-2d18c11d56b6\",\n  \"data\": {\n    \"id\": 76,\n    \"email\": \"test@test.com\",\n    \"mobile\": \"123456789\",\n    \"address\": \"Roland 12, California\",\n    \"lastname\": \"Connor\",\n    \"birthdate\": \"2024-09-30\",\n    \"firstname\": \"John\",\n    \"telephone\": \"123456789\",\n    \"birthplace\": \"California\"\n  },\n  \"type\": \"STUDENT_CREATED\",\n  \"tenant\": \"my-school\",\n  \"signature\": \"pkYxwEpEYu5vV9c8jNsJuA8Gc5sXuo8v7/7opYEucqU=\",\n  \"timestamp\": 1727862002327\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/")
  .header("Content-Type", "application/json")
  .body("{\n  \"id\": \"bb04e52e-3f2d-4f49-8d43-2d18c11d56b6\",\n  \"data\": {\n    \"id\": 76,\n    \"email\": \"test@test.com\",\n    \"mobile\": \"123456789\",\n    \"address\": \"Roland 12, California\",\n    \"lastname\": \"Connor\",\n    \"birthdate\": \"2024-09-30\",\n    \"firstname\": \"John\",\n    \"telephone\": \"123456789\",\n    \"birthplace\": \"California\"\n  },\n  \"type\": \"STUDENT_CREATED\",\n  \"tenant\": \"my-school\",\n  \"signature\": \"pkYxwEpEYu5vV9c8jNsJuA8Gc5sXuo8v7/7opYEucqU=\",\n  \"timestamp\": 1727862002327\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/', [
  'body' => '{
  "id": "bb04e52e-3f2d-4f49-8d43-2d18c11d56b6",
  "data": {
    "id": 76,
    "email": "test@test.com",
    "mobile": "123456789",
    "address": "Roland 12, California",
    "lastname": "Connor",
    "birthdate": "2024-09-30",
    "firstname": "John",
    "telephone": "123456789",
    "birthplace": "California"
  },
  "type": "STUDENT_CREATED",
  "tenant": "my-school",
  "signature": "pkYxwEpEYu5vV9c8jNsJuA8Gc5sXuo8v7/7opYEucqU=",
  "timestamp": 1727862002327
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://https/");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"bb04e52e-3f2d-4f49-8d43-2d18c11d56b6\",\n  \"data\": {\n    \"id\": 76,\n    \"email\": \"test@test.com\",\n    \"mobile\": \"123456789\",\n    \"address\": \"Roland 12, California\",\n    \"lastname\": \"Connor\",\n    \"birthdate\": \"2024-09-30\",\n    \"firstname\": \"John\",\n    \"telephone\": \"123456789\",\n    \"birthplace\": \"California\"\n  },\n  \"type\": \"STUDENT_CREATED\",\n  \"tenant\": \"my-school\",\n  \"signature\": \"pkYxwEpEYu5vV9c8jNsJuA8Gc5sXuo8v7/7opYEucqU=\",\n  \"timestamp\": 1727862002327\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "id": "bb04e52e-3f2d-4f49-8d43-2d18c11d56b6",
  "data": [
    "id": 76,
    "email": "test@test.com",
    "mobile": "123456789",
    "address": "Roland 12, California",
    "lastname": "Connor",
    "birthdate": "2024-09-30",
    "firstname": "John",
    "telephone": "123456789",
    "birthplace": "California"
  ],
  "type": "STUDENT_CREATED",
  "tenant": "my-school",
  "signature": "pkYxwEpEYu5vV9c8jNsJuA8Gc5sXuo8v7/7opYEucqU=",
  "timestamp": 1727862002327
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://https/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```