# API

The new API feature allows you to generate a direct CSV download URL from your Miro Mind Map data. This URL can act as an API endpoint, enabling seamless integration with other tools and workflows, from updating databases to triggering automated reports. Follow the steps below to start using this feature effectively.

### Overview

With the API feature, you can create a live CSV download URL for your Mind Map data. This can be a new URL or an update to an existing one if your Mind Map changes. This live link makes it easier to share, download, or directly integrate Mind Map data into other systems.

{% embed url="<https://www.loom.com/share/3f1cf3d366dd48228c81c322515e7243?sid=8c002701-dda6-403d-8636-2580d5e230de>" %}

### Selecting the API File Type

1. From the **File Type** dropdown in Mind Map Downloader, select **API**.
2. You’ll see options to either **Create a New Endpoint** or **Update an Existing Endpoint**.

<figure><img src="https://3825982875-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpEytOMv8LQf2bKlqaAc%2Fuploads%2F98hhDaAQsoHln0XowuSa%2FScreenshot%202024-11-05%20at%2010.21.25.png?alt=media&#x26;token=55cacbd1-3887-48d8-8083-c6619c799b20" alt="" width="375"><figcaption><p>Create or Update API endpoints with the 'API' feature.</p></figcaption></figure>

### Creating a New API Endpoint

To set up a new endpoint:

1. Select **API** as your file type in the Mind Map Downloader.
2. Choose **Create New Endpoint**.
3. In the **Endpoint Name** field, enter a unique name for your endpoint.
   * Use all lowercase letters, and replace spaces with hyphens (e.g., `my-mindmap-endpoint`).
   * Special characters are not allowed.
4. Select the center node of your Mind Map as usual with Mind Map Downloader.
5. Click **Load Export**.
6. Click **Create API Endpoint**.

### Updating an Existing API Endpoint

To update an existing endpoint:

1. Select **API** as your file type in the Mind Map Downloader.
2. Choose **Update Existing Endpoint**.
3. From the dropdown, select the endpoint you want to update.
4. Select the center node of your Mind Map.
5. Click **Load Export**.
6. Click **Update API Endpoint**.

### Using the API Endpoint

Your API endpoint URLs follow this format:

```uri
https://api.miromindmap/<unique-user-id>/<endpoint-name>
```

When you create or update an endpoint, a confirmation alert will display the new URL.

<figure><img src="https://3825982875-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpEytOMv8LQf2bKlqaAc%2Fuploads%2FWd21m2vKtLBKzd63VLW1%2FScreenshot%202024-11-05%20at%2010.33.18.png?alt=media&#x26;token=7ef2c5a6-49e4-4ad2-b71b-ce8c05df044a" alt="" width="375"><figcaption><p>An alert will display your API endpoint</p></figcaption></figure>

You can also view any existing URL by selecting **Update Existing Endpoint** and choosing your endpoint from the dropdown, then clicking **Show API Endpoint URL**.

<figure><img src="https://3825982875-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpEytOMv8LQf2bKlqaAc%2Fuploads%2F9voB51dl0HyNnbacqH24%2FScreenshot%202024-11-05%20at%2010.34.47.png?alt=media&#x26;token=510073ee-329a-43e3-903b-695929521b28" alt="" width="183"><figcaption></figcaption></figure>

You can test your URL in a browser or with a tool like [Postman](https://www.postman.com/).

<figure><img src="https://3825982875-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpEytOMv8LQf2bKlqaAc%2Fuploads%2FLULC8IJke6WI5Zz5NAts%2FScreenshot%202024-11-05%20at%2010.36.30.png?alt=media&#x26;token=3cba8d3a-71e2-499d-bb57-f9d7ae73a07d" alt=""><figcaption></figcaption></figure>

### Important Notes

* **Automatic Formatting**: The **Endpoint Name** field automatically converts input to lowercase, replaces spaces with hyphens, and removes special characters.
* **Unique Name Requirement**: If the entered name already exists, the feature will recognize it as an update rather than creating a new endpoint.
* **Security**: Each API endpoint URL includes a unique identifier tied to your Miro account. This ensures the security of your data.
* **Storage:** The API feature will require your Mind Map data to be stored in our systems. This is done to an industry standard with the latest end-to-end encryption.

If you have any questions about these API endpoints, please contact our support team.
