Skip to main content
POST
/
v1
/
files
/
upload
Upload A File
curl --request POST \
  --url https://files.uqpaytech.com/api/v1/files/upload \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-auth-token: <api-key>' \
  --header 'x-idempotency-key: <x-idempotency-key>' \
  --form file='@example-file'
{
  "create_time": "2024-08-22T17:12:58+08:00",
  "file_id": "b3d9d2d5-4c12-4946-a09d-953e82sed2b0",
  "file_name": "example.png",
  "file_type": "png",
  "size": 123456,
  "notes": "This is a note"
}

Authorizations

x-auth-token
string
header
required

Token used to request APIs

Headers

x-on-behalf-of
string

The value set to the connected account's ID. More information at List Connected Accounts

x-idempotency-key
string<uuid>
required

A unique identifier (UUID) used to maintain operation idempotency, ensuring that repeated executions of the same operation do not result in unintended effects or duplication. It helps preserve data consistency in the face of network errors, retries, or failures.

Query Parameters

notes
string

The notes of the uploaded file, max length is 50 characters

Maximum string length: 50

Body

multipart/form-data
file
file

Response

OK - Successfully uploaded a file.

create_time
string
required

Timestamp when the file was uploaded.

Example:

"2024-08-22T17:12:58+08:00"

file_id
string
required

Unique identifier for the uploaded file. Use this ID to reference the file in other API calls.

Example:

"b3d9d2d5-4c12-4946-a09d-953e82sed2b0"

file_name
string
required

Original name of the uploaded file including extension.

Example:

"example.png"

file_type
string
required

File extension type (e.g., png, pdf, docx).

Example:

"png"

size
integer
required

File size in bytes.

Example:

123456

notes
string
required

Optional notes associated with the file.

Example:

"This is a note"