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>",
"shareToken": "<string>",
"expiresAt": "<string>",
"expiresIn": 123
}{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}Prisme.ai Workspaces
Share File
Generate a temporary file share url
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>",
"shareToken": "<string>",
"expiresAt": "<string>",
"expiresIn": 123
}{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}Authorizations
BearerAuthOrgApiKeyAuthBearerAuth & OrgApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Returned share url will expire in N seconds
Was this page helpful?