Zilfu
API ReferenceMedia

Upload a media file

Accepts images (JPEG, PNG, WebP) and videos (MP4, QuickTime). Images are auto-optimized.

POST
/media
AuthorizationBearer <token>

In: header

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://zilfu.app/api/media" \  -F file="string"
{
  "data": {
    "id": "string",
    "type": "string",
    "url": "string",
    "mime": "string",
    "width": "string",
    "height": "string",
    "size": "string",
    "alt": "string",
    "order": "string"
  }
}
{
  "message": "string"
}
{
  "message": "string",
  "errors": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  }
}