curl --request PUT \
--url https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>'})
};
fetch('https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path}"
payload = { "content": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path}"
payload := strings.NewReader("{\n \"content\": \"<string>\"\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\"\n}")
.asString();{
"path": "<string>",
"size": 123,
"mimeType": "<string>"
}Create or replace a skill file
Create a new text file in the skill’s folder or fully replace an existing one. Parent folders are created implicitly by the path. Writing to SKILL.md replaces the whole file including its frontmatter; when the new frontmatter contains a valid description, the skill’s metadata is synced to it. Prefer Update a skill with instructions for SKILL.md changes — it keeps the frontmatter consistent automatically. Only text files can be written; binary assets are not supported via the API.
curl --request PUT \
--url https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>'})
};
fetch('https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path}"
payload = { "content": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path}"
payload := strings.NewReader("{\n \"content\": \"<string>\"\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/skills/{skillId}/files/{path}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\"\n}")
.asString();{
"path": "<string>",
"size": 123,
"mimeType": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the space the skill belongs to.
2 - 6Unique ID of the skill.
Relative path of the file within the skill folder. Text files only — the extension must be one of: .md, .py, .txt, .json, .yaml, .yml, .csv, .html, .svg.
1 - 512^[a-zA-Z0-9_\-./]+$Body
Full text content of the file (UTF-8). The provided content fully replaces the file.