Skip to main content
PATCH
/
servers
/
{qualifiedName}
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 server = await client.servers.update('qualifiedName');

console.log(server.namespace);
curl --request PATCH \
--url https://api.smithery.ai/servers/{qualifiedName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"description": "<string>",
"homepage": "<string>",
"repositoryUrl": "<string>",
"backlinkUrl": "<string>",
"license": "<string>",
"iconUrl": "<string>",
"unlisted": true
}
'
import requests

url = "https://api.smithery.ai/servers/{qualifiedName}"

payload = {
"displayName": "<string>",
"description": "<string>",
"homepage": "<string>",
"repositoryUrl": "<string>",
"backlinkUrl": "<string>",
"license": "<string>",
"iconUrl": "<string>",
"unlisted": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smithery.ai/servers/{qualifiedName}",
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([
'displayName' => '<string>',
'description' => '<string>',
'homepage' => '<string>',
'repositoryUrl' => '<string>',
'backlinkUrl' => '<string>',
'license' => '<string>',
'iconUrl' => '<string>',
'unlisted' => 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.smithery.ai/servers/{qualifiedName}"

payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"description\": \"<string>\",\n \"homepage\": \"<string>\",\n \"repositoryUrl\": \"<string>\",\n \"backlinkUrl\": \"<string>\",\n \"license\": \"<string>\",\n \"iconUrl\": \"<string>\",\n \"unlisted\": 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.smithery.ai/servers/{qualifiedName}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"description\": \"<string>\",\n \"homepage\": \"<string>\",\n \"repositoryUrl\": \"<string>\",\n \"backlinkUrl\": \"<string>\",\n \"license\": \"<string>\",\n \"iconUrl\": \"<string>\",\n \"unlisted\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.smithery.ai/servers/{qualifiedName}")

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 \"displayName\": \"<string>\",\n \"description\": \"<string>\",\n \"homepage\": \"<string>\",\n \"repositoryUrl\": \"<string>\",\n \"backlinkUrl\": \"<string>\",\n \"license\": \"<string>\",\n \"iconUrl\": \"<string>\",\n \"unlisted\": true\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "namespace": "<string>",
  "server": "<string>"
}
{
"error": "Server not found"
}
{
"error": "Server not found"
}
{
"error": "Server not found"
}

Authorizations

Authorization
string
header
required

Smithery API key as Bearer token

Path Parameters

qualifiedName
string
required

The server's qualified name (e.g. 'namespace/server' or 'namespace' for namespace-only servers). Use %2F to encode the slash.

Body

application/json
displayName
string
description
string
homepage
string | null
repositoryUrl
string | null
license
string | null
iconUrl
string | null
unlisted
boolean

Response

Server updated

success
boolean
required
namespace
string
required
server
string
required