# Download custom connector

> API reference for downloading a custom Integration Service connector as a .connector file, with the endpoint URL, path parameter, and query parameters.

Downloads a custom connector as a `.connector` file.

## API endpoint

`GET` `BaseURL/elements/{elementKey}/export`

* Use the Connectors API [Base URL](base-url.md) for the cloud platform you are on.

## Request headers

| Header | Value |
| --- | --- |
| **Authorization** | Bearer `<your-access-token>` |
| **X-UIPATH-AccountId** | `<tenant>` |

Replace all the values between the angle brackets `<...>` with their corresponding use-case values.

The token is the one you received when you authorized the external application. It is available for 1 hour, then you need to generate a new one, or request a refresh token. See [API access](../user-guide/api-access.md) for how to register an external application and obtain this token.

:::important
Only **custom** connectors can be downloaded. Requesting a catalog (prebuilt UiPath) connector returns `400 Bad Request`. This endpoint is not folder-scoped — no folder key is required.
:::

## Path variables

| Path variable | Data type | Description | Default value |
| --- | --- | --- | --- |
| **elementKey** (required) | `string` | The key of the custom connector you want to download. | NA |

## Query parameters

| Query parameter | Data type | Description | Default value |
| --- | --- | --- | --- |
| **version** | `string` | The connector version to download. When omitted, the current published version is used. | NA |

## Responses

### 200 OK

Returns the connector as a binary `.connector` file (`application/octet-stream`), named `{elementKey}_{version}.connector`.

### 400 Bad Request

The requested connector is a catalog (prebuilt UiPath) connector, which cannot be exported.

### 401 Unauthorized

The access token is missing, expired, or invalid.

### 403 Forbidden

The external application does not hold the **IS.Connectors.Read** scope.

### 404 Not Found

No connector exists for the given key, or the requested version was not found.
