curl --request PATCH \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/artifacts/{artifactId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "Updated greeting message",
"change_summary": "Updated greeting message"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: 'Updated greeting message',
change_summary: 'Updated greeting message'
})
};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/artifacts/{artifactId}', 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}"
payload = {
"content": "Updated greeting message",
"change_summary": "Updated greeting message"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Update artifact content (full replace OR line patches)
Two mutation modes - exactly one of content (full replace,
creates a new version) or patches (line-level operations,
applied atomically) MUST be present. base_version opts into
optimistic concurrency control.
curl --request PATCH \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/artifacts/{artifactId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "Updated greeting message",
"change_summary": "Updated greeting message"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: 'Updated greeting message',
change_summary: 'Updated greeting message'
})
};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/artifacts/{artifactId}', 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}"
payload = {
"content": "Updated greeting message",
"change_summary": "Updated greeting message"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Authorizations
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
128Body
Two mutation modes - exactly one of content (full replace,
creates a new version) or patches (line-level operations,
applied atomically) MUST be present.
Response
New version persisted.
Helper-defined update result - includes the new
current_version, total_versions, and (for patches
mode) the resolved diff/version metadata.
Was this page helpful?