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

# Update a Tagset

> Updates an existing tagset.



## OpenAPI

````yaml PATCH /tagsets/{id}
openapi: 3.1.0
info:
  title: Moonbase REST API
  version: v0
servers:
  - url: https://api.moonbase.ai/v0
security:
  - bearer: []
tags:
  - name: Inboxes
    description: Manage your inboxes, conversations, and messages
  - name: Collections
    description: Manage your collections and items
  - name: Marketing
    description: Manage your marketing campaigns and forms
  - name: Activities
    description: View activities and capture calls
  - name: Library
    description: Manage your meetings, files, and notes
paths:
  /tagsets/{id}:
    patch:
      tags:
        - Library
      summary: Update a tagset
      description: Updates an existing tagset.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The ID of the tagset to update.
          explode: true
      requestBody:
        description: The `TagsetUpdateParams` object containing the fields to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagsetUpdateParams'
            examples:
              Update tagset name:
                summary: Update tagset name
                value:
                  name: Customer Support
                  description: Updated description
              Update tags:
                summary: Update tags
                value:
                  tags:
                    - id: 1CLJt2v5pkpkAnvdgXfEcF
                      name: Bug Report
                      color: orange
                    - name: Feature Request
                      color: purple
              Replace associations:
                summary: Replace associations
                value:
                  associations:
                    - type: calls
                    - type: inbox
                      id: 1CLJt2v5pkpkAnvdgXfEcF
      responses:
        '200':
          description: Update succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tagset'
              examples:
                Update tagset name:
                  summary: Update tagset name
                  value:
                    id: 1CLJt2v5aNd8G5SGzEaeVU
                    type: tagset
                    name: Customer Support
                    description: Updated description
                    tags:
                      - id: 1CLJt2v5pkpkAnvdgXfEcF
                        type: tag
                        name: Bug
                        color: red
                    associations: []
                    created_at: '2025-02-17T16:00:00.000Z'
                    updated_at: '2025-02-17T16:00:00.000Z'
                Update tags:
                  summary: Update tags
                  value:
                    id: 1CLJt2v5aNd8G5SGzEaeVU
                    type: tagset
                    name: Support
                    tags:
                      - id: 1CLJt2v5pkpkAnvdgXfEcF
                        type: tag
                        name: Bug Report
                        color: orange
                      - id: 1CLJt2v6ZuRbtwPhmQtzxa
                        type: tag
                        name: Feature Request
                        color: purple
                    associations: []
                    created_at: '2025-02-17T16:00:00.000Z'
                    updated_at: '2025-02-17T16:00:00.000Z'
                Replace associations:
                  summary: Replace associations
                  value:
                    id: 1CLJt2v5aNd8G5SGzEaeVU
                    type: tagset
                    name: Support
                    tags: []
                    associations:
                      - type: calls
                      - id: 1CLJt2v5pkpkAnvdgXfEcF
                        type: inbox
                    created_at: '2025-02-17T16:00:00.000Z'
                    updated_at: '2025-02-17T16:00:00.000Z'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '400'
                        title: Bad Request
                        detail: >-
                          The request could not be understood due to malformed
                          syntax or invalid parameters.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '401'
                        title: Unauthorized
                        detail: >-
                          Invalid or missing API key or JWT. You should provide
                          your Moonbase API Key or JWT in the authorization
                          header, in the format: "Authorization: Bearer
                          MOONBASE_API_KEY"
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '403'
                        title: Forbidden
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Not found:
                  summary: Not found
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '404'
                        title: Not Found
        '422':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                No name:
                  summary: No name
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '422'
                        title: Unprocessable Entity
                        detail: Name can't be blank
                        source:
                          pointer: /name
                Cannot remove tag in use:
                  summary: Cannot remove tag in use
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '422'
                        title: Unprocessable Entity
                        detail: >-
                          Cannot remove Tag 'Bug' (id '1CLJt2v5pkpkAnvdgXfEcF')
                          because it is in use.
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '429'
                        title: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '500'
                        title: Internal Server Error
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '503'
                        title: Service Unavailable
                        detail: >-
                          The service is temporarily unavailable, please try
                          again later.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Moonbase from '@moonbaseai/sdk';

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

            const tagset = await client.tagsets.update('id', {
              description: 'Updated description',
              name: 'Customer Support',
            });

            console.log(tagset.id);
        - lang: Python
          source: |-
            import os
            from moonbase import Moonbase

            client = Moonbase(
                api_key=os.environ.get("MOONBASE_API_KEY"),  # This is the default and can be omitted
            )
            tagset = client.tagsets.update(
                id="id",
                description="Updated description",
                name="Customer Support",
            )
            print(tagset.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/moonbaseai/moonbase-sdk-go\"\n\t\"github.com/moonbaseai/moonbase-sdk-go/option\"\n)\n\nfunc main() {\n\tclient := moonbase.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttagset, err := client.Tagsets.Update(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tmoonbase.TagsetUpdateParams{\n\t\t\tDescription: moonbase.String(\"Updated description\"),\n\t\t\tName:        moonbase.String(\"Customer Support\"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", tagset.ID)\n}\n"
        - lang: Ruby
          source: |-
            require "moonbase"

            moonbase = Moonbase::Client.new(api_key: "My API Key")

            tagset = moonbase.tagsets.update("id")

            puts(tagset)
