Skip to main content
POST
/
api
/
v1
/
files
/
upload
Upload file
curl --request POST \
  --url https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/files/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'conversationId=<string>'
{
  "success": true,
  "data": {
    "fileId": "<string>",
    "filename": "<string>",
    "mimeType": "<string>",
    "size": 123,
    "url": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "conversationId": "<string>"
  },
  "meta": {
    "timestamp": "2023-11-07T05:31:56Z",
    "requestId": "<string>"
  }
}
Accepts multipart/form-data with a file field (image or PDF) plus an optional conversationId to associate the upload with an existing chat. The response returns the stored metadata and GCS URL.

Authorizations

Authorization
string
header
required

Auth0 access token for registered users.

Body

multipart/form-data
file
file
required
conversationId
string

Response

File uploaded.

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required