Skip to main content
POST
/
storage
/
uploads
/
{filename}
python
from notte_sdk import NotteClient

client = NotteClient()
storage = client.FileStorage()

with open("file.txt", "w") as f:
    _ = f.write("hello notte storage test!")

# Upload a file
success = storage.upload("file.txt")
touch file.txt
curl -X POST "https://api.notte.cc/storage/$session_id/downloads/$filename" \
-H "Authorization: Bearer $NOTTE_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "file=@file.txt"
{
  "success": true
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-notte-request-origin
string | null
x-notte-sdk-version
string | null

Body

multipart/form-data
file
string
required

Response

Successful Response

success
boolean
required

Whether the upload was successful