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

# Change a namespace's settings

> Only the fields you send are changed; anything omitted is left as it is, so `{}` changes nothing. Sending `instructions: null`, or an empty or whitespace-only string, clears them and returns summaries to the neutral default.

Instructions are capped at 2000 characters. A longer note is refused rather than truncated, because a note cut mid-sentence is a worse steer than none. A change reaches each summary the next time that summary is regenerated, not immediately.



## OpenAPI

````yaml /openapi/source/external/agent-memory/agent-memory.json patch /ai/memory/namespaces/{namespace}/settings
openapi: 3.1.0
info:
  version: 1.0.0
  title: Telnyx API
  x-latency-category: interactive
  x-endpoint-cost: light
  description: >-
    Long-term memory for AI agents. A profile per user, caller, or agent: write
    memories in with `ingest` or `remember`, and recall them with `recall`.
    Facts are extracted, and contradictions resolve to the newest.
servers:
  - url: https://api.telnyx.com/v2
    description: Telnyx API v2
security:
  - bearerAuth: []
tags:
  - name: Memory
    description: Write memories into a profile and recall them.
  - name: Profiles
    description: What a namespace and a profile hold.
  - name: Sources
    description: What a profile stored, and what its memories came from.
  - name: Operations
    description: Whether a write has finished.
  - name: Settings
    description: How a namespace's summaries are written.
paths:
  /ai/memory/namespaces/{namespace}/settings:
    patch:
      tags:
        - Settings
      summary: Change a namespace's settings
      description: >-
        Only the fields you send are changed; anything omitted is left as it is,
        so `{}` changes nothing. Sending `instructions: null`, or an empty or
        whitespace-only string, clears them and returns summaries to the neutral
        default.


        Instructions are capped at 2000 characters. A longer note is refused
        rather than truncated, because a note cut mid-sentence is a worse steer
        than none. A change reaches each summary the next time that summary is
        regenerated, not immediately.
      operationId: UpdateNamespaceSettings
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            type: string
            description: The namespace. `default` exists for every organization.
          description: The namespace. `default` exists for every organization.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NamespaceSettingsPatch'
            example:
              summary:
                instructions: Lead with the customer's plan tier. Keep it under 100 words.
      responses:
        '200':
          description: The settings as stored
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NamespaceSettingsResponse'
              example:
                data:
                  summary:
                    instructions: >-
                      Lead with the customer's plan tier. Keep it under 100
                      words.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: '10009'
                    title: Authentication failed
                    detail: Could not find any usable credentials in the request.
                    source:
                      pointer: /
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10009
        '404':
          description: The namespace does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: namespace_not_found
                    detail: no such namespace
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: invalid_instructions
                    detail: instructions must be at most 2000 characters
        '502':
          description: Upstream error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: upstream_error
                    detail: the memory dataplane is unavailable
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.ai.memory.namespaces.settings.patchAll('namespace', {
              summary: 'summary',
            });


            console.log(response.data);
        - lang: Python
          source: |
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.ai.memory.namespaces.settings.patch_all(
                namespace="namespace",
                summary="summary",
            )
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.AI.Memory.Namespaces.Settings.PatchAll(\n\t\tcontext.TODO(),\n\t\t\"namespace\",\n\t\ttelnyx.AIMemoryNamespaceSettingPatchAllParams{\n\t\t\tSummary: telnyx.String(\"summary\"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.ai.memory.namespaces.settings.SettingPatchAllParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    SettingPatchAllParams params = SettingPatchAllParams.builder()
                        .summary("summary")
                        .build();
                    var response = client.ai().memory().namespaces().settings().patchAll("namespace", params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            response =
            telnyx.ai.memory.namespaces.settings.patch_all("namespace", summary:
            "summary")


            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $response = $client->ai->memory->namespaces->settings->patchAll(
                'namespace',
                summary: 'summary',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx ai:memory:namespaces:settings patch-all \
              --api-key 'My API Key' \
              --namespace namespace \
              --summary summary
components:
  schemas:
    NamespaceSettingsPatch:
      properties:
        summary:
          anyOf:
            - $ref: '#/components/schemas/SummarySettingsPatch'
            - type: 'null'
          description: Summary settings to change. Omit to change nothing.
      type: object
      title: NamespaceSettingsPatch
    NamespaceSettingsResponse:
      properties:
        data:
          $ref: '#/components/schemas/NamespaceSettings'
      type: object
      required:
        - data
      title: NamespaceSettingsResponse
    TelnyxErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/TelnyxError'
    SummarySettingsPatch:
      properties:
        instructions:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Instructions
          description: >-
            Replace the namespace's summary instructions. Null or empty clears
            them and returns to the neutral default. Omit the field to leave the
            current instructions unchanged.
      type: object
      title: SummarySettingsPatch
      description: >-
        A partial update to a namespace's summary settings.


        Only the fields present in the request are changed; the rest are left as

        they are. Sending `instructions: null` (or empty) clears the
        instructions.
    NamespaceSettings:
      properties:
        summary:
          $ref: '#/components/schemas/SummarySettings'
          description: Settings that shape this namespace's summaries.
      type: object
      title: NamespaceSettings
      description: A namespace's settings, grouped by what they affect.
    TelnyxError:
      type: object
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              type: string
        meta:
          type: object
          properties:
            url:
              type: string
    SummarySettings:
      properties:
        instructions:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Instructions
          description: >-
            Free-form instructions that influence how this namespace's summaries
            are written, shared by every profile in the namespace. How you use
            them is up to you -- they steer the outcome, so try a phrasing and
            see how the summary comes out. Advisory: they steer the summary but
            never override or deny a profile's own facts, and they do not affect
            recall. Null or empty means none are set, and summaries use the
            neutral default. A change reaches each summary the next time it is
            regenerated.
      type: object
      title: SummarySettings
      description: A namespace's summary settings, shared by every profile in it.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API key

````