Skip to main content
POST
/
api
/
sandboxes
/
files
cURL
curl --request POST \
  --url https://recoup-api.vercel.app/api/sandboxes/files \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "files": [
    {
      "url": "https://example.com/files/album-cover.png",
      "name": "album-cover.png"
    }
  ],
  "path": "assets/images",
  "message": "Add new album artwork"
}
'
{
  "status": "success",
  "uploaded": [
    {
      "path": "<string>",
      "sha": "<string>"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Body

application/json

JSON body containing file URLs and target path

files
object[]
required

Array of files to upload, each with a URL and target filename

path
string

The target directory path within the repository to upload files to. Defaults to the repository root if omitted.

Example:

"assets/images"

message
string

Optional commit message. Defaults to 'Upload files via API'.

Example:

"Add new album artwork"

Response

Files uploaded successfully

status
enum<string>
required

Status of the operation

Available options:
success
uploaded
object[]
required

Array of uploaded file details