> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.athenaintel.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.athenaintel.com/_mcp/server.

# Import a file of a source as an asset

POST https://api.athenaintel.com/api/v0/connectors/{catalog_asset_id}/items/import
Content-Type: application/json

Bring one file of a source in as a new Athena asset, filed in `folder_asset_id`. The file is downloaded inside Athena with the caller's own sign-in and is at most 100 MiB. The caller needs a connected account of their own for the source, and must be able to edit the folder. The new asset takes the sharing of where it is filed: whoever can open the Drive or the place the folder is in can open it. A SharePoint file is imported as the same protected copy Athena's own import makes: it cannot be shared person by person, moved or renamed afterwards, and a share made on the folder itself for one person is not copied onto it. OneDrive files cannot be imported yet (`import_not_supported`). Returns the new asset's id; no token or download link is returned.

Reference: https://docs.athenaintel.com/api-reference/connectors/import-item

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Path parameters

- `catalog_asset_id` (string, required) — The catalog of the source the file is in.

### Body (application/json)

This endpoint expects an ImportConnectorItemRequestIn.

- `folder_asset_id` (string, required) — The folder asset the new asset is filed in. It must be a folder of the source's workspace that the caller may edit.
- `item_id` (string, required) — The file's id, as GET /connectors/\{catalog\_asset\_id}/items listed it.

## Response

### 201

Successful Response

- `asset_id` (string, required) — The new asset.
- `asset_type` (string, required) — Its type, to open it with.
- `catalog_asset_id` (string, required) — The source it was imported from.
- `folder_asset_id` (string, required) — The folder it was filed in.
- `title` (string, required) — Its title: the file's name.

## Errors

### 400 Bad Request Error

unsupported_source, invalid_item_id, not_a_file, invalid_folder, or import_not_supported (files of this source cannot be imported yet). Also (detail is a sentence) when folder_asset_id is not a folder, is archived, or is not in the source's workspace. Nothing is stored.

- `detail` (ConnectorRefusalOutDetail, required) — An object with a code and a message, or a plain sentence for a refusal of the credential, the workspace, the destination folder or the size of the request body.

### 403 Forbidden Error

connect_your_own, needs_reconnect, not_enabled or access_denied, as for browsing. Also (detail is a sentence) when the caller cannot see folder_asset_id, or cannot edit it or the Drive it is in. Nothing is stored. The credential is not one the person holds themselves (a runtime's, a preview's, an agent's, the viewer credential of someone else's app): detail is a sentence.

- `detail` (ConnectorRefusalOutDetail, required) — An object with a code and a message, or a plain sentence for a refusal of the credential, the workspace, the destination folder or the size of the request body.

### 404 Not Found Error

source_not_found: no catalog has this id, or it is in a workspace the caller does not belong to; both are answered alike. item_not_found: the source has no such item.

- `detail` (ConnectorRefusalOutDetail, required) — An object with a code and a message, or a plain sentence for a refusal of the credential, the workspace, the destination folder or the size of the request body.

### 413 Content Too Large Error

file_too_large: the file is over the 100 MiB an import takes (detail.max_bytes). Also (detail is a sentence) a request body over 16 KiB. Nothing is stored.

- `detail` (ConnectorRefusalOutDetail, required) — An object with a code and a message, or a plain sentence for a refusal of the credential, the workspace, the destination folder or the size of the request body.

### 415 Unsupported Media Type Error

file_not_supported: the upload policy refuses the file's type. Nothing is stored.

- `detail` (ConnectorRefusalOutDetail, required) — An object with a code and a message, or a plain sentence for a refusal of the credential, the workspace, the destination folder or the size of the request body.

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 502 Bad Gateway Error

source_unavailable: the provider failed.

- `detail` (ConnectorRefusalOutDetail, required) — An object with a code and a message, or a plain sentence for a refusal of the credential, the workspace, the destination folder or the size of the request body.

### 503 Service Unavailable Error

source_busy: the provider is throttling, or the caller's sign-in is being renewed. Retry-After says how long to wait.

- `detail` (ConnectorRefusalOutDetail, required) — An object with a code and a message, or a plain sentence for a refusal of the credential, the workspace, the destination folder or the size of the request body.

