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
      • POSTUpload File
      • POSTCreate File Entry
      • GETFiles
      • GETFile
      • PUTUpdate File
      • DELDelete File
      • GETFile Download
      • GETFile Read Url
      • POSTFinalize Upload
  • 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
Deal ManagementFile

Upload File

POST
/api/v1/group/:group_id/deal/:deal_id/file
POST
/api/v1/group/:group_id/deal/:deal_id/file
$curl -X POST https://app.termina.ai/api/v1/group/1/deal/1/file \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/x-www-form-urlencoded" \
> -d "file=document.pdf" \
> -d "name=contract.pdf" \
> -d "type=deck"
1{
2 "name": "string",
3 "id": 1,
4 "deal_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}

Upload a file for a specific group and deal. Creates a file entry as well as uploads its contents. NOTE: Uploads are limited to {MAX_FILE_SIZE // 1024 // 1024 // 1024}GB. For larger file uploads use the signed-url upload endpoint.

Was this page helpful?
Previous

Create File Entry

Next
Built with

Authentication

AuthorizationBearer

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

Path parameters

group_idintegerRequired
deal_idintegerRequired

Request

This endpoint expects an object.
filestringRequiredformat: "binary"
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
deal_idinteger or null
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

Errors

422
Unprocessable Entity Error