The Upload Image API is a simple, REST-based endpoint that allows you to upload images using any HTTP client or library. This API is designed specifically for upload-only functionality — you cannot list, edit, or delete existing images using this API.
⚠️ Keep your API token secure. Although, the API Token is severly limited in functionality by being upload only, it’s still recommended to not expose it in frontend code, public repositories, or shared environments.
You can authenticate in any of the following ways:
curl -u $API_TOKEN: https://api.magecdn.com/upload
curl -H "Authorization: Bearer $API_TOKEN" https://api.magecdn.com/upload
curl https://api.magecdn.com/upload?token=$API_TOKEN