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

# Trigger regeneration of the AI suggestion for a conversation

> Resets the trigger chat log ids to unprocessed, then dispatches
ProcessBufferedMessagesJob on the ai queue. The new suggestion
will arrive asynchronously via the AiSuggestionCreated broadcast event.



## OpenAPI

````yaml https://dev.flextell.ai/docs/api.json post /v1/conversations/{id}/ai-suggestion/regenerate
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: '## Flextell API'
servers:
  - url: https://dev.flextell.ai/api
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/conversations/{id}/ai-suggestion/regenerate:
    post:
      tags:
        - Conversation
      summary: Trigger regeneration of the AI suggestion for a conversation
      description: |-
        Resets the trigger chat log ids to unprocessed, then dispatches
        ProcessBufferedMessagesJob on the ai queue. The new suggestion
        will arrive asynchronously via the AiSuggestionCreated broadcast event.
      operationId: conversation.regenerateAiSuggestion
      parameters:
        - name: id
          in: path
          required: true
          description: The conversation identifier
          schema:
            type: integer
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      responses:
        '202':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    type: object
                    properties:
                      status:
                        type: string
                        const: queued
                      conversation_id:
                        type: string
                    required:
                      - status
                      - conversation_id
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          description: ''
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      success:
                        type: string
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            const: No pending suggestion found
                        required:
                          - message
                    required:
                      - success
                      - data
                  - type: object
                    properties:
                      success:
                        type: string
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            const: Conversation not found
                        required:
                          - message
                    required:
                      - success
                      - data
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````