> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentset.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update hosting configuration

> Update the hosting configuration for a namespace. If there is no change, return it as it is.



## OpenAPI

````yaml patch /v1/namespace/{namespaceId}/hosting
openapi: 3.1.1
info:
  title: AgentsetAPI
  description: Agentset is agentic rag-as-a-service
  version: 0.0.1
  contact:
    name: Agentset Support
    email: support@agentset.ai
    url: https://api.agentset.ai/
  license:
    name: MIT License
    url: https://github.com/agentset-ai/agentset/blob/main/LICENSE.md
servers:
  - url: https://api.agentset.ai
    description: Production API
security: []
paths:
  /v1/namespace/{namespaceId}/hosting:
    patch:
      tags:
        - Hosting
      summary: Update hosting configuration
      description: >-
        Update the hosting configuration for a namespace. If there is no change,
        return it as it is.
      operationId: updateHosting
      parameters:
        - $ref: '#/components/parameters/NamespaceIdRef'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  minLength: 1
                slug:
                  type: string
                  minLength: 2
                  maxLength: 48
                logo:
                  anyOf:
                    - anyOf:
                        - type: string
                          pattern: ^data:image\/(png|jpeg|jpg|gif|webp);base64,
                        - type: string
                          format: uri
                    - type: 'null'
                ogTitle:
                  type: string
                  maxLength: 70
                ogDescription:
                  type: string
                  maxLength: 200
                ogImage:
                  anyOf:
                    - anyOf:
                        - type: string
                          pattern: ^data:image\/(png|jpeg|jpg|gif|webp);base64,
                        - type: string
                          format: uri
                    - type: 'null'
                protected:
                  type: boolean
                allowedEmails:
                  type: array
                  items:
                    type: string
                    format: email
                    pattern: >-
                      ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                allowedEmailDomains:
                  type: array
                  items:
                    type: string
                systemPrompt:
                  type: string
                exampleQuestions:
                  maxItems: 4
                  type: array
                  items:
                    type: string
                exampleSearchQueries:
                  maxItems: 4
                  type: array
                  items:
                    type: string
                welcomeMessage:
                  type: string
                citationMetadataPath:
                  type: string
                searchEnabled:
                  type: boolean
                rerankModel:
                  type: string
                  enum:
                    - 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:
                  type: string
                  enum:
                    - openai:gpt-4.1
                    - openai:gpt-5.2
                    - openai:gpt-5.1
                    - openai:gpt-5
                    - openai:gpt-5-mini
                    - openai:gpt-5-nano
                topK:
                  type: integer
                  minimum: 1
                  maximum: 100
                rerankLimit:
                  type: integer
                  minimum: 1
                  maximum: 100
      responses:
        '200':
          description: The updated hosting configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/hosting'
                required:
                  - success
                  - data
                additionalProperties: false
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          $ref: '#/components/responses/409'
        '410':
          $ref: '#/components/responses/410'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      security:
        - token: []
      x-codeSamples:
        - lang: TypeScript
          source: |

            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);
        - lang: python
          label: Python (SDK)
          source: |-
            from agentset import Agentset


            with Agentset(
                namespace_id="ns_123",
                token="AGENTSET_API_KEY",
            ) as a_client:

                res = a_client.hosting.update()

                # Handle response
                print(res)
