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

# Terminate

POST https://api.vitablehealth.com/v1/enrollments/{enrollment_id}/terminate
Content-Type: application/json

Terminates enrolled coverage; it ends on the last day of the termination month, or on the termination date for VPC. An accepted qualifying life event owned by the enrollment member is required unless the plan is VPC or ICHRA. ICHRA callers may pass the date the carrier policy actually ended, which can be in the past. User-backed callers must provide a reason; it is optional for organization API-key callers. API keys may act across the caller organization's book. Tenant mismatches return the same non-disclosing 404 before the request body is validated.

Reference: https://developer.vitablehealth.com/api/enrollments/terminate

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

- `reason` (string, optional, nullable) — Audit reason for the termination; required for user-backed callers and optional for long-lived organization API-key callers
- `ticket_number` (string, optional, nullable) — Optional support or operational ticket number
- `qualifying_life_event_id` (string, optional, nullable) — Accepted member qualifying life event identifier (qle_*)
- `carrier_coverage_end_date` (date, optional, nullable) — Last day the carrier policy covered the member, when it ended before this termination. Accepted for ICHRA enrollments only; coverage end is derived when omitted

## Response

### 204

No response body

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

Not Found - The requested resource does not exist

- `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 - Resource already exists or conflicts with current 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

## Examples

### Terminate with a qualifying life event

**Request**

```json
{
  "reason": "Member requested coverage termination after a qualifying event.",
  "ticket_number": "BPT-1234",
  "qualifying_life_event_id": "qle_AAAAAAAAAAAAAAAAAAAAAQ"
}
```

**SDK Code**

```python Terminate with a qualifying life event
import requests

url = "https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate"

payload = {
    "reason": "Member requested coverage termination after a qualifying event.",
    "ticket_number": "BPT-1234",
    "qualifying_life_event_id": "qle_AAAAAAAAAAAAAAAAAAAAAQ"
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Terminate with a qualifying life event
const url = 'https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"reason":"Member requested coverage termination after a qualifying event.","ticket_number":"BPT-1234","qualifying_life_event_id":"qle_AAAAAAAAAAAAAAAAAAAAAQ"}'
};

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

```go Terminate with a qualifying life event
package main

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

func main() {

	url := "https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate"

	payload := strings.NewReader("{\n  \"reason\": \"Member requested coverage termination after a qualifying event.\",\n  \"ticket_number\": \"BPT-1234\",\n  \"qualifying_life_event_id\": \"qle_AAAAAAAAAAAAAAAAAAAAAQ\"\n}")

	req, _ := http.NewRequest("POST", 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 Terminate with a qualifying life event
require 'uri'
require 'net/http'

url = URI("https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"reason\": \"Member requested coverage termination after a qualifying event.\",\n  \"ticket_number\": \"BPT-1234\",\n  \"qualifying_life_event_id\": \"qle_AAAAAAAAAAAAAAAAAAAAAQ\"\n}"

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

```java Terminate with a qualifying life event
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"reason\": \"Member requested coverage termination after a qualifying event.\",\n  \"ticket_number\": \"BPT-1234\",\n  \"qualifying_life_event_id\": \"qle_AAAAAAAAAAAAAAAAAAAAAQ\"\n}")
  .asString();
```

```php Terminate with a qualifying life event
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate', [
  'body' => '{
  "reason": "Member requested coverage termination after a qualifying event.",
  "ticket_number": "BPT-1234",
  "qualifying_life_event_id": "qle_AAAAAAAAAAAAAAAAAAAAAQ"
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Terminate with a qualifying life event
using RestSharp;

var client = new RestClient("https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"reason\": \"Member requested coverage termination after a qualifying event.\",\n  \"ticket_number\": \"BPT-1234\",\n  \"qualifying_life_event_id\": \"qle_AAAAAAAAAAAAAAAAAAAAAQ\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Terminate with a qualifying life event
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "reason": "Member requested coverage termination after a qualifying event.",
  "ticket_number": "BPT-1234",
  "qualifying_life_event_id": "qle_AAAAAAAAAAAAAAAAAAAAAQ"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate")! 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()
```

### Terminate an ICHRA enrollment the carrier already ended

**Request**

```json
{
  "reason": "Member cancelled directly with the carrier.",
  "carrier_coverage_end_date": "2026-08-31"
}
```

**SDK Code**

```python Terminate an ICHRA enrollment the carrier already ended
import requests

url = "https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate"

payload = {
    "reason": "Member cancelled directly with the carrier.",
    "carrier_coverage_end_date": "2026-08-31"
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Terminate an ICHRA enrollment the carrier already ended
const url = 'https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"reason":"Member cancelled directly with the carrier.","carrier_coverage_end_date":"2026-08-31"}'
};

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

```go Terminate an ICHRA enrollment the carrier already ended
package main

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

func main() {

	url := "https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate"

	payload := strings.NewReader("{\n  \"reason\": \"Member cancelled directly with the carrier.\",\n  \"carrier_coverage_end_date\": \"2026-08-31\"\n}")

	req, _ := http.NewRequest("POST", 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 Terminate an ICHRA enrollment the carrier already ended
require 'uri'
require 'net/http'

url = URI("https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"reason\": \"Member cancelled directly with the carrier.\",\n  \"carrier_coverage_end_date\": \"2026-08-31\"\n}"

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

```java Terminate an ICHRA enrollment the carrier already ended
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"reason\": \"Member cancelled directly with the carrier.\",\n  \"carrier_coverage_end_date\": \"2026-08-31\"\n}")
  .asString();
```

```php Terminate an ICHRA enrollment the carrier already ended
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate', [
  'body' => '{
  "reason": "Member cancelled directly with the carrier.",
  "carrier_coverage_end_date": "2026-08-31"
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Terminate an ICHRA enrollment the carrier already ended
using RestSharp;

var client = new RestClient("https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"reason\": \"Member cancelled directly with the carrier.\",\n  \"carrier_coverage_end_date\": \"2026-08-31\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Terminate an ICHRA enrollment the carrier already ended
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "reason": "Member cancelled directly with the carrier.",
  "carrier_coverage_end_date": "2026-08-31"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate")! 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()
```

### Terminate an exempt plan

**Request**

```json
{
  "reason": "Member requested coverage termination."
}
```

**SDK Code**

```python Terminate an exempt plan
import requests

url = "https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate"

payload = { "reason": "Member requested coverage termination." }
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Terminate an exempt plan
const url = 'https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"reason":"Member requested coverage termination."}'
};

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

```go Terminate an exempt plan
package main

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

func main() {

	url := "https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate"

	payload := strings.NewReader("{\n  \"reason\": \"Member requested coverage termination.\"\n}")

	req, _ := http.NewRequest("POST", 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 Terminate an exempt plan
require 'uri'
require 'net/http'

url = URI("https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"reason\": \"Member requested coverage termination.\"\n}"

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

```java Terminate an exempt plan
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"reason\": \"Member requested coverage termination.\"\n}")
  .asString();
```

```php Terminate an exempt plan
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate', [
  'body' => '{
  "reason": "Member requested coverage termination."
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Terminate an exempt plan
using RestSharp;

var client = new RestClient("https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"reason\": \"Member requested coverage termination.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Terminate an exempt plan
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["reason": "Member requested coverage termination."] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.vitablehealth.com/v1/enrollments/enrl_AAAAAAAAAAAAAAAAAAAAAQ/terminate")! 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()
```