## Types

### ConnectorRefusalOutDetail

An object with a code and a message, or a plain sentence for a refusal of the credential, the workspace, the destination folder or the size of the request body.

- ConnectorRefusalDetailOut: ConnectorRefusalDetailOut
- string

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (ValidationErrorCtx, optional)
- `input` (any, optional)

### ConnectorRefusalDetailOut

- `code` (string, required) — What was refused; see the route's responses.
- `message` (string, required) — A sentence for a person.
- `catalog_asset_id` (string, optional, nullable) — The catalog asked about, when the caller may know it exists.
- `max_bytes` (integer, optional, nullable) — With file_too_large: the largest file an import takes.

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Request**

```json
{
  "folder_asset_id": "asset_b3a1c9d4-52f7-4a0b-9c1e-7d2e5f8a6b01",
  "item_id": "01YV4OGDCNIQCANEGYG5CJQGHPQ3RRODCH"
}
```

**Response**

```json
{
  "asset_id": "asset_0a4e7c11-93b5-4c8e-b1f2-64d0a7e9c355",
  "asset_type": "document",
  "catalog_asset_id": "asset_6c1f0a52-0d3b-4f0e-8a44-1f6f1c2f9b10",
  "folder_asset_id": "asset_b3a1c9d4-52f7-4a0b-9c1e-7d2e5f8a6b01",
  "title": "Engagement letter.docx"
}
```

**SDK Code**

```python
import requests

url = "https://api.athenaintel.com/api/v0/connectors/catalog_asset_id/items/import"

payload = {
    "folder_asset_id": "asset_b3a1c9d4-52f7-4a0b-9c1e-7d2e5f8a6b01",
    "item_id": "01YV4OGDCNIQCANEGYG5CJQGHPQ3RRODCH"
}
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.athenaintel.com/api/v0/connectors/catalog_asset_id/items/import';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"folder_asset_id":"asset_b3a1c9d4-52f7-4a0b-9c1e-7d2e5f8a6b01","item_id":"01YV4OGDCNIQCANEGYG5CJQGHPQ3RRODCH"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.athenaintel.com/api/v0/connectors/catalog_asset_id/items/import"

	payload := strings.NewReader("{\n  \"folder_asset_id\": \"asset_b3a1c9d4-52f7-4a0b-9c1e-7d2e5f8a6b01\",\n  \"item_id\": \"01YV4OGDCNIQCANEGYG5CJQGHPQ3RRODCH\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.athenaintel.com/api/v0/connectors/catalog_asset_id/items/import")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"folder_asset_id\": \"asset_b3a1c9d4-52f7-4a0b-9c1e-7d2e5f8a6b01\",\n  \"item_id\": \"01YV4OGDCNIQCANEGYG5CJQGHPQ3RRODCH\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.athenaintel.com/api/v0/connectors/catalog_asset_id/items/import")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"folder_asset_id\": \"asset_b3a1c9d4-52f7-4a0b-9c1e-7d2e5f8a6b01\",\n  \"item_id\": \"01YV4OGDCNIQCANEGYG5CJQGHPQ3RRODCH\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.athenaintel.com/api/v0/connectors/catalog_asset_id/items/import', [
  'body' => '{
  "folder_asset_id": "asset_b3a1c9d4-52f7-4a0b-9c1e-7d2e5f8a6b01",
  "item_id": "01YV4OGDCNIQCANEGYG5CJQGHPQ3RRODCH"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.athenaintel.com/api/v0/connectors/catalog_asset_id/items/import");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"folder_asset_id\": \"asset_b3a1c9d4-52f7-4a0b-9c1e-7d2e5f8a6b01\",\n  \"item_id\": \"01YV4OGDCNIQCANEGYG5CJQGHPQ3RRODCH\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "folder_asset_id": "asset_b3a1c9d4-52f7-4a0b-9c1e-7d2e5f8a6b01",
  "item_id": "01YV4OGDCNIQCANEGYG5CJQGHPQ3RRODCH"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/connectors/catalog_asset_id/items/import")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```