cURL
curl -X PUT "https://app.cotool.ai/api/skills/:skillId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","description":"string","instructionPrompt":"string","requiredTools":["string"],"references":[{"filename":"string","directory":"references","sizeBytes":0,"content":"string"}]}'import requests
url = "https://app.cotool.ai/api/skills/{skillId}"
payload = {
"name": "<string>",
"description": "<string>",
"instructionPrompt": "<string>",
"requiredTools": ["<string>"],
"references": [
{
"filename": "<string>",
"content": "<string>",
"sizeBytes": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
instructionPrompt: '<string>',
requiredTools: ['<string>'],
references: [{filename: '<string>', content: '<string>', sizeBytes: 1}]
})
};
fetch('https://app.cotool.ai/api/skills/{skillId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.put("https://app.cotool.ai/api/skills/{skillId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructionPrompt\": \"<string>\",\n \"requiredTools\": [\n \"<string>\"\n ],\n \"references\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"sizeBytes\": 1\n }\n ]\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/skills/{skillId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructionPrompt\": \"<string>\",\n \"requiredTools\": [\n \"<string>\"\n ],\n \"references\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"sizeBytes\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"organizationId": "<string>",
"name": "<string>",
"description": "<string>",
"requiredTools": [
"<string>"
],
"userId": "<string>",
"createdByUserId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>",
"source": {
"type": "user-generated"
},
"instructionPrompt": "<string>",
"updatedByUserId": "<string>",
"createdBy": {
"name": "<string>",
"imageUrl": "<string>"
},
"updatedBy": {
"name": "<string>",
"imageUrl": "<string>"
},
"displayName": "<string>",
"usedByAgentCount": 123,
"invocationCount30d": 123,
"currentVersion": 123,
"references": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"skillVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"directory": "references",
"sizeBytes": 1,
"content": "<string>",
"createdAt": "<string>"
}
]
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Skills
Update skill
Update an existing skill.
PUT
/
api
/
skills
/
{skillId}
cURL
curl -X PUT "https://app.cotool.ai/api/skills/:skillId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","description":"string","instructionPrompt":"string","requiredTools":["string"],"references":[{"filename":"string","directory":"references","sizeBytes":0,"content":"string"}]}'import requests
url = "https://app.cotool.ai/api/skills/{skillId}"
payload = {
"name": "<string>",
"description": "<string>",
"instructionPrompt": "<string>",
"requiredTools": ["<string>"],
"references": [
{
"filename": "<string>",
"content": "<string>",
"sizeBytes": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
instructionPrompt: '<string>',
requiredTools: ['<string>'],
references: [{filename: '<string>', content: '<string>', sizeBytes: 1}]
})
};
fetch('https://app.cotool.ai/api/skills/{skillId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.put("https://app.cotool.ai/api/skills/{skillId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructionPrompt\": \"<string>\",\n \"requiredTools\": [\n \"<string>\"\n ],\n \"references\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"sizeBytes\": 1\n }\n ]\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/skills/{skillId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructionPrompt\": \"<string>\",\n \"requiredTools\": [\n \"<string>\"\n ],\n \"references\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"sizeBytes\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"organizationId": "<string>",
"name": "<string>",
"description": "<string>",
"requiredTools": [
"<string>"
],
"userId": "<string>",
"createdByUserId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>",
"source": {
"type": "user-generated"
},
"instructionPrompt": "<string>",
"updatedByUserId": "<string>",
"createdBy": {
"name": "<string>",
"imageUrl": "<string>"
},
"updatedBy": {
"name": "<string>",
"imageUrl": "<string>"
},
"displayName": "<string>",
"usedByAgentCount": 123,
"invocationCount30d": 123,
"currentVersion": 123,
"references": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"skillVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"directory": "references",
"sizeBytes": 1,
"content": "<string>",
"createdAt": "<string>"
}
]
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Body
application/json
Response
Successful response
Was this page helpful?
⌘I