Skip to content
StorageAssets

Upload file

Uploads a file as multipart/form-data and returns its public URL and metadata.

Header Parameters

x-Store-Id?string

Store the request acts on. Not needed when the token is bound to a store.

Authorization*string

OAuth 2.0 bearer token.

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.ecomiq.pe/api/v1/storage/assets" \  -H "x-Store-Id: <store-id>" \  -H "Authorization: Bearer <token>" \  -F file="@./polo-de-algodon.jpg" \  -F directory="products" \  -F altText="Polo de algodón azul"
{  "id": "7204558912004323036",  "fileName": "polo-de-algodon.webp",  "publicUrl": "https://mi-tienda.ecomiq.app/images/polo-de-algodon.webp",  "contentType": "polo-de-algodon.webp",  "size": 1,  "width": 30,  "height": 30,  "altText": "polo-de-algodon.webp",  "directory": "polo-de-algodon.webp",  "metadata": {    "key": "polo-de-algodon.webp"  },  "createdOn": "2026-09-28T15:30:00Z",  "createdBy": "2f40d7e4-3d9c-4ab2-b04e-7a6a132db821"}