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

Finalize Upload

POST
/api/v1/group/:group_id/deal/:deal_id/file/:file_id/finalize
POST
/api/v1/group/:group_id/deal/:deal_id/file/:file_id/finalize
$curl -X POST https://app.termina.ai/api/v1/group/1/deal/1/file/1/finalize \
> -H "Authorization: Bearer <token>"
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}
Finalize a file upload after uploading to GCS via signed URL. This endpoint should be called after the client has: 1. Called create_file_entry to get a signed URL and file ID 2. Uploaded the file directly to GCS using the signed URL The endpoint fetches the actual file size from GCS and updates the database record. This is necessary because signed-URL uploads bypass our server, so we don't know the file size until we query GCS after the upload completes. Returns: FileResponse: The updated file record with the correct filesize Raises: 404: If the file hasn't been uploaded to GCS yet (blob doesn't exist)
Was this page helpful?
Previous

Search Views

Next
Built with

Finalize a file upload after uploading to GCS via signed URL.

This endpoint should be called after the client has:

  1. Called create_file_entry to get a signed URL and file ID
  2. Uploaded the file directly to GCS using the signed URL

The endpoint fetches the actual file size from GCS and updates the database record. This is necessary because signed-URL uploads bypass our server, so we don’t know the file size until we query GCS after the upload completes.

Returns: FileResponse: The updated file record with the correct filesize

Raises: 404: If the file hasn’t been uploaded to GCS yet (blob doesn’t exist)

Authentication

AuthorizationBearer

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

Path parameters

group_idintegerRequired
deal_idintegerRequired
file_idintegerRequired

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