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

# Save carrier-question responses

PUT https://api.vitablehealth.com/v1/enrollments/{enrollment_id}/carrier-question-responses
Content-Type: application/json

Replaces the saved carrier-question responses for the selected enrollment plan.

Reference: https://developer.vitablehealth.com/api/enrollments/save-carrier-question-responses

## Authentication

- `Authorization` header (bearer token, required) — API Key or Access Token authentication using Bearer token in Authorization header. API keys use the vit_apk_ prefix, access tokens use the vit_at_ prefix.

## Servers

- `https://api.vitablehealth.com` (Production, default)
- `https://api.uat.vitablehealth.com` (UAT)

## Request

### Path parameters

- `enrollment_id` (string, required) — Unique enrollment identifier (enrl_*)

### Headers

- `X-Vitable-Organization` (string, optional) — Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`.

### Body (application/json)

This endpoint expects a SaveCarrierQuestionResponsesRequest.

- `expected_revision` (integer, required)
- `responses` (list of CarrierQuestionAnswerRequest, required)

## Response

### 200

- `data` (CarrierQuestionResponses, required)

## Errors

### 400 Bad Request Error

Bad Request - Invalid input or validation error

- `timestamp` (datetime, required) — ISO 8601 timestamp when the error occurred
- `message` (string, required) — Human-readable error message
- `error` (string, required) — Error message (same as message, for backwards compatibility)
- `trace_id` (string, required) — Unique trace ID for debugging and support requests
- `app_error_code` (string, optional, nullable) — Application-specific error code for programmatic handling

### 401 Unauthorized Error

Unauthorized - Invalid or missing API key

- `timestamp` (datetime, required) — ISO 8601 timestamp when the error occurred
- `message` (string, required) — Human-readable error message
- `error` (string, required) — Error message (same as message, for backwards compatibility)
- `trace_id` (string, required) — Unique trace ID for debugging and support requests
- `app_error_code` (string, optional, nullable) — Application-specific error code for programmatic handling

### 403 Forbidden Error

Forbidden - Insufficient permissions for this resource

- `timestamp` (datetime, required) — ISO 8601 timestamp when the error occurred
- `message` (string, required) — Human-readable error message
- `error` (string, required) — Error message (same as message, for backwards compatibility)
- `trace_id` (string, required) — Unique trace ID for debugging and support requests
- `app_error_code` (string, optional, nullable) — Application-specific error code for programmatic handling

### 404 Not Found Error

Resource not found.

- `timestamp` (datetime, required) — ISO 8601 timestamp when the error occurred
- `message` (string, required) — Human-readable error message
- `error` (string, required) — Error message (same as message, for backwards compatibility)
- `trace_id` (string, required) — Unique trace ID for debugging and support requests
- `app_error_code` (string, optional, nullable) — Application-specific error code for programmatic handling

### 409 Conflict Error

Conflict with the current resource state.

- `timestamp` (datetime, required) — ISO 8601 timestamp when the error occurred
- `message` (string, required) — Human-readable error message
- `error` (string, required) — Error message (same as message, for backwards compatibility)
- `trace_id` (string, required) — Unique trace ID for debugging and support requests
- `app_error_code` (string, optional, nullable) — Application-specific error code for programmatic handling

### 422 Unprocessable Entity Error

Unprocessable Entity - Business rule or domain invariant violated

- `timestamp` (datetime, required) — ISO 8601 timestamp when the error occurred
- `message` (string, required) — Human-readable error message
- `error` (string, required) — Error message (same as message, for backwards compatibility)
- `trace_id` (string, required) — Unique trace ID for debugging and support requests
- `app_error_code` (string, optional, nullable) — Application-specific error code for programmatic handling

### 429 Too Many Requests Error

Too Many Requests - Rate limit exceeded

- `timestamp` (datetime, required) — ISO 8601 timestamp when the error occurred
- `message` (string, required) — Human-readable error message
- `error` (string, required) — Error message (same as message, for backwards compatibility)
- `trace_id` (string, required) — Unique trace ID for debugging and support requests
- `app_error_code` (string, optional, nullable) — Application-specific error code for programmatic handling

### 500 Internal Server Error

Internal Server Error - An unexpected error occurred

- `timestamp` (datetime, required) — ISO 8601 timestamp when the error occurred
- `message` (string, required) — Human-readable error message
- `error` (string, required) — Error message (same as message, for backwards compatibility)
- `trace_id` (string, required) — Unique trace ID for debugging and support requests
- `app_error_code` (string, optional, nullable) — Application-specific error code for programmatic handling

### 502 Bad Gateway Error

Bad Gateway - External service error

- `timestamp` (datetime, required) — ISO 8601 timestamp when the error occurred
- `message` (string, required) — Human-readable error message
- `error` (string, required) — Error message (same as message, for backwards compatibility)
- `trace_id` (string, required) — Unique trace ID for debugging and support requests
- `app_error_code` (string, optional, nullable) — Application-specific error code for programmatic handling

## Types

### CarrierQuestionAnswerRequest

- `question_id` (string, required)
- `applicant_id` (string, required)
- `answer` (string, required)

### CarrierQuestionResponses

- `enrollment_id` (string, required)
- `selected_plan_hios_id` (string, required)
- `revision` (integer, required)
- `responses` (list of CarrierQuestionAnswer, required)
- `updated_at` (datetime, required, nullable)
- `finalized_at` (datetime, required, nullable)
- `reviewed_revision` (integer, required, nullable)
- `questions` (list of CarrierQuestion, required)
- `blocked_reasons` (list of string, required)
- `initial_responses` (list of CarrierQuestionAnswer, required)
- `reselection_required` (boolean, required)

### CarrierQuestionAnswer

- `question_id` (string, required)
- `applicant_id` (string, required)
- `answer` (string, required)

### CarrierQuestion

- `question_id` (string, required)
- `applicant_id` (string, required)
- `type` (enum, required) — * `boolean` - boolean * `choice` - choice * `text` - text * `date` - date * `signature` - signature * `disclosure` - disclosure
  - Allowed values: `boolean`, `choice`, `text`, `date`, `signature`, `disclosure`
- `label` (string, required)
- `required` (boolean, required)
- `carrier_required` (boolean, required)
- `member_visible` (boolean, required)
- `content` (list of string, required)
- `options` (list of CarrierQuestionOption, required)
- `conditions` (list of CarrierQuestionCondition, required)
- `requires_agreement` (boolean, required)
- `earliest_date` (date, required, nullable)
- `latest_date` (date, required, nullable)
- `blocking_reason` (string, required, nullable)

### CarrierQuestionOption

- `value` (string, required)
- `label` (string, required)

### CarrierQuestionCondition

- `question_id` (string, required)
- `value` (string, required)

## Examples

**Request**

```json
{
  "expected_revision": 1,
  "responses": [
    {
      "question_id": "string",
      "applicant_id": "string",
      "answer": "string"
    }
  ]
}
```

**Response**

```json
{
  "data": {
    "enrollment_id": "string",
    "selected_plan_hios_id": "string",
    "revision": 1,
    "responses": [
      {
        "question_id": "string",
        "applicant_id": "string",
        "answer": "string"
      }
    ],
    "updated_at": "2024-01-15T09:30:00Z",
    "finalized_at": "2024-01-15T09:30:00Z",
    "reviewed_revision": 1,
    "questions": [
      {
        "question_id": "string",
        "applicant_id": "string",
        "type": "boolean",
        "label": "string",
        "required": true,
        "carrier_required": true,
        "member_visible": true,
        "content": [
          "string"
        ],
        "options": [
          {
            "value": "string",
            "label": "string"
          }
        ],
        "conditions": [
          {
            "question_id": "string",
            "value": "string"
          }
        ],
        "requires_agreement": true,
        "earliest_date": "2023-01-15",
        "latest_date": "2023-01-15",
        "blocking_reason": "string"
      }
    ],
    "blocked_reasons": [
      "string"
    ],
    "initial_responses": [
      {
        "question_id": "string",
        "applicant_id": "string",
        "answer": "string"
      }
    ],
    "reselection_required": true
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/carrier-question-responses"

payload = {
    "expected_revision": 1,
    "responses": [
        {
            "question_id": "string",
            "applicant_id": "string",
            "answer": "string"
        }
    ]
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/carrier-question-responses';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"expected_revision":1,"responses":[{"question_id":"string","applicant_id":"string","answer":"string"}]}'
};

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://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/carrier-question-responses"

	payload := strings.NewReader("{\n  \"expected_revision\": 1,\n  \"responses\": [\n    {\n      \"question_id\": \"string\",\n      \"applicant_id\": \"string\",\n      \"answer\": \"string\"\n    }\n  ]\n}")

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

	req.Header.Add("Authorization", "Bearer <apiKey>")
	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://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/carrier-question-responses")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"expected_revision\": 1,\n  \"responses\": [\n    {\n      \"question_id\": \"string\",\n      \"applicant_id\": \"string\",\n      \"answer\": \"string\"\n    }\n  ]\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.put("https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/carrier-question-responses")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"expected_revision\": 1,\n  \"responses\": [\n    {\n      \"question_id\": \"string\",\n      \"applicant_id\": \"string\",\n      \"answer\": \"string\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/carrier-question-responses', [
  'body' => '{
  "expected_revision": 1,
  "responses": [
    {
      "question_id": "string",
      "applicant_id": "string",
      "answer": "string"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/carrier-question-responses");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"expected_revision\": 1,\n  \"responses\": [\n    {\n      \"question_id\": \"string\",\n      \"applicant_id\": \"string\",\n      \"answer\": \"string\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "expected_revision": 1,
  "responses": [
    [
      "question_id": "string",
      "applicant_id": "string",
      "answer": "string"
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/carrier-question-responses")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```