---
schema_version: "1"
id: 84c45752d9db83bfea9b9006459bbee68462372de6620c17c1333d44956fe3c6
title: reinstateInsurancePolicy(insurancePolicyReinstatementInput, policyId)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/apex_ConnectAPI_InsuranceBrokerageFamily_reinstateInsurancePolicy_1.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_ConnectAPI_InsuranceBrokerageFamily_reinstateInsurancePolicy_1.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 034cc9855dbad1c935cb52eb8266dc0e2004431dbb683ce3e5f4009b29f500f6
description: Reinstate a previously canceled insurance policy by providing the reinstatement details and the policy ID.
---
# reinstateInsurancePolicy(insurancePolicyReinstatementInput, policyId)

Reinstate a previously canceled insurance policy by providing the reinstatement details and the policy ID.

## API Version

67.0

## Requires Chatter

No

## Signature

public static ConnectApi.InsurancePolicyReinstatementRepresentation reinstateInsurancePolicy(ConnectApi.InsurancePolicyReinstatementInputRepresentation insurancePolicyReinstatementInput, String policyId)

## Parameters

**insurancePolicyReinstatementInput**

- Type: [ConnectApi.InsurancePolicyReinstatement​InputRepresentation](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_connectapi_input_insurance_policy_reinstatement.htm "Input representation for the reinstate policy request. Includes insurance policy field overrides and the reinstatement date.")
- Input representation containing the insurance policy field overrides and the reinstatement date.

**policyId**

- Type: String
- ID of the insurance policy to reinstate.

## Return Value

Type: [ConnectApi.InsurancePolicyReinstatementRepresentation](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_connectapi_output_insurance_policy_reinstatement.htm "Output representation for the reinstate policy response. Contains the reinstated policy ID, the transaction ID, and any errors that occurred during the reinstatement process.")

## Usage

Use this method to reinstate a previously canceled insurance policy. Provide the reinstatement date and any policy field overrides in the input representation, along with the ID of the policy to reinstate. The response includes the reinstated policy ID, the transaction ID, and any errors.

## Example

The Apex example shows how to use the ConnectApi.InsuranceBrokerageFamily.reinstateInsurancePolicy() method to reinstate a previously canceled insurance policy.

**Class Definition**

This Apex example shows how to reinstate a canceled insurance policy.

global class ReinstateConnectDriver {

    global static void callReinstateConnectAPI() {
        Map<String, Object\> input = new Map<String, Object\>();
        input.put('policyId', '0YTxx000000001dGAA');

        ConnectApi.InsurancePolicyReinstatementInputRepresentation reinstateInput = new ConnectApi.InsurancePolicyReinstatementInputRepresentation();
        reinstateInput.reinstatementDate = '2026-01-15';

        ConnectApi.InsurancePolicyInputRepresentation policyInput = new ConnectApi.InsurancePolicyInputRepresentation();
        Map<String, Object\> fields = new Map<String, Object\>();
        fields.put('Status', 'Active');
        policyInput.fieldValueMap = fields;
        reinstateInput.insurancePolicy = policyInput;

        input.put('policyInput', reinstateInput);

        Map<String, Object\> output = new Map<String, Object\>();
        Map<String, Object\> args = new Map<String, Object\>();
        args.put('input', input);
        args.put('output', output);

        ReinstateTestConnectAPI callable = new ReinstateTestConnectAPI();
        Object result = callable.call('reinstate', args);

        ConnectApi.InsurancePolicyReinstatementRepresentation policyData =
            (ConnectApi.InsurancePolicyReinstatementRepresentation) result;
        System.debug('Reinstate Policy Data: ' + JSON.serializePretty(policyData));

        if (output.containsKey('error')) {
            System.debug('Error: ' + output.get('error'));
        }
    }
}

**Usage Example**

Use the ReinstateTestConnectAPI class to execute the reinstate action and process the result.

public class ReinstateTestConnectAPI implements System.Callable {

    public Object call(String action, Map<String, Object\> args) {
        Map<String, Object\> inputMap = (Map<String, Object\>) args.get('input');
        Map<String, Object\> outputMap = (Map<String, Object\>) args.get('output');

        if (action == 'reinstate') {
            ConnectApi.InsurancePolicyReinstatementInputRepresentation reinstateInput =
                (ConnectApi.InsurancePolicyReinstatementInputRepresentation) inputMap.get('policyInput');
            String policyId = (String) inputMap.get('policyId');
            System.debug('Start of Connect API call to reinstate policy: ' + policyId);

            ConnectApi.InsurancePolicyReinstatementRepresentation policyData;
            try {
                policyData = ConnectApi.InsuranceBrokerageFamily.reinstateInsurancePolicy(reinstateInput, policyId);
                System.debug('Policy reinstated successfully: ' + policyData);
                outputMap.put('policyData', policyData);
            } catch (Exception e) {
                System.debug('Error while reinstating policy: ' + e.getMessage());
                outputMap.put('error', e.getMessage());
            }
            return policyData;
        }

        return null;
    }
}

// Execute
ReinstateConnectDriver.callReinstateConnectAPI();