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>",
    "ogTitle": "<string>",
    "ogDescription": "<string>",
    "ogImage": "<string>",
    "systemPrompt": "<string>",
    "exampleQuestions": [],
    "exampleSearchQueries": [],
    "welcomeMessage": "<string>",
    "citationMetadataPath": "<string>",
    "searchEnabled": true,
    "rerankConfig": "<unknown>",
    "llmConfig": "<unknown>",
    "topK": 50,
    "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_)

Example:

"ns_123"

Body

application/json
title
string
Minimum string length: 1
slug
string
Required string length: 2 - 48
logo
Pattern: ^data:image\/(png|jpeg|jpg|gif|webp);base64,
ogTitle
string
Maximum string length: 70
ogDescription
string
Maximum string length: 200
ogImage
Pattern: ^data:image\/(png|jpeg|jpg|gif|webp);base64,
protected
boolean
allowedEmails
string<email>[]
Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
allowedEmailDomains
string[]
systemPrompt
string
exampleQuestions
string[]
Maximum array length: 4
exampleSearchQueries
string[]
Maximum array length: 4
welcomeMessage
string
citationMetadataPath
string
searchEnabled
boolean
rerankModel
enum<string>
Available options:
cohere:rerank-v4.0-pro,
cohere:rerank-v4.0-fast,
cohere:rerank-v3.5,
cohere:rerank-english-v3.0,
cohere:rerank-multilingual-v3.0,
zeroentropy:zerank-2,
zeroentropy:zerank-1,
zeroentropy:zerank-1-small
llmModel
enum<string>
Available options:
openai:gpt-4.1,
openai:gpt-5.2,
openai:gpt-5.1,
openai:gpt-5,
openai:gpt-5-mini,
openai:gpt-5-nano
topK
integer
Required range: 1 <= x <= 100
rerankLimit
integer
Required range: 1 <= x <= 100

Response

The updated hosting configuration

success
boolean
required
data
Hosting · object
required