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

# Update session motive

> Renames a close motive (title and/or description). Managers and owners. The key never changes.



## OpenAPI

````yaml /api/services-api.yaml patch /v1/tenants/{tenantID}/settings/session-motives/{motiveID}
openapi: 3.0.3
info:
  description: >-
    Talqui is an omnichannel customer service platform that unifies
    conversations from WhatsApp, Instagram, Telegram, and many other channels
    into a single attendant panel, alongside a broader ecosystem of plugins and
    integrations. This API gives developers programmatic access to Talqui's
    services layer, exposing the operations needed to read and manage tenants,
    conversations, plugins, and related resources that power that platform.


    Authentication is available on behalf of an Operator (the default for this
    API), a Plugin Connection, or a Plugin — see the [Talqui authentication
    guide](https://docs.talqui.chat/guides/introduction/authentication/) for how
    each token is obtained and when to use it.


    Need help or have questions not covered here? Reach out to
    support@talqui.com.
  license:
    name: ISC
    url: https://opensource.org/license/isc-license-txt
  title: Talqui - Services API
  version: 0.123.0
servers:
  - description: Production
    url: https://services-api.talqui.chat
security: []
tags:
  - name: Tenants
  - name: Settings
  - name: Analytics/Reports
  - name: Analytics
  - name: Campaigns
  - name: Campaigns/Models
  - name: Contacts
  - name: Contacts/Imports
  - name: Handoff links
  - name: Inboxes
  - name: Messages
  - name: Notifications
  - name: Sessions
  - name: Operators/Shortcuts
  - name: Operators
  - name: Plugins
  - name: Milestones
  - name: Invites
  - name: Organizations
paths:
  /v1/tenants/{tenantID}/settings/session-motives/{motiveID}:
    patch:
      tags:
        - Settings
      summary: Update session motive
      description: >-
        Renames a close motive (title and/or description). Managers and owners.
        The key never changes.
      operationId: UpdateSessionMotiveController
      parameters:
        - in: path
          name: tenantID
          required: true
          schema:
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            type: string
        - in: path
          name: motiveID
          required: true
          schema:
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                tenantSessionMotiveDescription:
                  description: What the motive means; defaults to the title.
                  maxLength: 256
                  minLength: 1
                  type: string
                tenantSessionMotiveTitle:
                  description: >-
                    Short name the operator picks when closing, e.g. "Sale
                    closed".
                  maxLength: 200
                  minLength: 1
                  type: string
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      sessionMotive:
                        additionalProperties: false
                        description: The close motive as saved.
                        example:
                          tenantSessionMotiveDescription: The contact bought during the conversation
                          tenantSessionMotiveID: 7a1c9e2b-5d4f-4e3a-9b8c-1d2e3f4a5b6c
                          tenantSessionMotiveKey: SALE-CLOSED
                          tenantSessionMotiveTitle: Sale closed
                        properties:
                          tenantSessionMotiveDescription:
                            description: >-
                              What the motive means; the title when none was
                              given.
                            type: string
                          tenantSessionMotiveID:
                            description: The motive id.
                            type: string
                          tenantSessionMotiveKey:
                            description: >-
                              Stable key reports group by, derived from the
                              title when created.
                            type: string
                          tenantSessionMotiveTitle:
                            description: >-
                              Short name the operator picks when closing a
                              conversation.
                            type: string
                        required:
                          - tenantSessionMotiveID
                          - tenantSessionMotiveTitle
                          - tenantSessionMotiveDescription
                          - tenantSessionMotiveKey
                        type: object
                    required:
                      - sessionMotive
                    type: object
                required:
                  - data
                type: object
          description: Response for status 200.
        '403':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/ForbiddenError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            ForbiddenError (error_code 1004): operator is not a manager, owner
            or superuser of this tenant.
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/SessionMotiveNotFoundError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            SessionMotiveNotFoundError (error_code 1968): the motive does not
            exist or was deleted.
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/UnknownError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            UnknownError (error_code 5999): Unexpected internal error not
            otherwise documented for this endpoint.
      security:
        - operatorAuth: []
components:
  schemas:
    ForbiddenError:
      additionalProperties: false
      properties:
        error:
          enum:
            - ForbiddenError
          type: string
        error_code:
          enum:
            - 1004
          type: number
        message:
          example: You do not have access to this resource.
          type: string
        statusCode:
          enum:
            - 403
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    SessionMotiveNotFoundError:
      additionalProperties: false
      properties:
        error:
          enum:
            - SessionMotiveNotFoundError
          type: string
        error_code:
          enum:
            - 1968
          type: number
        message:
          example: Session motive not found.
          type: string
        statusCode:
          enum:
            - 404
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    UnknownError:
      additionalProperties: false
      properties:
        error:
          enum:
            - UnknownError
          type: string
        error_code:
          enum:
            - 5999
          type: number
        message:
          example: For some unknown reason your request has not succeeded.
          type: string
        statusCode:
          enum:
            - 500
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
  securitySchemes:
    operatorAuth:
      bearerFormat: JWT
      description: >-
        Behalf of an Operator (default). A JWT issued by Talqui Core when an
        operator signs in, scoped to every tenant that operator belongs to. Send
        as `Authorization: Bearer <jwt-token>`.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.