Skip to main content
POST
/
v2
/
workspaces
/
{workspaceId}
/
files
/
{id}
/
share
Share File
curl --request POST \
  --url https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/files/{id}/share \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "expiresIn": 123
}
'
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expiresIn: 123})
};

fetch('https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/files/{id}/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/files/{id}/share"

payload = { "expiresIn": 123 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "url": "<string>",
  "expiresAt": "<string>",
  "expiresIn": 123
}
{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}
{
"error": "AuthenticationError",
"message": "Unauthenticated"
}
{
"error": "ForbiddenError",
"message": "Forbidden"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required

Workspace id

id
string
required

File id

Body

application/json
expiresIn
number

Returned share url will expire in N seconds

Response

Success Response

url
string
expiresAt
string
expiresIn
number