components:
  parameters:
    NamespaceIdRef:
      in: path
      name: namespaceId
      schema:
        type: string
        examples:
          - ns_123
        description: The id of the namespace (prefixed with ns_)
      x-speakeasy-globals-hidden: true
      required: true
      description: The id of the namespace (prefixed with ns_)
  schemas:
    hosting:
      type: object
      properties:
        namespaceId:
          type: string
          description: The ID of the namespace this hosting belongs to.
        title:
          default: null
          description: The title displayed on the hosted interface.
          anyOf:
            - type: string
            - type: 'null'
        slug:
          default: null
          description: The unique slug for accessing the hosted interface.
          anyOf:
            - type: string
            - type: 'null'
        logo:
          default: null
          description: The URL or base64 encoded image of the logo.
          anyOf:
            - type: string
            - type: 'null'
        ogTitle:
          default: null
          description: Custom Open Graph title for social media sharing.
          anyOf:
            - type: string
            - type: 'null'
        ogDescription:
          default: null
          description: Custom Open Graph description for social media sharing.
          anyOf:
            - type: string
            - type: 'null'
        ogImage:
          default: null
          description: Custom Open Graph image URL for social media sharing.
          anyOf:
            - type: string
            - type: 'null'
        systemPrompt:
          default: null
          description: The system prompt used for the chat interface.
          anyOf:
            - type: string
            - type: 'null'
        exampleQuestions:
          default: []
          description: Example questions to display to users in the chat interface.
          type: array
          items:
            type: string
        exampleSearchQueries:
          default: []
          description: Example search queries to display to users in the search interface.
          type: array
          items:
            type: string
        welcomeMessage:
          default: null
          description: Welcome message displayed to users.
          anyOf:
            - type: string
            - type: 'null'
        citationMetadataPath:
          default: null
          description: Path to metadata field used for citations.
          anyOf:
            - type: string
            - type: 'null'
        searchEnabled:
          default: true
          description: Whether search functionality is enabled.
          type: boolean
        rerankConfig:
          description: Configuration for the reranking model.
        llmConfig:
          description: Configuration for the LLM model.
        topK:
          default: 50
          description: Number of documents to retrieve from vector store.
          type: integer
          minimum: 1
          maximum: 100
        protected:
          default: true
          description: Whether the hosted interface is protected by authentication.
          type: boolean
        allowedEmails:
          default: []
          description: List of allowed email addresses (when protected is true).
          type: array
          items:
            type: string
        allowedEmailDomains:
          default: []
          description: List of allowed email domains (when protected is true).
          type: array
          items:
            type: string
        createdAt:
          description: The date and time the hosting was created.
          type: string
        updatedAt:
          description: The date and time the hosting was last updated.
          type: string
      required:
        - namespaceId
        - title
        - slug
        - logo
        - ogTitle
        - ogDescription
        - ogImage
        - systemPrompt
        - exampleQuestions
        - exampleSearchQueries
        - welcomeMessage
        - citationMetadataPath
        - searchEnabled
        - rerankConfig
        - llmConfig
        - topK
        - protected
        - allowedEmails
        - allowedEmailDomains
        - createdAt
        - updatedAt
      additionalProperties: false
      title: Hosting
  responses:
    '400':
      description: >-
        The server cannot or will not process the request due to something that
        is perceived to be a client error (e.g., malformed request syntax,
        invalid request message framing, or deceptive request routing).
      content:
        application/json:
          schema:
            x-speakeasy-name-override: BadRequest
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - bad_request
                    description: A short code indicating the error code returned.
                    example: bad_request
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.agentset.ai/api-reference/errors#bad-request
                required:
                  - code
                  - message
            required:
              - success
              - error
    '401':
      description: >-
        Although the HTTP standard specifies "unauthorized", semantically this
        response means "unauthenticated". That is, the client must authenticate
        itself to get the requested response.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: Unauthorized
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unauthorized
                    description: A short code indicating the error code returned.
                    example: unauthorized
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.agentset.ai/api-reference/errors#unauthorized
                required:
                  - code
                  - message
            required:
              - success
              - error
    '403':
      description: >-
        The client does not have access rights to the content; that is, it is
        unauthorized, so the server is refusing to give the requested resource.
        Unlike 401 Unauthorized, the client's identity is known to the server.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: Forbidden
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - forbidden
                    description: A short code indicating the error code returned.
                    example: forbidden
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.agentset.ai/api-reference/errors#forbidden
                required:
                  - code
                  - message
            required:
              - success
              - error
    '404':
      description: The server cannot find the requested resource.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: NotFound
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - not_found
                    description: A short code indicating the error code returned.
                    example: not_found
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.agentset.ai/api-reference/errors#not-found
                required:
                  - code
                  - message
            required:
              - success
              - error
    '409':
      description: >-
        This response is sent when a request conflicts with the current state of
        the server.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: Conflict
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - conflict
                    description: A short code indicating the error code returned.
                    example: conflict
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.agentset.ai/api-reference/errors#conflict
                required:
                  - code
                  - message
            required:
              - success
              - error
    '410':
      description: >-
        This response is sent when the requested content has been permanently
        deleted from server, with no forwarding address.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: InviteExpired
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - invite_expired
                    description: A short code indicating the error code returned.
                    example: invite_expired
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: >-
                      https://docs.agentset.ai/api-reference/errors#invite-expired
                required:
                  - code
                  - message
            required:
              - success
              - error
    '422':
      description: >-
        The request was well-formed but was unable to be followed due to
        semantic errors.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: UnprocessableEntity
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unprocessable_entity
                    description: A short code indicating the error code returned.
                    example: unprocessable_entity
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: >-
                      https://docs.agentset.ai/api-reference/errors#unprocessable-entity
                required:
                  - code
                  - message
            required:
              - success
              - error
    '429':
      description: >-
        The user has sent too many requests in a given amount of time ("rate
        limiting")
      content:
        application/json:
          schema:
            x-speakeasy-name-override: RateLimitExceeded
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - rate_limit_exceeded
                    description: A short code indicating the error code returned.
                    example: rate_limit_exceeded
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: >-
                      https://docs.agentset.ai/api-reference/errors#rate-limit_exceeded
                required:
                  - code
                  - message
            required:
              - success
              - error
    '500':
      description: The server has encountered a situation it does not know how to handle.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: InternalServerError
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - internal_server_error
                    description: A short code indicating the error code returned.
                    example: internal_server_error
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: >-
                      https://docs.agentset.ai/api-reference/errors#internal-server_error
                required:
                  - code
                  - message
            required:
              - success
              - error
  securitySchemes:
    token:
      type: http
      description: Default authentication mechanism
      scheme: bearer
      x-speakeasy-example: AGENTSET_API_KEY

````