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

# Submit answers

POST https://test.api.kota.io/requirements/{requirement_id}
Content-Type: application/json

Submit answers for a requirement. Answers are merged with any previously submitted and re-evaluated against the requirement's schema: it becomes `fulfilled` once all required fields are satisfied, otherwise it stays `in_progress` and the response lists the fields still outstanding.

Reference: https://docs.kota.io/api-reference/requirements/submit-answers

## Servers

- `https://test.api.kota.io` (test, default)
- `https://api.kota.io` (production)

## Request

### Path parameters

- `requirement_id` (string, required) — A requirement identifier in the format ar_ followed by 32 lowercase hex characters (e.g. ar_0a1b2c3d4e5f67890a1b2c3d4e5f6789).

### Headers

- `Authorization` (string, required) — Authorization header using the Bearer scheme

### Body (application/json)

This endpoint expects an object.

- `answers` (RequirementsRequirementIdPostRequestBodyContentApplicationJsonSchemaAnswers, required) — A key-value map of field IDs to answer values.

## Response

### 200

OK

- `status` (enum, required) — The derived submission status. "fulfilled" once the cumulative answers satisfy the whole schema; "in_progress" when answers are stored but the schema is not yet complete; "pending" when no answers are stored.
  - Allowed values: `pending`, `in_progress`, `fulfilled`
- `schema` (RequirementsRequirementIdPostResponsesContentApplicationJsonSchemaSchema, required) — The requirement schema with the current cumulative answers injected as field defaults, so the client can render the next step (or confirm completion) without a follow-up GET.
- `outstanding_fields` (list of string, optional) — Field IDs still blocking fulfillment. Present only for an "in_progress" submission.

## Errors

### 400 Bad Request Error

Invalid request

- `type` (string, required) — A URI reference identifying the problem type (RFC 9110 section URL).
- `title` (string, required) — A short human-readable summary.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — A human-readable explanation of the validation failure.
- `error_code` (string, required) — Stable machine-readable error code. Use this for branching; detail is informational only.
- `trace_id` (string, required) — Trace identifier for correlating the error with server-side logs.
- `errors` (list of RequirementsRequirementIdPostResponsesContentApplicationProblemJsonSchemaErrorsItems, optional) — Per-field validation errors. Present when error_code is invalid_request and the failure is a field-level validation error (AnswerValidationFailedError).
- `unknown_fields` (list of string, optional) — Submitted field IDs not present in the resolved schema. Present when error_code is invalid_request and the failure is UnknownFieldsError.

### 401 Unauthorized Error

Unauthorized

- `type` (string, required) — A URI reference identifying the problem type (RFC 9110 section URL).
- `title` (string, required) — A short human-readable summary of the problem type.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — The authentication token is invalid or missing.
- `error_code` (string, required) — Stable machine-readable error code. Use this for branching; detail is informational only.
- `trace_id` (string, required) — Trace identifier for correlating the error with server-side logs.

### 404 Not Found Error

Resource not found

- `type` (string, required) — A URI reference identifying the problem type (RFC 9110 section URL).
- `title` (string, required) — A short human-readable summary of the problem type.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — The requirement was not found.
- `error_code` (string, required) — Stable machine-readable error code. Use this for branching; detail is informational only.
- `trace_id` (string, required) — Trace identifier for correlating the error with server-side logs.

### 409 Conflict Error

Conflict

- `type` (string, required) — A URI reference identifying the problem type (RFC 9110 section URL).
- `title` (string, required) — A short human-readable summary of the problem type.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — The requirement has already been fulfilled.
- `error_code` (string, required) — Stable machine-readable error code. Use this for branching; detail is informational only.
- `trace_id` (string, required) — Trace identifier for correlating the error with server-side logs.

### 500 Internal Server Error

An error occurred while processing your request

- `type` (string, required) — A URI reference identifying the problem type (RFC 9110 section URL).
- `title` (string, required) — A short human-readable summary of the problem type.
- `status` (integer, required) — The HTTP status code.
- `detail` (string, required) — An internal error occurred.
- `error_code` (string, required) — Stable machine-readable error code. Use this for branching; detail is informational only.
- `trace_id` (string, required) — Trace identifier for correlating the error with server-side logs.

## Types

### RequirementsRequirementIdPostRequestBodyContentApplicationJsonSchemaAnswers

A key-value map of field IDs to answer values.

