curl --request POST \
--url https://api.arg.ai/api/workspaces/{workspaceId}/files/share \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>"
}
'import requests
url = "https://api.arg.ai/api/workspaces/{workspaceId}/files/share"
payload = { "path": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '<string>'})
};
fetch('https://api.arg.ai/api/workspaces/{workspaceId}/files/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Create a share link
Mint a link to a file or folder. Sharing a file requires manage access to it.
curl --request POST \
--url https://api.arg.ai/api/workspaces/{workspaceId}/files/share \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>"
}
'import requests
url = "https://api.arg.ai/api/workspaces/{workspaceId}/files/share"
payload = { "path": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '<string>'})
};
fetch('https://api.arg.ai/api/workspaces/{workspaceId}/files/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Authorizations
Body
Workspace files an app opened through this link may save back to, addressed by path. Each one is checked against your own manage access when the link is minted and again when a save arrives, so a link can never hand out a write you could not make yourself. A path that does not exist yet is allowed, which is how an app that creates its own output file is published. Requires include_references, and cannot be combined with a folder share, a snapshot link, or a link that collects bookings or responses. The shared file itself is never grantable - that is allow_edit.
How include_references behaves. dynamic re-derives the list from the file's current contents on every access, so files it starts referencing later still load. snapshot fixes the list when the link is created. A link that allows editing is always snapshot; asking for dynamic alongside allow_edit is rejected.
dynamic, snapshot Response
Successful response
The response is of type object.