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

# SubmitToAdmissionForm

POST https://dreamclassapi/v1/admission/forms/%7BformCode%7D/submit
Content-Type: application/json

Submits application to an admission form

Input Variables

- formCode: String code of admission form (path variable
- json represenation of a Submission Object with the following fields
    - email
    - array of guardians
        - for each guardian an array of fields
    - array o students
        - for each student an array of fileds and an array of courses | classes | levels (depending on the form type)

Reference: https://apidoc.dreamclass.io/dream-class-api/admissions/submit-to-admission-form

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /dreamclassapi/v1/admission/forms/%7BformCode%7D/submit:
    post:
      operationId: submit-to-admission-form
      summary: SubmitToAdmissionForm
      description: |-
        Submits application to an admission form

        Input Variables

        - formCode: String code of admission form (path variable
        - json represenation of a Submission Object with the following fields
            - email
            - array of guardians
                - for each guardian an array of fields
            - array o students
                - for each student an array of fileds and an array of courses | classes | levels (depending on the form type)
      tags:
        - subpackage_admissions
      parameters:
        - name: tenant
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties: {}
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                students:
                  type: array
                  items:
                    $ref: >-
                      #/components/schemas/DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaStudentsItems
                createdAt:
                  type: string
                  format: date
                guardians:
                  type: array
                  items:
                    $ref: >-
                      #/components/schemas/DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaGuardiansItems
              required:
                - email
                - students
                - createdAt
                - guardians
servers:
  - url: https:/
    description: https://{server}
  - url: https://your-webhook-url
    description: https://your-webhook-url
components:
  schemas:
    DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaStudentsItemsFieldsItems:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
      required:
        - name
        - value
      title: >-
        DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaStudentsItemsFieldsItems
    DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaStudentsItemsCoursesItems:
      type: object
      properties:
        id:
          type: string
      required:
        - id
      title: >-
        DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaStudentsItemsCoursesItems
    DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaStudentsItems:
      type: object
      properties:
        fields:
          type: array
          items:
            $ref: >-
              #/components/schemas/DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaStudentsItemsFieldsItems
        courses:
          type: array
          items:
            $ref: >-
              #/components/schemas/DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaStudentsItemsCoursesItems
      required:
        - fields
        - courses
      title: >-
        DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaStudentsItems
    DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaGuardiansItemsFieldsItems:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
      required:
        - name
        - value
      title: >-
        DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaGuardiansItemsFieldsItems
    DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaGuardiansItems:
      type: object
      properties:
        fields:
          type: array
          items:
            $ref: >-
              #/components/schemas/DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaGuardiansItemsFieldsItems
      required:
        - fields
      title: >-
        DreamclassapiV1AdmissionForms7BformCode7DSubmitPostRequestBodyContentApplicationJsonSchemaGuardiansItems

```

## Examples



**Request**

```json
{
  "email": "email1@email.com",
  "students": [
    {
      "fields": [
        {
          "name": "firstname",
          "value": "sfirstname"
        },
        {
          "name": "lastname",
          "value": "slastname"
        },
        {
          "name": "gender",
          "value": "1"
        },
        {
          "name": "186",
          "value": "888"
        }
      ],
      "courses": [
        {
          "id": "10"
        }
      ]
    }
  ],
  "createdAt": "2021-12-31",
  "guardians": [
    {
      "fields": [
        {
          "name": "firstname",
          "value": "gfirstname"
        },
        {
          "name": "lastname",
          "value": "glastname"
        },
        {
          "name": "email",
          "value": "email@email.com"
        },
        {
          "name": "relation",
          "value": "1"
        }
      ]
    }
  ]
}
```

**Response**

```json
"ABCDEF"
```

**SDK Code**

```python Admissions_SubmitToAdmissionForm_example
import requests

url = "https://https/dreamclassapi/v1/admission/forms/%7BformCode%7D/submit"

payload = {
    "email": "email1@email.com",
    "students": [
        {
            "fields": [
                {
                    "name": "firstname",
                    "value": "sfirstname"
                },
                {
                    "name": "lastname",
                    "value": "slastname"
                },
                {
                    "name": "gender",
                    "value": "1"
                },
                {
                    "name": "186",
                    "value": "888"
                }
            ],
            "courses": [{ "id": "10" }]
        }
    ],
    "createdAt": "2021-12-31",
    "guardians": [{ "fields": [
                {
                    "name": "firstname",
                    "value": "gfirstname"
                },
                {
                    "name": "lastname",
                    "value": "glastname"
                },
                {
                    "name": "email",
                    "value": "email@email.com"
                },
                {
                    "name": "relation",
                    "value": "1"
                }
            ] }]
}
headers = {
    "tenant": "{{tenant}}",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Admissions_SubmitToAdmissionForm_example
const url = 'https://https/dreamclassapi/v1/admission/forms/%7BformCode%7D/submit';
const options = {
  method: 'POST',
  headers: {tenant: '{{tenant}}', 'Content-Type': 'application/json'},
  body: '{"email":"email1@email.com","students":[{"fields":[{"name":"firstname","value":"sfirstname"},{"name":"lastname","value":"slastname"},{"name":"gender","value":"1"},{"name":"186","value":"888"}],"courses":[{"id":"10"}]}],"createdAt":"2021-12-31","guardians":[{"fields":[{"name":"firstname","value":"gfirstname"},{"name":"lastname","value":"glastname"},{"name":"email","value":"email@email.com"},{"name":"relation","value":"1"}]}]}'
};

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

```go Admissions_SubmitToAdmissionForm_example
package main

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

func main() {

	url := "https://https/dreamclassapi/v1/admission/forms/%7BformCode%7D/submit"

	payload := strings.NewReader("{\n  \"email\": \"email1@email.com\",\n  \"students\": [\n    {\n      \"fields\": [\n        {\n          \"name\": \"firstname\",\n          \"value\": \"sfirstname\"\n        },\n        {\n          \"name\": \"lastname\",\n          \"value\": \"slastname\"\n        },\n        {\n          \"name\": \"gender\",\n          \"value\": \"1\"\n        },\n        {\n          \"name\": \"186\",\n          \"value\": \"888\"\n        }\n      ],\n      \"courses\": [\n        {\n          \"id\": \"10\"\n        }\n      ]\n    }\n  ],\n  \"createdAt\": \"2021-12-31\",\n  \"guardians\": [\n    {\n      \"fields\": [\n        {\n          \"name\": \"firstname\",\n          \"value\": \"gfirstname\"\n        },\n        {\n          \"name\": \"lastname\",\n          \"value\": \"glastname\"\n        },\n        {\n          \"name\": \"email\",\n          \"value\": \"email@email.com\"\n        },\n        {\n          \"name\": \"relation\",\n          \"value\": \"1\"\n        }\n      ]\n    }\n  ]\n}")

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

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

url = URI("https://https/dreamclassapi/v1/admission/forms/%7BformCode%7D/submit")

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

request = Net::HTTP::Post.new(url)
request["tenant"] = '{{tenant}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"email\": \"email1@email.com\",\n  \"students\": [\n    {\n      \"fields\": [\n        {\n          \"name\": \"firstname\",\n          \"value\": \"sfirstname\"\n        },\n        {\n          \"name\": \"lastname\",\n          \"value\": \"slastname\"\n        },\n        {\n          \"name\": \"gender\",\n          \"value\": \"1\"\n        },\n        {\n          \"name\": \"186\",\n          \"value\": \"888\"\n        }\n      ],\n      \"courses\": [\n        {\n          \"id\": \"10\"\n        }\n      ]\n    }\n  ],\n  \"createdAt\": \"2021-12-31\",\n  \"guardians\": [\n    {\n      \"fields\": [\n        {\n          \"name\": \"firstname\",\n          \"value\": \"gfirstname\"\n        },\n        {\n          \"name\": \"lastname\",\n          \"value\": \"glastname\"\n        },\n        {\n          \"name\": \"email\",\n          \"value\": \"email@email.com\"\n        },\n        {\n          \"name\": \"relation\",\n          \"value\": \"1\"\n        }\n      ]\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://https/dreamclassapi/v1/admission/forms/%7BformCode%7D/submit")
  .header("tenant", "{{tenant}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"email\": \"email1@email.com\",\n  \"students\": [\n    {\n      \"fields\": [\n        {\n          \"name\": \"firstname\",\n          \"value\": \"sfirstname\"\n        },\n        {\n          \"name\": \"lastname\",\n          \"value\": \"slastname\"\n        },\n        {\n          \"name\": \"gender\",\n          \"value\": \"1\"\n        },\n        {\n          \"name\": \"186\",\n          \"value\": \"888\"\n        }\n      ],\n      \"courses\": [\n        {\n          \"id\": \"10\"\n        }\n      ]\n    }\n  ],\n  \"createdAt\": \"2021-12-31\",\n  \"guardians\": [\n    {\n      \"fields\": [\n        {\n          \"name\": \"firstname\",\n          \"value\": \"gfirstname\"\n        },\n        {\n          \"name\": \"lastname\",\n          \"value\": \"glastname\"\n        },\n        {\n          \"name\": \"email\",\n          \"value\": \"email@email.com\"\n        },\n        {\n          \"name\": \"relation\",\n          \"value\": \"1\"\n        }\n      ]\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/dreamclassapi/v1/admission/forms/%7BformCode%7D/submit', [
  'body' => '{
  "email": "email1@email.com",
  "students": [
    {
      "fields": [
        {
          "name": "firstname",
          "value": "sfirstname"
        },
        {
          "name": "lastname",
          "value": "slastname"
        },
        {
          "name": "gender",
          "value": "1"
        },
        {
          "name": "186",
          "value": "888"
        }
      ],
      "courses": [
        {
          "id": "10"
        }
      ]
    }
  ],
  "createdAt": "2021-12-31",
  "guardians": [
    {
      "fields": [
        {
          "name": "firstname",
          "value": "gfirstname"
        },
        {
          "name": "lastname",
          "value": "glastname"
        },
        {
          "name": "email",
          "value": "email@email.com"
        },
        {
          "name": "relation",
          "value": "1"
        }
      ]
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'tenant' => '{{tenant}}',
  ],
]);

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

```csharp Admissions_SubmitToAdmissionForm_example
using RestSharp;

var client = new RestClient("https://https/dreamclassapi/v1/admission/forms/%7BformCode%7D/submit");
var request = new RestRequest(Method.POST);
request.AddHeader("tenant", "{{tenant}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"email\": \"email1@email.com\",\n  \"students\": [\n    {\n      \"fields\": [\n        {\n          \"name\": \"firstname\",\n          \"value\": \"sfirstname\"\n        },\n        {\n          \"name\": \"lastname\",\n          \"value\": \"slastname\"\n        },\n        {\n          \"name\": \"gender\",\n          \"value\": \"1\"\n        },\n        {\n          \"name\": \"186\",\n          \"value\": \"888\"\n        }\n      ],\n      \"courses\": [\n        {\n          \"id\": \"10\"\n        }\n      ]\n    }\n  ],\n  \"createdAt\": \"2021-12-31\",\n  \"guardians\": [\n    {\n      \"fields\": [\n        {\n          \"name\": \"firstname\",\n          \"value\": \"gfirstname\"\n        },\n        {\n          \"name\": \"lastname\",\n          \"value\": \"glastname\"\n        },\n        {\n          \"name\": \"email\",\n          \"value\": \"email@email.com\"\n        },\n        {\n          \"name\": \"relation\",\n          \"value\": \"1\"\n        }\n      ]\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Admissions_SubmitToAdmissionForm_example
import Foundation

let headers = [
  "tenant": "{{tenant}}",
  "Content-Type": "application/json"
]
let parameters = [
  "email": "email1@email.com",
  "students": [
    [
      "fields": [
        [
          "name": "firstname",
          "value": "sfirstname"
        ],
        [
          "name": "lastname",
          "value": "slastname"
        ],
        [
          "name": "gender",
          "value": "1"
        ],
        [
          "name": "186",
          "value": "888"
        ]
      ],
      "courses": [["id": "10"]]
    ]
  ],
  "createdAt": "2021-12-31",
  "guardians": [["fields": [
        [
          "name": "firstname",
          "value": "gfirstname"
        ],
        [
          "name": "lastname",
          "value": "glastname"
        ],
        [
          "name": "email",
          "value": "email@email.com"
        ],
        [
          "name": "relation",
          "value": "1"
        ]
      ]]]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://https/dreamclassapi/v1/admission/forms/%7BformCode%7D/submit")! 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()
```