For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Introduction
    • Getting Started
    • Authentication
  • Guide
    • Common Code Patterns
    • Metrics
    • Glossary of Metrics
  • Data
  • Deal Management
  • AI
  • User
    • POSTClient Access Token
  • Liveblocks
    • POSTGet Liveblocks Token
  • user_file
    • GETList User Files
    • POSTUpload User File
    • POSTNotify Submission
    • GETDownload User File
    • DELDelete User File
LogoLogo
user_file

Upload User File

POST
/api/v1/user/me/file
POST
/api/v1/user/me/file
$curl -X POST https://app.termina.ai/api/v1/user/me/file \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: multipart/form-data" \
> -F file=@string \
> -F name="string" \
> -F type="deck"
1{
2 "name": "string",
3 "id": 1,
4 "user_id": 1,
5 "type": "deck",
6 "created_at": "2024-01-15T09:30:00Z",
7 "updated_at": "2024-01-15T09:30:00Z",
8 "is_archived": true,
9 "filesize": 0,
10 "location": "string"
11}

Upload a user file directly (multipart). Max 50MB. Creates the DB row and uploads bytes to GCS.

Was this page helpful?
Previous

Notify Submission

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects a multipart form containing a file.
filefileRequired
The file to upload
namestringRequired1-2048 characters
Name of the file including extension
typeenumRequired

Type/category of the file

Response

Successful Response
namestring

The human-readable name of the file

idinteger
user_idinteger
typeenum or null
The type of the file
created_atstringformat: "date-time"
updated_atstring or nullformat: "date-time"
is_archivedboolean or null
filesizeintegerDefaults to 0
The size of the file in bytes
locationstring or null

Errors

422
Unprocessable Entity Error