Upload
POST
https://api.restorehub.net /api/v1/upload Upload an image asset to the CDN (multipart/form-data; PNG, JPG, WebP, GIF; max 5MB)
Required scope: upload:write. Use multipart/form-data with field 'file' (required) and optional 'folder'.
Request body
multipart/form-data
filestringrequiredfolderstring{
"file": "string",
"folder": "string"
}Code samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/upload" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY" \
-H "Content-Type: multipart/form-data" \
-d '{"file":"string","folder":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
Example
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}Schema
errorstringHuman-readable error message
codestringMachine-readable error code (optional)
detailsobjectValidation issues (optional)
requiredScopestringRequired scope (on 403 only)
yourScopesstring[]Your key's scopes (on 403 only)
Updated