**Source URL:** https://general.veevavault.dev/safety/mdl/documentation/common-uses/migrate-component-configuration.md

# Migrate Component Configuration

Vault's Admin UI provides a very robust way for [configuration migration using VPK packages](https://platform.veevavault.help/en/gr/36919). You can also [create your own VPKs](/library/references/about-configuration-migration-packages#Custom_VPKs) to perform a specific set of changes. However, it may be necessary to automate migration or synchronization of certain components programmatically. For successful migration, it is necessary to first [describe](/vault-api/api-reference/25.3/metadata-definition-language-mdl/retrieve-component-records/retrieve-component-record-xmljson) the component on the source Vault and [generate a `RECREATE` command](/vault-api/api-reference/25.3/metadata-definition-language-mdl/retrieve-component-records/retrieve-component-record-mdl). You can execute this command on the target Vault.

Let’s again use Notification Template as an example. We will migrate `my_template1__c` from a source Vault to a target Vault.

First generate a `RECREATE` command on a source Vault. Ensure that the session ID used to authenticate the API call is generated by authenticating to the source Vault.

## Request {#Request}

```
curl -X GET \
  https://{sourceVault}.veevavault.com/api/mdl/components/Notificationtemplate.my_template_1__c \
  -H 'Accept: application/json' \
  -H 'Authorization: {sourceVaultSessionId}'

```

This generates a `RECREATE` command for `Notificationtemplate.my_template_1__c`

```
RECREATE Notificationtemplate my_template_1__c (
   label('My Template 1'),
   active(true),
   description(''),
   referenced_component(),
   subject('My Subject'),
   notification('My notification test'),
   email_body('My email body'),
   entity_type('document')
);

```

You can then execute this command on the target Vault using the session ID generated from authenticating to the target Vault.

```
curl -X POST \
  https://{targetVault}.veevavault.com/api/mdl/execute \
  -H 'Accept: application/json' \
  -H 'Authorization: {sourceVaultSessionId}' \
  -d 'RECREATE Notificationtemplate my_template_1__c (
   label('My Template 1'),
   active(true),
   description(''),
   referenced_component(),
   subject('My Subject'),
   notification('My notification test'),
   email_body('My email body'),
   entity_type('document')
);'

```


---

**Previous:** [Convert Long Text to Rich Text](/safety/mdl/documentation/common-uses/convert-long-text)  
**Next:** [References](/safety/mdl/documentation/references)