Update a skill
Partial update. When clientRevision is supplied the update is applied only if it is newer than the stored revision — this orders concurrent PATCHes (e.g. an in-flight autosave racing the Skills panel’s unload flush) so an older request landing last cannot revert newer values. A stale revision returns the current row.
curl --request PATCH \
--url https://api.lusor.ai/v1/skills/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"appPackage": "<string>",
"resultSchema": {},
"folder": "<string>",
"clientRevision": 4503599627370495
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
tags: ['<string>'],
appPackage: '<string>',
resultSchema: {},
folder: '<string>',
clientRevision: 4503599627370495
})
};
fetch('https://api.lusor.ai/v1/skills/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/skills/{id}"
payload = {
"title": "<string>",
"content": "<string>",
"tags": ["<string>"],
"appPackage": "<string>",
"resultSchema": {},
"folder": "<string>",
"clientRevision": 4503599627370495
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"userId": "<string>",
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"folder": "<string>",
"clientRevision": 123,
"isPublic": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"orgId": "<string>",
"appPackage": "<string>"
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Workspace API key, created in the dashboard under Settings → API Keys.
Path Parameters
Skill UUID.
Body
1 - 20020000201 - 64Send null to clear the package association.
1 - 256Folder grouping label; send null to clear.
1 - 120Monotonic client revision for update ordering.
0 <= x <= 9007199254740991Response
Updated skill (or current row when the revision was stale)
Markdown skill document.
Optional folder grouping label shown in the skills panel tree.
Persisted autosave revision. Autosave clients should seed their next clientRevision above this value (see PATCH).
Was this page helpful?
curl --request PATCH \
--url https://api.lusor.ai/v1/skills/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"appPackage": "<string>",
"resultSchema": {},
"folder": "<string>",
"clientRevision": 4503599627370495
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
tags: ['<string>'],
appPackage: '<string>',
resultSchema: {},
folder: '<string>',
clientRevision: 4503599627370495
})
};
fetch('https://api.lusor.ai/v1/skills/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/skills/{id}"
payload = {
"title": "<string>",
"content": "<string>",
"tags": ["<string>"],
"appPackage": "<string>",
"resultSchema": {},
"folder": "<string>",
"clientRevision": 4503599627370495
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"userId": "<string>",
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"folder": "<string>",
"clientRevision": 123,
"isPublic": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"orgId": "<string>",
"appPackage": "<string>"
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}
