# Export foreign keys via JSON

You can export a JSON file containing foreign keys to populate them across multiple workspaces sharing the same source data structure. To export a foreign key JSON file, follow these steps:

1. Navigate to the **Foreign Keys** tab.
2. Click the "**Download foreign keys**" button.

The downloaded JSON file will contain the foreign keys and their configurations.

Below is an example of a foreign key JSON file downloaded from the Syntho workspace:

```json
[
   {
      "apply":true,
      "fk_columns":[
         "PATIENT"
      ],
      "fk_schema":"covid_patient_sample_db_synthetic",
      "fk_table":"encounters",
      "pk_columns":[
         "Id"
      ],
      "pk_schema":"covid_patient_sample_db_synthetic",
      "pk_table":"patients"
   },
   {
      "apply":true,
      "fk_columns":[
         "PAYER"
      ],
      "fk_schema":"covid_patient_sample_db_synthetic",
      "fk_table":"encounters",
      "pk_columns":[
         "Id"
      ],
      "pk_schema":"covid_patient_sample_db_synthetic",
      "pk_table":"payers"
   },
```

In this example, the first foreign key column is "**PATIENT**," located in the "**encounters**" table under the schema "**covid\_patient\_sample\_db\_synthetic**." This foreign key is linked to the primary key "**Id**" in the "**patients**" table, which is under the same schema, "**covid\_patient\_sample\_db\_synthetic**."
