Skip to main content
POST
/
v1
/
templates
/
upload-base64
Save a document template (NDA, contract, SOP, letterhead) for reuse across sessions.
curl --request POST \
  --url https://api.example.com/v1/templates/upload-base64 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "file_base64": "<string>",
  "session_id": "<string>"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Headers

authorization
string | null

Body

application/json

JSON request body for base64-encoded file uploads.

filename
string
required

Original filename with extension (e.g. 'contract.pdf'). Used for file type detection.

Maximum string length: 512
file_base64
string
required

Base64-encoded file content.

Maximum string length: 50000000
session_id
string | null

Session ID. Auto-generated if not provided.

Maximum string length: 256

Response

Successful Response