Skip to content

Upload

Upload

File upload endpoints for images and documents. All uploads are scoped to entities.

Upload image

POST/upload/image

Upload an image file to cloud storage.
Supports PNG, JPG, WEBP, and GIF formats. Maximum file size: 5MB.
Images are automatically optimized and stored in entity-specific folders.
Returns secure URLs for use in entity settings, invoices, and other documents.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.

Body parameters

filestring<binary>required

Image file to upload (PNG, JPG, WEBP, GIF)

curl -X POST "https://eu.spaceinvoices.com/upload/image" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -F "file=@/path/to/image.png"

Returns

urlstring<uri>
secureUrlstring<uri>
publicIdstring
formatstring
widthnumber
heightnumber
bytesnumber
entity_idstring
json
{
  "url": "http://res.cloudinary.com/demo/image/upload/v1234567890/si/entities/ent_507f1f77bcf86cd799439011/logos/logo_ent_507f1f77bcf86cd799439011.png",
  "secureUrl": "https://res.cloudinary.com/demo/image/upload/v1234567890/si/entities/ent_507f1f77bcf86cd799439011/logos/logo_ent_507f1f77bcf86cd799439011.png",
  "publicId": "si/entities/ent_507f1f77bcf86cd799439011/logos/logo_ent_507f1f77bcf86cd799439011",
  "format": "png",
  "width": 576,
  "height": 192,
  "bytes": 45678,
  "entity_id": "ent_507f1f77bcf86cd799439011",
  "filename": "company-logo.png",
  "mime_type": "image/png"
}