| Item | Description |
|---|
| Method | POST |
| Path | /apis/v1/files/upload |
| Content-Type | multipart/form-data |
| Authentication | Required. Refer to 'Authorization Introduction' |
This API uploads a file to object storage (S3) on behalf of an authenticated merchant user. The server returns a short-lived fileId.
| Parameter | Required | Type | Description |
|---|
| PexxApiKey | Yes | string | Merchant API key. |
| PexxAuthorization | Yes | string | Bearer + access token. |
| Parameter | Required | Type | Description |
|---|
| file | Yes | file | File to upload. Must be non-empty. Maximum size 10MB. |
Extension handling: if the original filename has a safe extension ([a-z0-9], max 10 characters), the stored object name is {fileId}.{ext}; otherwise {fileId} only.
The response wrapper is ApiResponse<FileUploadResponse>.
| Field | Type | Description |
|---|
| success | boolean | true when the upload succeeded. |
| message | string | Optional message. |
| data | object | Present when success is true. See below. |
| error | string | Present when success is false. |
| Field | Type | Description |
|---|
| fileId | string | The uploaded file ID. Valid for 15 minutes. |
| expireTimeUTC | string | ISO-8601 timestamp (UTC) when the fileId expires. |