# File upload

{% hint style="warning" %}
File Upload is different from the [Import and Export](/resource-and-metadata-management/import-and-export-data.md) feature which is meant to edit metadata on existing resources, or bring in new dictionary terms.
{% endhint %}

There are three steps to uploading a file as a custom integration in Secoda.

1. Create an Integration
2. Prepare your files
3. Upload the resources

### 1. Create an Integration

Navigate over to the Integrations page and click the **Connect Integration** button. Scroll to the bottom to find the **Custom Integrations** option, and select **File Upload**.

You'll then be able to name your integration, and add any associated teams. By default, the integration will be named Untitled, and associate with the General team.

You can adjust the preferences of your integration in the [Settings](/integrations/integration-settings.md).

#### Using an API Request

Use the Secoda [Integrations API endpoint](https://api.secoda.co/api/schema/redoc/#tag/Integrations/paths/~1integration~1integrations/post) to create an integration. Code snippet below.

```python
import requests

headers = dict(
    Authorization="Bearer <your-api-token>"
)
integration_type = "custom"

response = requests.post(
    "https://api.secoda.co/integration/integrations/",
    json=dict(type=integration_type, name="My Custom Integration", credentials={}),
    headers=headers
).json()
print("Integration ID", response.get("id"))
```

### 2. Prepare your files

Learn more about the expected format for the CSV or JSONL file.

{% content-ref url="/pages/TaEUozFxkd8TULnWB2AY" %}
[CSV file format](/integrations/custom-integrations-and-marketplace/custom-integration/create-your-csv.md)
{% endcontent-ref %}

{% content-ref url="/pages/GAdi9NEiZbivsROECCvB" %}
[JSONL file format](/integrations/custom-integrations-and-marketplace/custom-integration/create-your-jsonl-file.md)
{% endcontent-ref %}

### 3. Upload your resources

Under the Import tab, you will see the option to select and upload a CSV or JSONL file. Each upload is considered a sync.

#### Using an API Request

The endpoint for uploading a CSV is [here](https://api.secoda.co/api/schema/redoc/#tag/Integrations/paths/~1integration~1integrations~1%7Bintegration_id%7D~1import_metadata/post). For a JSONL file, you can upload both a `resources.jsonl` and `lineage.jsonl` file in the same request, to the endpoint [here](https://api.secoda.co/api/schema/redoc/#tag/Integrations/paths/~1integration~1integrations~1%7Bintegration_id%7D~1import_jsonl_metadata/post).

Each request is considered a sync.

{% hint style="info" %}
For some best practices in maintaining your resources for File Upload custom integrations, see [here](/integrations/custom-integrations-and-marketplace/custom-integration/maintain-your-resources.md).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.secoda.co/integrations/custom-integrations-and-marketplace/custom-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
