curl --request PATCH \
--url https://api.parley.so/v1/skills/{slug} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"uploadId": "<string>",
"enabled": true
}
'import requests
url = "https://api.parley.so/v1/skills/{slug}"
payload = {
"content": "<string>",
"uploadId": "<string>",
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', uploadId: '<string>', enabled: true})
};
fetch('https://api.parley.so/v1/skills/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.parley.so/v1/skills/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'uploadId' => '<string>',
'enabled' => true
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.parley.so/v1/skills/{slug}"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"uploadId\": \"<string>\",\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://api.parley.so/v1/skills/{slug}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"uploadId\": \"<string>\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/v1/skills/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"uploadId\": \"<string>\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"scope": "organization",
"activation": "auto",
"enabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is invalid.",
"details": {
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid credentials."
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to do this."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Update a skill
Replace a skill’s SKILL.md (content) or everything it holds (uploadId), change when it’s used, or turn it on or off. Omitted fields are left unchanged. A skill’s slug and scope can’t change. Returns 400 INVALID_REFERENCE when uploadId isn’t an upload or nothing was uploaded to it, and 400 INVALID_SKILL when the SKILL.md or archive can’t be read.
curl --request PATCH \
--url https://api.parley.so/v1/skills/{slug} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"uploadId": "<string>",
"enabled": true
}
'import requests
url = "https://api.parley.so/v1/skills/{slug}"
payload = {
"content": "<string>",
"uploadId": "<string>",
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', uploadId: '<string>', enabled: true})
};
fetch('https://api.parley.so/v1/skills/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.parley.so/v1/skills/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'uploadId' => '<string>',
'enabled' => true
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.parley.so/v1/skills/{slug}"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"uploadId\": \"<string>\",\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://api.parley.so/v1/skills/{slug}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"uploadId\": \"<string>\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/v1/skills/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"uploadId\": \"<string>\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"scope": "organization",
"activation": "auto",
"enabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is invalid.",
"details": {
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid credentials."
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to do this."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Authorizations
A Parley API key.
Path Parameters
The skill's slug.
64^[a-z0-9][a-z0-9-]*$Body
The skill's SKILL.md, which replaces the current one and keeps the bundled documents: YAML frontmatter with a name (up to 120 characters) and a description (up to 2,000), then the instructions in markdown, 100,000 characters in all. For an auto skill, the description is what the assistant matches tasks against, so say when to use it. Refer to a bundled document by its path, such as references/engagement-letter.docx.
100000The id of an upload, once its bytes have been PUT to its url, holding the whole skill, which replaces everything it holds: a .skill or .zip archive with SKILL.md at its root or inside one top-level folder, plus any documents under references/ (pdf, doc, docx, md, txt, json, csv, html, pptx, xls, xlsx; up to 100 files and 25 MB), or a single .md file used as SKILL.md. A manifest.yaml in the archive is ignored.
1When the skill is used. auto: Parley's assistant uses it whenever its description fits the task. on-demand: only when someone runs it, from a project's Run Skill list or by typing / in a message.
auto, on-demand Turn the skill on or off.
Response
OK
The skill ID.
1The skill's folder name, chosen when the skill is created. It is how the skill is addressed, and the name the assistant loads it by.
The skill name, from its SKILL.md.
What the skill is for, from its SKILL.md.
Who can use the skill. organization: everyone in the organization. personal: only the person who created it.
organization, personal When the skill is used. auto: Parley's assistant uses it whenever its description fits the task. on-demand: only when someone runs it, from a project's Run Skill list or by typing / in a message.
auto, on-demand Whether the skill is on. Parley never uses a skill that is off.
When the skill was created.
When the skill was last changed.
Was this page helpful?
