> ## 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 article

> Patches an article's metadata and its draft. It never writes the live
`articleContent*` fields — that only happens on publish, which is what lets
an operator edit for an hour without the page going blank in the meantime.

`articleDraft.contentHtml` is sanitized before storage. Renaming the slug of
an already-published article records the previous one, so the URL Google
indexed keeps resolving.



## OpenAPI

````yaml /api/helpdesk.yaml patch /v1/tenants/{tenantID}/articles/{articleID}
openapi: 3.0.3
info:
  description: >-
    Help center API for the Talqui Helpdesk plugin. Two surfaces with different
    audiences: authenticated authoring routes under /v1/tenants/:tenantID, and
    anonymous public reads under /v1/public resolved from the request hostname.
  license:
    name: ISC
    url: https://opensource.org/license/isc-license-txt
  title: Talqui Helpdesk API
  version: 0.9.0
servers:
  - description: Production
    url: https://plugins-api.talqui.chat/helpdesk
security: []
tags:
  - name: Install
  - name: Public
  - name: Helpdesk
  - name: Categories
  - name: Articles
paths:
  /v1/tenants/{tenantID}/articles/{articleID}:
    patch:
      tags:
        - Articles
      summary: Update article
      description: >-
        Patches an article's metadata and its draft. It never writes the live

        `articleContent*` fields — that only happens on publish, which is what
        lets

        an operator edit for an hour without the page going blank in the
        meantime.


        `articleDraft.contentHtml` is sanitized before storage. Renaming the
        slug of

        an already-published article records the previous one, so the URL Google

        indexed keeps resolving.
      operationId: UpdateArticleController
      parameters:
        - in: path
          name: tenantID
          required: true
          schema:
            description: The tenant the help center belongs to.
            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: articleID
          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:
              properties:
                articleDescription:
                  maxLength: 2000
                  type: string
                articleDraft:
                  properties:
                    content:
                      additionalProperties: {}
                      type: object
                    contentHtml:
                      maxLength: 1000000
                      type: string
                    contentMarkdown:
                      maxLength: 500000
                      type: string
                    contentPlain:
                      maxLength: 500000
                      type: string
                  type: object
                articleFeatured:
                  type: boolean
                articleOrder:
                  maximum: 10000
                  minimum: 0
                  type: integer
                articleSlug:
                  maxLength: 160
                  minLength: 1
                  type: string
                articleStatus:
                  enum:
                    - draft
                    - published
                    - archived
                  type: string
                articleTitle:
                  maxLength: 300
                  minLength: 1
                  type: string
                categoryID:
                  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
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  article:
                    additionalProperties: false
                    properties:
                      articleContent:
                        additionalProperties: {}
                        type: object
                      articleContentHtml:
                        type: string
                      articleContentMarkdown:
                        type: string
                      articleContentPlain:
                        type: string
                      articleDescription:
                        type: string
                      articleDraft:
                        additionalProperties: false
                        nullable: true
                        properties:
                          content:
                            additionalProperties: {}
                            type: object
                          contentHtml:
                            type: string
                          contentMarkdown:
                            type: string
                          contentPlain:
                            type: string
                          updatedAt:
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                            type: string
                          updatedBy:
                            nullable: true
                            type: string
                        required:
                          - content
                          - contentPlain
                          - contentMarkdown
                          - contentHtml
                          - updatedAt
                          - updatedBy
                        type: object
                      articleFeatured:
                        type: boolean
                      articleID:
                        type: string
                      articleOrder:
                        type: number
                      articlePopularity:
                        type: number
                      articleSlug:
                        type: string
                      articleSlugHistory:
                        items:
                          type: string
                        type: array
                      articleStatus:
                        enum:
                          - draft
                          - published
                          - archived
                        type: string
                      articleTitle:
                        type: string
                      articleVersion:
                        type: number
                      categoryID:
                        type: string
                      createdAt:
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                        type: string
                      createdBy:
                        type: string
                      deletedAt:
                        format: date-time
                        nullable: true
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                        type: string
                      helpdeskID:
                        type: string
                      publishedAt:
                        format: date-time
                        nullable: true
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                        type: string
                      publishedBy:
                        nullable: true
                        type: string
                      tenantID:
                        type: string
                      updatedAt:
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                        type: string
                      updatedBy:
                        type: string
                    required:
                      - articleID
                      - helpdeskID
                      - tenantID
                      - categoryID
                      - articleSlug
                      - articleSlugHistory
                      - articleTitle
                      - articleDescription
                      - articleStatus
                      - articleContent
                      - articleContentPlain
                      - articleContentMarkdown
                      - articleContentHtml
                      - articleDraft
                      - articleVersion
                      - articleOrder
                      - articleFeatured
                      - articlePopularity
                      - publishedAt
                      - publishedBy
                      - createdAt
                      - createdBy
                      - updatedAt
                      - updatedBy
                      - deletedAt
                    type: object
                required:
                  - article
                type: object
          description: Response for status 200.
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/MissingTenantIDError'
                        - $ref: '#/components/schemas/RequestValidationError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            MissingTenantIDError (error_code 1001): tenantID absent from the
            URL. | RequestValidationError (error_code 1002): body or params fail
            schema validation.
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/HelpdeskNotFoundError'
                        - $ref: '#/components/schemas/ArticleNotFoundError'
                        - $ref: '#/components/schemas/CategoryNotFoundError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            HelpdeskNotFoundError (error_code 1107): the tenant has no help
            center yet. | ArticleNotFoundError (error_code 1109): no such
            article in this help center. | CategoryNotFoundError (error_code
            1108): the target category does not belong to this help center.
        '409':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/SlugAlreadyInUseError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            SlugAlreadyInUseError (error_code 1110): the new slug is taken in
            this help center.
        '422':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/TenantNotConnectedError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            TenantNotConnectedError (error_code 1000): the tenant is not
            connected to the plugin.
        '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: []
        - pluginConnectionAuth: []
        - pluginAuth: []