### RequirementsRequirementIdPostResponsesContentApplicationJsonSchemaSchema

The requirement schema with the current cumulative answers injected as field defaults, so the client can render the next step (or confirm completion) without a follow-up GET.

### RequirementsRequirementIdPostResponsesContentApplicationProblemJsonSchemaErrorsItems

- `field_id` (string, required) — The field that failed validation.
- `error_type` (string, required) — The type of validation error.
- `message` (string, required) — A human-readable error message.

## Examples

**Request**

```json
{
  "answers": {
    "cpr_number": null,
    "mobile_number": null
  }
}
```

**Response**

```json
{
  "status": "fulfilled",
  "schema": {
    "benefit_type": "health",
    "context": "enrolment_intent",
    "datasets": [],
    "fields": [
      {
        "default": "010180-1234",
        "id": "cpr_number",
        "label": {
          "default": "CPR number"
        },
        "placeholder": "e.g. 010180-1234",
        "type": "text",
        "validation": {
          "required": true,
          "rules": [
            {
              "message": "CPR number must be exactly 10 digits (format: DDMMYY-SSSS)",
              "rule": {
                "match": [
                  {
                    "var": "cpr_number"
                  },
                  "^\\d{6}-\\d{4}$"
                ]
              }
            }
          ]
        }
      },
      {
        "default": "+4520123456",
        "id": "mobile_number",
        "label": {
          "default": "Mobile phone number"
        },
        "type": "phone",
        "validation": {
          "required": true,
          "rules": [
            {
              "message": "Please enter a valid mobile phone number",
              "rule": {
                "phone_valid": [
                  {
                    "var": "mobile_number"
                  },
                  "DK"
                ]
              }
            }
          ]
        }
      }
    ],
    "flow": {
      "mode": "auto",
      "navigation": {
        "start": "employee_information"
      },
      "steps": [
        {
          "fields": [
            "cpr_number",
            "mobile_number"
          ],
          "id": "employee_information",
          "title": {
            "default": "Employee information"
          }
        }
      ]
    },
    "id": "enrolment_in_dansksundhedssikring",
    "object_type": "employee",
    "title": {
      "default": "Employee information required"
    },
    "version": 1
  }
}
```

**SDK Code**

```python Requirements_submit-answers_example
import requests

url = "https://test.api.kota.io/requirements/requirement_id"

payload = { "answers": {
        "cpr_number": None,
        "mobile_number": None
    } }
headers = {
    "Authorization": "Authorization",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Requirements_submit-answers_example
const url = 'https://test.api.kota.io/requirements/requirement_id';
const options = {
  method: 'POST',
  headers: {Authorization: 'Authorization', 'Content-Type': 'application/json'},
  body: '{"answers":{"cpr_number":null,"mobile_number":null}}'
};

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

```go Requirements_submit-answers_example
package main

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

func main() {

	url := "https://test.api.kota.io/requirements/requirement_id"

	payload := strings.NewReader("{\n  \"answers\": {\n    \"cpr_number\": null,\n    \"mobile_number\": null\n  }\n}")

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

	req.Header.Add("Authorization", "Authorization")
	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 Requirements_submit-answers_example
require 'uri'
require 'net/http'

url = URI("https://test.api.kota.io/requirements/requirement_id")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Authorization'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"answers\": {\n    \"cpr_number\": null,\n    \"mobile_number\": null\n  }\n}"

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

```java Requirements_submit-answers_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://test.api.kota.io/requirements/requirement_id")
  .header("Authorization", "Authorization")
  .header("Content-Type", "application/json")
  .body("{\n  \"answers\": {\n    \"cpr_number\": null,\n    \"mobile_number\": null\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://test.api.kota.io/requirements/requirement_id', [
  'body' => '{
  "answers": {
    "cpr_number": null,
    "mobile_number": null
  }
}',
  'headers' => [
    'Authorization' => 'Authorization',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Requirements_submit-answers_example
using RestSharp;

var client = new RestClient("https://test.api.kota.io/requirements/requirement_id");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Authorization");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"answers\": {\n    \"cpr_number\": null,\n    \"mobile_number\": null\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Requirements_submit-answers_example
import Foundation

let headers = [
  "Authorization": "Authorization",
  "Content-Type": "application/json"
]
let parameters = ["answers": [
    "cpr_number": ,
    "mobile_number": 
  ]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://test.api.kota.io/requirements/requirement_id")! 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()
```