Skip to main content
PATCH
/
v1
/
namespace
/
{namespaceId}
/
hosting
TypeScript
import { Agentset } from "agentset";

const agentset = new Agentset({ apiKey: 'agentset_xxx' });
const ns = agentset.namespace('ns_xxx');

const updatedHosting = await ns.hosting.update({
  title: "My Knowledge Base",
  welcomeMessage: "Welcome to my knowledge base!",
  searchEnabled: true,
});
console.log(updatedHosting);
{
  "success": true,
  "data": {
    "namespaceId": "<string>",
    "title": "<string>",
    "slug": "<string>",
    "logo": "<string>",
    "systemPrompt": "<string>",
    "exampleQuestions": [],
    "exampleSearchQueries": [],
    "welcomeMessage": "<string>",
    "citationMetadataPath": "<string>",
    "searchEnabled": true,
    "rerankConfig": {
      "model": "cohere:rerank-v3.5"
    },
    "llmConfig": {
      "model": "openai:gpt-4.1"
    },
    "protected": true,
    "allowedEmails": [],
    "allowedEmailDomains": [],
    "createdAt": "<string>",
    "updatedAt": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

namespaceId
string
required

The id of the namespace (prefixed with ns_)

Examples:

"ns_123"

Body

application/json
title
string
Minimum length: 1
slug
string
Required string length: 2 - 48
protected
boolean
allowedEmails
string<email>[]
allowedEmailDomains
string[]
systemPrompt
string
exampleQuestions
string[]
Maximum length: 4
exampleSearchQueries
string[]
Maximum length: 4
welcomeMessage
string
citationMetadataPath
string
searchEnabled
boolean
rerankModel
enum<string>
Available options:
cohere:rerank-v3.5,
cohere:rerank-english-v3.0,
cohere:rerank-multilingual-v3.0,
zeroentropy:zerank-1,
zeroentropy:zerank-1-small
llmModel
enum<string>
Available options:
openai:gpt-4.1,
openai:gpt-5,
openai:gpt-5-mini,
openai:gpt-5-nano

Response

The updated hosting configuration

success
boolean
required
data
object
required
I