Create (or refresh) a share for an artifact
curl --request POST \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/artifacts/{artifactId}/shares \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"access_level": "view"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({access_level: 'view'})
};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/artifacts/{artifactId}/shares', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/artifacts/{artifactId}/shares"
payload = { "access_level": "view" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"type": "artifact",
"artifact_id": "<string>",
"url": "<string>",
"apiUrl": "<string>",
"access_level": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Shares
Create (or refresh) a share for an artifact
Returns the existing share for (artifact_id, user_id) if one
exists, with the snapshot refreshed from the artifact’s current
version. Otherwise creates a new share.
POST
/
v1
/
artifacts
/
{artifactId}
/
shares
Create (or refresh) a share for an artifact
curl --request POST \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/artifacts/{artifactId}/shares \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"access_level": "view"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({access_level: 'view'})
};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/artifacts/{artifactId}/shares', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/artifacts/{artifactId}/shares"
payload = { "access_level": "view" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"type": "artifact",
"artifact_id": "<string>",
"url": "<string>",
"apiUrl": "<string>",
"access_level": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Authorizations
BearerAuthOrgApiKeyAuth
User-bound credential carrying an identity: either a session JWT
or a user access token (at:*) generated from the user settings UI.
Send as Authorization: Bearer <token>.
Org API keys (iak_*) are not accepted here - they carry
no user identity. Use the x-prismeai-api-key header instead
(see OrgApiKeyAuth).
Path Parameters
Maximum string length:
128Body
application/json
Default view.
Available options:
view Maximum string length:
32Was this page helpful?