components:
  schemas:
    TagsetUpdateParams:
      title: TagsetUpdateParams
      description: Parameters for updating a tagset.
      type: object
      properties:
        name:
          description: The new name of the tagset.
          type: string
        description:
          description: An updated description of the tagset.
          type: string
        tags:
          description: >-
            Optional full list of tags for this tagset. If provided, tags are
            ordered by array position.
          type: array
          items:
            $ref: '#/components/schemas/TagParam'
        associations:
          description: >-
            Optional full list of associations for this tagset. If provided, it
            replaces all existing associations. An empty array clears all
            associations, and omitting it preserves existing associations.
          type: array
          items:
            $ref: '#/components/schemas/TagsetAssociation'
      required: []
    Tagset:
      title: Tagset
      description: >-
        A Tagset is a collection of `Tag` objects whose tags can be applied to
        conversations, calls, and meetings.
      type: object
      properties:
        type:
          description: >-
            String representing the object’s type. Always `tagset` for this
            object.
          type: string
          const: tagset
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The name of the tagset.
          type: string
        description:
          description: An optional description of the tagset's purpose.
          type: string
        tags:
          description: A list of `Tag` objects belonging to this tagset.
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        associations:
          description: >-
            Where a tagset is available (`calls`, `meetings`, or `inbox` with an
            inbox ID).
          type: array
          items:
            $ref: '#/components/schemas/TagsetAssociation'
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
      required:
        - name
        - type
        - id
        - tags
        - associations
        - created_at
        - updated_at
    Errors:
      title: Errors
      description: >-
        The Errors object is a container that holds multiple Error objects when
        an API request encounters several validation or processing issues. This
        allows the API to return comprehensive feedback about all problems
        encountered in a single response.
      type: object
      properties:
        type:
          type: string
          const: errors
        errors:
          description: A list of `Error` objects.
          type: array
          items:
            $ref: '#/components/schemas/Error'
      required:
        - type
    TagParam:
      title: TagParam
      description: Parameters for creating or updating a tag within a tagset.
      type: object
      properties:
        id:
          description: >-
            Existing tag identifier. Include to update an existing tag, omit to
            create a new tag.
          type: string
        name:
          description: The name of the tag.
          type: string
        color:
          $ref: '#/components/schemas/NamedColor'
          description: The color for the tag.
      required:
        - name
        - color
    TagsetAssociation:
      title: TagsetAssociation
      description: Where a tagset is available. Associations are discriminated by `type`.
      oneOf:
        - $ref: '#/components/schemas/TagsetCallsAssociation'
        - $ref: '#/components/schemas/TagsetMeetingsAssociation'
        - $ref: '#/components/schemas/TagsetInboxAssociation'
      discriminator:
        propertyName: type
        mapping:
          calls:
            $ref: '#/components/schemas/TagsetCallsAssociation'
          meetings:
            $ref: '#/components/schemas/TagsetMeetingsAssociation'
          inbox:
            $ref: '#/components/schemas/TagsetInboxAssociation'
    Tag:
      title: Tag
      description: >-
        A Tag is a label that can be applied to supported resources (such as
        conversations, calls, and meetings) for organization and filtering.
      type: object
      properties:
        type:
          description: String representing the object’s type. Always `tag` for this object.
          type: string
          const: tag
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The name of the tag.
          type: string
        color:
          $ref: '#/components/schemas/NamedColor'
          description: The color for the tag.
      required:
        - name
        - type
        - id
        - color
    Error:
      title: Error
      description: >-
        The Error object represents a single error that occurred during API
        request processing. It provides detailed information about what went
        wrong, including a unique identifier, status code, and human-readable
        descriptions to help developers understand and resolve the issue.
      type: object
      properties:
        type:
          type: string
          const: error
        id:
          description: A unique identifier for this specific error instance.
          type: string
        status:
          description: The HTTP status code for this problem, as a string.
          type: string
        code:
          description: An application-specific error code string.
          type: string
        title:
          description: A short, human-readable summary of the problem.
          type: string
        detail:
          description: A human-readable explanation of this specific error.
          type: string
        source:
          $ref: '#/components/schemas/ErrorSource'
          description: >-
            An object containing more specific information about the part of the
            request that caused the error.
        meta:
          type: object
          additionalProperties: true
      required:
        - type
    NamedColor:
      type: string
      enum:
        - amber
        - blue
        - cyan
        - emerald
        - fuchsia
        - green
        - indigo
        - lime
        - lunar
        - orange
        - pink
        - purple
        - red
        - rose
        - sky
        - teal
        - violet
        - yellow
      description: >-
        One of Moonbase's standard color names. Moonbase renders these
        consistently across light and dark modes.
    TagsetCallsAssociation:
      title: Calls
      description: Makes this tagset available for calls.
      type: object
      properties:
        type:
          description: >-
            String representing the association type. Always `calls` for call
            tagset associations.
          type: string
          const: calls
      required:
        - type
    TagsetMeetingsAssociation:
      title: Meetings
      description: Makes this tagset available for meetings.
      type: object
      properties:
        type:
          description: >-
            String representing the association type. Always `meetings` for
            meeting tagset associations.
          type: string
          const: meetings
      required:
        - type
    TagsetInboxAssociation:
      title: Inbox
      description: Makes this tagset available in an inbox.
      type: object
      properties:
        type:
          description: >-
            String representing the association type. Always `inbox` for inbox
            tagset associations.
          type: string
          const: inbox
        id:
          description: Unique identifier of the inbox this tagset is assigned to.
          type: string
      required:
        - type
        - id
    ErrorSource:
      title: ErrorSource
      description: >-
        The ErrorSource object provides additional context about the specific
        part of an API request that caused an error. It can point to either a
        field in the request document or a query parameter that contains invalid
        data.
      type: object
      properties:
        pointer:
          description: >-
            A JSON Pointer [RFC6901] to the associated entity in the request
            document.
          type: string
        parameter:
          description: A string indicating which URI query parameter caused the error.
          type: string
      required: []
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Your Moonbase API key.

````