Create a namespace-only server where the namespace is also the server identifier. This endpoint is idempotent - if the server already exists and is owned by the user, returns success.
PUT
/
servers
/
{namespace}
JavaScript
Copy
Ask AI
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.servers.createByNamespace('namespace');
console.log(response.createdAt);
Copy
Ask AI
{
"namespace": "myorg",
"server": "",
"displayName": "My Server",
"description": "A simple server",
"createdAt": "2024-01-01T00:00:00.000Z"
}
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.servers.createByNamespace('namespace');
console.log(response.createdAt);
Copy
Ask AI
{
"namespace": "myorg",
"server": "",
"displayName": "My Server",
"description": "A simple server",
"createdAt": "2024-01-01T00:00:00.000Z"
}