# Connections

Connections in the Dynamiq platform are reusable configurations that enable seamless integration with external services, APIs, or data providers. By creating and managing connections, users can easily configure integrations once and reuse them across multiple workflows and other platform features. This approach minimizes redundancy and ensures a consistent setup for interacting with external resources.

### Adding a New Connection

<figure><img src="https://4279757243-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTbBxR0Ob7RUmbvHZkQi2%2Fuploads%2Fo0vAVamfKJ9wTVrA40gZ%2Fimage.png?alt=media&#x26;token=a6ce560f-98b2-49cf-9183-5ad965a62b63" alt=""><figcaption></figcaption></figure>

To add a new connection:

1. Navigate to the **Connections** page and select **Add new connection**.
2. Fill out the form on the right panel:
   * **Name**: Enter a descriptive name for the connection.
   * **Type**: Select the connection type from the dropdown (e.g., OpenAI).
   * Depending on the selected type, fill in configuration fields such (e.g., API Key, URL).
3. Once all fields are filled out, click **Create** to save the connection.

### Updating Existing Connection

<figure><img src="https://4279757243-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTbBxR0Ob7RUmbvHZkQi2%2Fuploads%2FcEFkQLOOgKDgzfsnnAvm%2Fimage.png?alt=media&#x26;token=eb39c9dd-a003-4f91-bd55-90dff9e6e3d8" alt=""><figcaption></figcaption></figure>

To update an existing connection:

1. Navigate to the **Connections** page.
2. Find the connection you wish to update and click the **Edit** icon next to it. This will open the connection's configuration panel on the right side.
3. Modify connection-specific fields, depending on the connection type, you may see different fields.
4. After making the necessary changes, click **Update** to apply the updates to the connection.

### Removing a Connection

In the Dynamiq platform, users can delete unused connections to keep their configurations clean and organized. However, before a connection is removed, the system will automatically check if it is actively in use within any workflows, deployments, or other platform components. If the connection is not in use, it will be removed successfully. If it is in use, an error message will appear, indicating that the connection cannot be deleted until it is no longer referenced.

To remove a connection:

1. Navigate to the **Connections** page.
2. Find the connection you wish to delete and click the **Delete** icon next to it.
3. Outcome:
   * If the Connection is not in use: the connection will be removed immediately, and it will no longer appear in the list of connections.
   * If the Connection is in use: you will receive an error message indicating that the connection cannot be deleted while it is actively referenced. To remove the connection, first detach it from any associated workflows.
