POST
/
v2
/
workspaces
/
{workspaceId}
/
files
curl --request POST \
  --url https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/files \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-Prismeai-API-Key: <api-key>' \
  --form 'expiresAfter=<string>' \
  --form 'public=<string>' \
  --form 'shareToken=<string>'
[
  {
    "name": "<string>",
    "url": "<string>",
    "mimetype": "<string>",
    "size": 123,
    "workspaceId": "<string>",
    "path": "<string>",
    "expiresAt": "<string>",
    "expiresAfter": 123,
    "metadata": {},
    "public": true,
    "shareToken": "<string>"
  }
]

Authorizations

X-Prismeai-API-Key
string
header
required
connect.sid
string
cookie
required

Path Parameters

workspaceId
string
required

Workspace id

Body

multipart/form-data
file
file
required

Accepts both binary data or dataURI (i.e data:...,base64:...)

expiresAfter
string

File expiration time in seconds

public
string

Set to true to make uploaded file publicly available

shareToken
string

If enabled, return a share token that will allow anybody access the file

Response

200
application/json
Success Response
name
string
required
url
string
required
mimetype
string
required
size
number
required
workspaceId
string
required
path
string
required
expiresAt
string
expiresAfter
number

Number of seconds after which the file will be automatically removed

metadata
object
public
boolean

Reflects whether the file has public-read ACL at storage provider. True by default

shareToken
string

A share token to append as a ?token query parameter to grant read access with given url