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

# Undo an answer

> Restores the fact the answer replaced with a new superseding fact, and returns the question as the caller sees it again. Only who answered may undo.



## OpenAPI

````yaml /openapi.json delete /v1/questions/{questionId}/answers/{answerId}
openapi: 3.0.0
info:
  title: onosso
  version: 0.0.0
  description: >-
    The household's API: the week, the people and the sessions the web app reads
    and changes.
servers: []
security: []
tags:
  - name: Week
    description: The household's week, day by day.
  - name: People
    description: The people who make up the household.
  - name: Pets
    description: The pets of the house.
  - name: Invites
    description: Links that let someone join.
  - name: Sessions
    description: Where you are signed in.
  - name: Tokens
    description: Your personal API tokens.
  - name: Address
    description: Where the household lives.
  - name: Messages
    description: What each person receives from the product, and when.
  - name: Questions
    description: 'What needs a person: one queue, the same in the app and on WhatsApp.'
  - name: Shopping
    description: 'The household''s one list: places, items and marks.'
  - name: Conversation
    description: >-
      Each person's one conversation with the assistant, the same in the app and
      on WhatsApp.
  - name: MCP
    description: The house for an MCP client such as Claude Desktop, with a personal token.
paths:
  /v1/questions/{questionId}/answers/{answerId}:
    delete:
      tags:
        - Questions
      summary: Undo an answer
      description: >-
        Restores the fact the answer replaced with a new superseding fact, and
        returns the question as the caller sees it again. Only who answered may
        undo.
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 100
          required: true
          name: questionId
          in: path
        - schema:
            type: string
            maxLength: 64
          required: true
          name: answerId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                operationId:
                  type: string
                  format: uuid
                at:
                  type: string
                  format: date-time
              required:
                - operationId
                - at
      responses:
        '200':
          description: The answer was undone.
          content:
            application/json:
              schema:
                type: object
                properties:
                  question:
                    $ref: '#/components/schemas/Question'
                required:
                  - question
        '401':
          description: Unauthorized.
        '403':
          description: The request origin is not allowed.
        '404':
          description: >-
            `notifications.answer-not-found`: not an answer the caller gave to
            that question.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainError'
        '409':
          description: >-
            `notifications.stale-answer`: the fact changed since the answer, or
            the answer was already undone.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainError'
        '422':
          description: '`notifications.invalid-command`: a malformed body.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/RequestTimeout'
      security:
        - session: []
components:
  schemas:
    Question:
      type: object
      properties:
        id:
          type: string
          description: >-
            Stable per question: `review-assumed:<activityId>`,
            `open-slot:<activityId>`, `calendar-scope:<schoolCalendarId>`.
        kind:
          type: string
          enum:
            - review-assumed
            - open-slot
            - calendar-scope
        target:
          type: object
          properties:
            occurrenceId:
              type: string
              description: >-
                The week item the question is about; a `calendar-scope`
                question's is `<schoolCalendarId>@<date>`, its next day off,
                which names no week item.
          required:
            - occurrenceId
        title:
          type: string
        sub:
          type: string
        options:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
            required:
              - id
              - label
        date:
          type: string
          description: The target occurrence's date, YYYY-MM-DD.
      required:
        - id
        - kind
        - target
        - title
        - sub
        - options
        - date
    DomainError:
      type: object
      properties:
        code:
          type: string
        details:
          type: object
          additionalProperties:
            nullable: true
      required:
        - code
        - details
    Degraded:
      type: object
      properties:
        code:
          type: string
          enum:
            - request.timeout
            - service.unavailable
        correlationId:
          type: string
      required:
        - code
        - correlationId
  responses:
    ServiceUnavailable:
      description: A dependency is unavailable; retry after Retry-After seconds.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Degraded'
    RequestTimeout:
      description: The request outlived its deadline.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Degraded'
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: __Secure-better-auth.session_token
      description: The session cookie set when you sign in to the web app.

````

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