Files

Manage files used by agents or users. These endpoints support file uploads, previews, and importing files directly from URLs.

Upload File

post
Query parameters
tenant_idany ofOptional

Tenant Id

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
stringOptional
or
nullOptional
tenant_unit_idany ofOptional

Tenant Unit ID

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
stringOptional
or
nullOptional
Body
filestring · binaryRequired

Upload file

Responses
201
Successful Response
application/json
post
POST /admin/api/v2/files/upload HTTP/1.1
Host: api.workfx.ai
Content-Type: multipart/form-data
Accept: */*
Content-Length: 11

{
  "file": ""
}
{
  "id": "text",
  "tenant_id": "text",
  "tenant_unit_id": "text",
  "name": "text",
  "size": 1,
  "ext": "text",
  "file_url": "text",
  "original_url": "text"
}

Preview File

get
Path parameters
file_idstringRequired

File id

Query parameters
expiresstringRequired

Expires

noncestringRequired

Nonce

sigstringRequired

Sig

Responses
200
Successful Response
application/json
Responseobject
get
GET /admin/api/v2/files/{file_id} HTTP/1.1
Host: api.workfx.ai
Accept: */*
{}

Remote Url Upload File

post
Query parameters
tenant_idany ofOptional

Tenant Id

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
stringOptional
or
nullOptional
tenant_unit_idany ofOptional

Tenant Unit ID

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
stringOptional
or
nullOptional
Body

The remote url

urlstringRequired
Responses
201
Successful Response
application/json
post
POST /admin/api/v2/files/remote-url/upload HTTP/1.1
Host: api.workfx.ai
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "url": "text"
}
{
  "id": "text",
  "tenant_id": "text",
  "tenant_unit_id": "text",
  "name": "text",
  "size": 1,
  "ext": "text",
  "file_url": "text",
  "original_url": "text"
}

Last updated

Was this helpful?