ZapAPI Docs
Get StartedConceptsAI GatewayGuidesPayment GatewaySDKAPI ReferenceResources
ApiUploads

Upload an image through the server (≤5 MB)

POST
/api/v1/uploads/server

Fallback upload path for API clients (zap_* key with uploads:write scope or JWT). Prefer the client-direct flow (/uploads/handle) for browsers — it bypasses function size limits and is cheaper.

Authorization

bearer

Query Parameters

folder?string
Default"misc"
Value in"avatars""banners""blog""misc"

Header Parameters

X-API-Version?string

API version for header-based versioning

Default"1"
Value in"1""2"

Request Body

multipart/form-data
  1. body
file*unknown

Response Body

File uploaded — returns the public blob URL.

response?unknownapplication/json
Example Request
curl -X POST 'http://localhost:3001/api/v1/uploads/server' \  -F 'file=null'
Example Response200
{  "status": "success",  "statusCode": 200,  "message": "OK",  "data": {    "url": "https://…public.blob.vercel-storage.com/avatars/u1/pic-aB3dEf.png",    "pathname": "avatars/u1/pic-aB3dEf.png"  },  "timestamp": "2026-10-23T10:00:00.000Z",  "path": "/api/v1/uploads/server"}