> Source: https://builder-docs.ema.ai/api-reference/misc/misc-apis
> Title: Miscellaneous APIs

# Miscellaneous APIs

This page documents utility API endpoints for file operations.

## Upload File

Upload a file to the Ema platform. The file is processed asynchronously.

Property

Value

URL

`/api/personas/{persona_id}/upload`

HTTP Method

POST

Protocol

REST (multipart/form-data)

### Headers

Header

Type

Required

Description

`Authorization`

string

Yes

Bearer token

`Content-Type`

string

Yes

`multipart/form-data`

### Path Parameters

Parameter

Type

Description

`persona_id`

string

UUID of the AI Employee

### Form Data

Field

Type

Required

Description

`file`

file

Yes

The file to upload

### Example

```bash
curl -X POST https://your-instance.ema.co/api/personas/<persona_id>/upload \
 -H "Authorization: Bearer <access_token>" \
 -F "file=@document.pdf"
```

### Response

Field

Type

Description

`file_id`

string

UUID of the uploaded file

`status`

string

Upload status

### Processing

Uploaded files are processed asynchronously. The processing pipeline may include:

-   File format detection and validation
-   Text extraction (for PDFs, documents, etc.)
-   Indexing for search and retrieval
-   Thumbnail generation (for images)

## Get Pre-Signed URL

Generate a pre-signed URL for direct file download from cloud storage.

Property

Value

URL

`/api/personas/{persona_id}/get_presigned_url`

HTTP Method

POST

Protocol

REST (HTTP/JSON)

### Headers

Header

Type

Required

Description

`Authorization`

string

Yes

Bearer token

`Content-Type`

string

Yes

`application/json`

### Request Body

Field

Type

Required

Description

`file_id`

string

Yes

UUID of the file

### Example

```bash
curl -X POST https://your-instance.ema.co/api/personas/<persona_id>/get_presigned_url \
 -H "Authorization: Bearer <access_token>" \
 -H "Content-Type: application/json" \
 -d '{
 "file_id": "<file-uuid>"
 }'
```

### Response

Field

Type

Description

`presigned_url`

string

Time-limited URL for file download

`expires_at`

string

ISO 8601 expiration timestamp

The pre-signed URL grants temporary access to the file without requiring authentication. URLs typically expire after a short period (e.g., 15 minutes).

## Related

-   [Dashboard HTTP API](/legacy-docs/api-reference/dashboard/http-api) -- Dashboard file upload (upload-and-run-rows)
-   [Document Generation API](/legacy-docs/api-reference/document-generation/api) -- Document creation
-   [Authentication](/legacy-docs/api-reference/authentication) -- Token management
