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

# CreateProfessor

POST https://dreamclassapi/v1/professors/create
Content-Type: application/json

Create a new professor (teacher) record for your school.

gender/city/country are matched by name to your school's configured values.

Reference: https://apidoc.dreamclass.io/dream-class-api/professors/create-professor

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /dreamclassapi/v1/professors/create:
    post:
      operationId: create-professor
      summary: CreateProfessor
      description: >-
        Create a new professor (teacher) record for your school.


        gender/city/country are matched by name to your school's configured
        values.
      tags:
        - professors
      parameters:
        - name: tenant
          in: header
          required: false
          schema:
            type: string
        - name: schoolCode
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Professors_CreateProfessor_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                firstname:
                  type: string
                lastname:
                  type: string
                email:
                  type: string
                  format: email
                mobile:
                  type: string
                gender:
                  type: string
                city:
                  type: string
                country:
                  type: string
                afm:
                  type: string
              required:
                - firstname
                - lastname
                - email
                - mobile
                - gender
                - city
                - country
                - afm
servers:
  - url: https:/
    description: https://{server}
  - url: https://your-webhook-url
    description: https://your-webhook-url
components:
  schemas:
    Professors_CreateProfessor_Response_200:
      type: object
      properties:
        id:
          type: integer
        email:
          type: string
          format: email
        firstname:
          type: string
        lastname:
          type: string
        middlename:
          description: Any type
        mobile:
          type: string
        telephone:
          description: Any type
        address:
          description: Any type
        gender:
          type: string
        country:
          type: string
        city:
          type: string
        birthdate:
          description: Any type
        birthplace:
          description: Any type
        afm:
          type: string
        amka:
          description: Any type
        doy:
          description: Any type
        comments:
          description: Any type
        expertises:
          type: array
          items:
            description: Any type
      required:
        - id
        - email
        - firstname
        - lastname
        - mobile
        - gender
        - country
        - city
        - afm
        - expertises
      title: Professors_CreateProfessor_Response_200

```

## Examples



**Request**

```json
{
  "firstname": "Jane",
  "lastname": "Doe",
  "email": "jane.doe@example.com",
  "mobile": "+302101234567",
  "gender": "Female",
  "city": "Athens",
  "country": "Greece",
  "afm": "123456789"
}
```

**Response**

```json
{
  "id": 12,
  "email": "jane.doe@example.com",
  "firstname": "Jane",
  "lastname": "Doe",
  "mobile": "+302101234567",
  "gender": "Female",
  "country": "Greece",
  "city": "Athens",
  "afm": "123456789",
  "expertises": []
}
```

**SDK Code**

```python Professors_CreateProfessor_example
import requests

url = "https://https/dreamclassapi/v1/professors/create"

payload = {
    "firstname": "Jane",
    "lastname": "Doe",
    "email": "jane.doe@example.com",
    "mobile": "+302101234567",
    "gender": "Female",
    "city": "Athens",
    "country": "Greece",
    "afm": "123456789"
}
headers = {
    "tenant": "{{tenant}}",
    "schoolCode": "{{schoolCode}}",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Professors_CreateProfessor_example
const url = 'https://https/dreamclassapi/v1/professors/create';
const options = {
  method: 'POST',
  headers: {
    tenant: '{{tenant}}',
    schoolCode: '{{schoolCode}}',
    'Content-Type': 'application/json'
  },
  body: '{"firstname":"Jane","lastname":"Doe","email":"jane.doe@example.com","mobile":"+302101234567","gender":"Female","city":"Athens","country":"Greece","afm":"123456789"}'
};

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

```go Professors_CreateProfessor_example
package main

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

func main() {

	url := "https://https/dreamclassapi/v1/professors/create"

	payload := strings.NewReader("{\n  \"firstname\": \"Jane\",\n  \"lastname\": \"Doe\",\n  \"email\": \"jane.doe@example.com\",\n  \"mobile\": \"+302101234567\",\n  \"gender\": \"Female\",\n  \"city\": \"Athens\",\n  \"country\": \"Greece\",\n  \"afm\": \"123456789\"\n}")

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

	req.Header.Add("tenant", "{{tenant}}")
	req.Header.Add("schoolCode", "{{schoolCode}}")
	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 Professors_CreateProfessor_example
require 'uri'
require 'net/http'

url = URI("https://https/dreamclassapi/v1/professors/create")

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

request = Net::HTTP::Post.new(url)
request["tenant"] = '{{tenant}}'
request["schoolCode"] = '{{schoolCode}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"firstname\": \"Jane\",\n  \"lastname\": \"Doe\",\n  \"email\": \"jane.doe@example.com\",\n  \"mobile\": \"+302101234567\",\n  \"gender\": \"Female\",\n  \"city\": \"Athens\",\n  \"country\": \"Greece\",\n  \"afm\": \"123456789\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://https/dreamclassapi/v1/professors/create")
  .header("tenant", "{{tenant}}")
  .header("schoolCode", "{{schoolCode}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"firstname\": \"Jane\",\n  \"lastname\": \"Doe\",\n  \"email\": \"jane.doe@example.com\",\n  \"mobile\": \"+302101234567\",\n  \"gender\": \"Female\",\n  \"city\": \"Athens\",\n  \"country\": \"Greece\",\n  \"afm\": \"123456789\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/dreamclassapi/v1/professors/create', [
  'body' => '{
  "firstname": "Jane",
  "lastname": "Doe",
  "email": "jane.doe@example.com",
  "mobile": "+302101234567",
  "gender": "Female",
  "city": "Athens",
  "country": "Greece",
  "afm": "123456789"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'schoolCode' => '{{schoolCode}}',
    'tenant' => '{{tenant}}',
  ],
]);

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

```csharp Professors_CreateProfessor_example
using RestSharp;

var client = new RestClient("https://https/dreamclassapi/v1/professors/create");
var request = new RestRequest(Method.POST);
request.AddHeader("tenant", "{{tenant}}");
request.AddHeader("schoolCode", "{{schoolCode}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"firstname\": \"Jane\",\n  \"lastname\": \"Doe\",\n  \"email\": \"jane.doe@example.com\",\n  \"mobile\": \"+302101234567\",\n  \"gender\": \"Female\",\n  \"city\": \"Athens\",\n  \"country\": \"Greece\",\n  \"afm\": \"123456789\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Professors_CreateProfessor_example
import Foundation

let headers = [
  "tenant": "{{tenant}}",
  "schoolCode": "{{schoolCode}}",
  "Content-Type": "application/json"
]
let parameters = [
  "firstname": "Jane",
  "lastname": "Doe",
  "email": "jane.doe@example.com",
  "mobile": "+302101234567",
  "gender": "Female",
  "city": "Athens",
  "country": "Greece",
  "afm": "123456789"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://https/dreamclassapi/v1/professors/create")! 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()
```