curl --request POST \
--url https://sapi.withsutro.com/storage/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'x-sutro-api-client: <api-key>' \
--form file='@example-file' \
--form customerId=3c90c3cc-0d44-4b50-8888-8dd25736052a \
--form builderId=3c90c3cc-0d44-4b50-8888-8dd25736052a{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"size": 123,
"mimeType": "<string>",
"bucket": "<string>",
"path": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"builderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "2023-11-07T05:31:56Z"
}Upload a file to object storage. The file is associated with the authenticated customer and can optionally be linked to a builder.
curl --request POST \
--url https://sapi.withsutro.com/storage/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'x-sutro-api-client: <api-key>' \
--form file='@example-file' \
--form customerId=3c90c3cc-0d44-4b50-8888-8dd25736052a \
--form builderId=3c90c3cc-0d44-4b50-8888-8dd25736052a{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"size": 123,
"mimeType": "<string>",
"bucket": "<string>",
"path": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"builderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "2023-11-07T05:31:56Z"
}Builder authentication and authorization
A unique identifier for the API Client making a request
File uploaded successfully
A file stored in object storage with metadata and timestamps
Unique identifier for the stored object
The original file name
File size in bytes
MIME type of the file
The storage bucket name
The full path in object storage
The ID of the customer who owns this file
The ID of the builder associated with this file, if any
Was this page helpful?