skills
Create or update a skill
Idempotent endpoint to create or update a GitHub-backed skill. Send application/json with gitUrl.
PUT
/
skills
/
{namespace}
/
{slug}
JavaScript
import Smithery from '@smithery/api';
const client = new Smithery({
apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
});
const response = await client.skills.set('slug', {
namespace: 'namespace',
body: {},
});
console.log(response.id);curl --request PUT \
--url https://api.smithery.ai/skills/{namespace}/{slug} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'import requests
url = "https://api.smithery.ai/skills/{namespace}/{slug}"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smithery.ai/skills/{namespace}/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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"
"net/http"
"io"
)
func main() {
url := "https://api.smithery.ai/skills/{namespace}/{slug}"
req, _ := http.NewRequest("PUT", url, nil)
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.put("https://api.smithery.ai/skills/{namespace}/{slug}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smithery.ai/skills/{namespace}/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"namespace": "<string>",
"slug": "<string>",
"displayName": "<string>",
"description": "<string>",
"gitUrl": "<string>",
"externalStars": 123,
"listed": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"id": "<string>",
"namespace": "<string>",
"slug": "<string>",
"displayName": "<string>",
"description": "<string>",
"gitUrl": "<string>",
"externalStars": 123,
"listed": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Smithery API key as Bearer token
Body
application/json
The body is of type any.
Was this page helpful?
Previous
Delete a skillDelete a skill by namespace and slug. Requires ownership of the namespace.
Next
⌘I
JavaScript
import Smithery from '@smithery/api';
const client = new Smithery({
apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
});
const response = await client.skills.set('slug', {
namespace: 'namespace',
body: {},
});
console.log(response.id);curl --request PUT \
--url https://api.smithery.ai/skills/{namespace}/{slug} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'import requests
url = "https://api.smithery.ai/skills/{namespace}/{slug}"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smithery.ai/skills/{namespace}/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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"
"net/http"
"io"
)
func main() {
url := "https://api.smithery.ai/skills/{namespace}/{slug}"
req, _ := http.NewRequest("PUT", url, nil)
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.put("https://api.smithery.ai/skills/{namespace}/{slug}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smithery.ai/skills/{namespace}/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"namespace": "<string>",
"slug": "<string>",
"displayName": "<string>",
"description": "<string>",
"gitUrl": "<string>",
"externalStars": 123,
"listed": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"id": "<string>",
"namespace": "<string>",
"slug": "<string>",
"displayName": "<string>",
"description": "<string>",
"gitUrl": "<string>",
"externalStars": 123,
"listed": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}