Skip to main content
POST
/
:projectId
/
storage
Upload File
curl --request POST \
  --url https://api.replyke.com/api/v6/:projectId/storage \
  --header 'Content-Type: <content-type>' \
  --data '{
  "pathParts": "<string>"
}'
{
  "fileId": "<string>",
  "relativePath": "<string>",
  "publicPath": "<string>"
}
Upload a file to project storage. The file is saved using a path structure defined by pathParts. The filename is sanitized using transliteration.

Headers

Content-Type
string
required
Must be multipart/form-data

Body Parameters (multipart/form-data)

file
file
required
The file to upload. Must not exceed 15MB.
pathParts
string
required
A JSON stringified array of folder path segments (e.g., ["profile", "images"])

Response

fileId
string
Unique identifier for the uploaded file
relativePath
string
Relative path to the file (e.g., “profile/images/photo.jpg”)
publicPath
string
Public URL to access the file

Error Responses

{
  "error": "No file provided",
  "code": "storage/no-file"
}
{
  "error": "pathParts must be an array of strings",
  "code": "storage/invalid-path-parts"
}
{
  "error": "File size exceeds the allowed limit of 15MB",
  "code": "storage/file-too-large"
}
{
  "error": "Internal server error",
  "code": "storage/server-error",
  "details": "<Error message>"
}

Notes

  • Requires authentication
  • The uploaded file is stored at the location specified by pathParts, with the filename sanitized
  • Returns a public URL to access the file
  • Maximum file size: 15MB
  • Content-Type must be multipart/form-data
  • Rate limiting: 50 requests per 5 minutes
I