Skip to main content
POST
/
drives
/
{driveId}
/
items
Upload Drive File
curl --request POST \
  --url https://api.ag.dev/v0.1/drives/{driveId}/items \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-API-Key: <api-key>' \
  --form 'path=<string>' \
  --form file='@example-file'
{
  "kind": "file",
  "id": "<string>",
  "name": "<string>",
  "path": "<string>",
  "status": "processing",
  "modifiedAt": "2023-11-07T05:31:56Z",
  "size": 123,
  "contentType": "<string>",
  "description": "<string>",
  "summary": "<string>",
  "metadata": {}
}

Authorizations

X-API-Key
string
header
required

Provide either X-API-Key: or Authorization: Bearer

Path Parameters

driveId
string
required

Drive ID

Body

multipart/form-data
path
string
required

Destination path for the uploaded file. Must start with "/" and must not include ".." segments

file
file
required

File contents (max 100MB). Content type is preserved as provided.

Response

Uploaded file details

kind
enum<string>
required

Item type

Available options:
file
id
string
required

File ID

name
string
required

File name

path
string
required

File path

status
enum<string>
required

File processing status

Available options:
processing,
ready,
error
modifiedAt
string<date-time>
required

Last modified timestamp

size
number

File size

contentType
string

File content type

description
string | null

File description

summary
string | null

File summary

metadata
object

Additional file metadata