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

# Update Question

> Admin: approve/reject, edit the body, or post an official answer.



## OpenAPI

````yaml https://api.vellaro.io/openapi.json patch /api/v1/admin/questions/{question_id}
openapi: 3.1.0
info:
  title: Vellaro API
  description: Vellaro 2026 — E-commerce API
  version: 0.1.0
servers:
  - url: https://api.vellaro.io
    description: Produzione
security: []
tags: []
paths:
  /api/v1/admin/questions/{question_id}:
    patch:
      tags:
        - admin
      summary: Update Question
      description: 'Admin: approve/reject, edit the body, or post an official answer.'
      operationId: update_question_api_v1_admin_questions__question_id__patch
      parameters:
        - name: question_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Question Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuestionUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_QuestionOut_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    QuestionUpdate:
      properties:
        is_approved:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Approved
        body:
          anyOf:
            - type: string
            - type: 'null'
          title: Body
        answer_body:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer Body
      type: object
      title: QuestionUpdate
      description: >-
        Admin mutation — approve/reject, edit body, post an official answer.


        Setting ``answer_body`` publishes the question (the router auto-approves
        and

        stamps ``answered_at``/``answered_by_id``).
    ApiResponse_QuestionOut_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/QuestionOut'
            - type: 'null'
        meta:
          anyOf:
            - $ref: '#/components/schemas/PaginationMeta'
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      type: object
      title: ApiResponse[QuestionOut]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    QuestionOut:
      properties:
        id:
          type: string
          title: Id
        product_id:
          type: string
          title: Product Id
        product_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Name
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        author_name:
          type: string
          title: Author Name
        body:
          type: string
          title: Body
        is_approved:
          type: boolean
          title: Is Approved
        answer_body:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer Body
        answered_by_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Answered By Id
        answered_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Answered At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - product_id
        - author_name
        - body
        - is_approved
        - answer_body
        - answered_at
        - created_at
        - updated_at
      title: QuestionOut
      description: Admin-facing view of a product question.
    PaginationMeta:
      properties:
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        total:
          type: integer
          title: Total
        total_pages:
          type: integer
          title: Total Pages
      type: object
      required:
        - page
        - page_size
        - total
        - total_pages
      title: PaginationMeta
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````