components:
  schemas:
    MissingTenantIDError:
      additionalProperties: false
      properties:
        error:
          enum:
            - MissingTenantIDError
          type: string
        error_code:
          enum:
            - 1001
          type: number
        message:
          example: tenantID is required.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    RequestValidationError:
      additionalProperties: false
      properties:
        error:
          enum:
            - RequestValidationError
          type: string
        error_code:
          enum:
            - 1002
          type: number
        fields:
          items:
            additionalProperties: false
            properties:
              allowed:
                type: string
              field:
                type: string
              received:
                type: string
            required:
              - field
              - received
              - allowed
            type: object
          type: array
        message:
          example: Invalid request data.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
        - fields
      type: object
    HelpdeskNotFoundError:
      additionalProperties: false
      properties:
        error:
          enum:
            - HelpdeskNotFoundError
          type: string
        error_code:
          enum:
            - 1107
          type: number
        message:
          example: No help center answers on this address.
          type: string
        statusCode:
          enum:
            - 404
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    ArticleNotFoundError:
      additionalProperties: false
      properties:
        error:
          enum:
            - ArticleNotFoundError
          type: string
        error_code:
          enum:
            - 1109
          type: number
        message:
          example: Article not found.
          type: string
        statusCode:
          enum:
            - 404
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    CategoryNotFoundError:
      additionalProperties: false
      properties:
        error:
          enum:
            - CategoryNotFoundError
          type: string
        error_code:
          enum:
            - 1108
          type: number
        message:
          example: Category not found.
          type: string
        statusCode:
          enum:
            - 404
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    SlugAlreadyInUseError:
      additionalProperties: false
      properties:
        error:
          enum:
            - SlugAlreadyInUseError
          type: string
        error_code:
          enum:
            - 1110
          type: number
        message:
          example: This slug is already in use in this help center.
          type: string
        statusCode:
          enum:
            - 409
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    TenantNotConnectedError:
      additionalProperties: false
      properties:
        error:
          enum:
            - TenantNotConnectedError
          type: string
        error_code:
          enum:
            - 1000
          type: number
        message:
          example: This tenant is not connected to the plugin.
          type: string
        statusCode:
          enum:
            - 422
          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. The JWT issued by Talqui Core when an operator
        signs in. Send as `Authorization: Bearer <jwt-token>`.
      scheme: bearer
      type: http
    pluginConnectionAuth:
      description: >-
        Behalf of a Plugin Connection. Issued when the Helpdesk plugin is
        installed on a tenant; scoped strictly to that one tenant. Send as
        `Authorization: PluginConnection
        base64(pluginConnectionID:pluginConnectionToken)`.
      in: header
      name: Authorization
      type: apiKey
    pluginAuth:
      description: >-
        Behalf of the Helpdesk plugin itself, reaching every tenant that
        installed it. Send as `Authorization: Plugin
        base64(pluginID:pluginToken)`.
      in: header
      name: Authorization
      type: apiKey

````

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