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

# Restore an archived question

> Restore a previously archived question, reversing an archive.

This clears the question's ``archived_at`` timestamp, returning it to the
active state so it reappears in default listings and becomes editable again.
It is the inverse of the archive (DELETE) operation and is intended for
questions that were archived by mistake or are needed again.



## OpenAPI

````yaml https://api.sgp.scale.com/openapi-versions/v5/openapi.json post /v5/questions/{question_id}/restore
openapi: 3.1.0
info:
  title: EGP API V5
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
paths:
  /v5/questions/{question_id}/restore:
    post:
      tags:
        - Questions
      summary: Restore an archived question
      description: >-
        Restore a previously archived question, reversing an archive.


        This clears the question's ``archived_at`` timestamp, returning it to
        the

        active state so it reappears in default listings and becomes editable
        again.

        It is the inverse of the archive (DELETE) operation and is intended for

        questions that were archived by mistake or are needed again.
      operationId: POST-V5-/v5/questions/question_id/restore
      parameters:
        - name: question_id
          in: path
          required: true
          schema:
            type: string
            title: Question Id
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Question'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Question:
      oneOf:
        - $ref: '#/components/schemas/CategoricalQuestion'
        - $ref: '#/components/schemas/RatingQuestion'
        - $ref: '#/components/schemas/NumberQuestion'
        - $ref: '#/components/schemas/FreeTextQuestion'
        - $ref: '#/components/schemas/FormQuestion'
        - $ref: '#/components/schemas/TimestampQuestion'
      title: Question
      discriminator:
        propertyName: question_type
        mapping:
          categorical:
            $ref: '#/components/schemas/CategoricalQuestion'
          form:
            $ref: '#/components/schemas/FormQuestion'
          free_text:
            $ref: '#/components/schemas/FreeTextQuestion'
          number:
            $ref: '#/components/schemas/NumberQuestion'
          rating:
            $ref: '#/components/schemas/RatingQuestion'
          timestamp:
            $ref: '#/components/schemas/TimestampQuestion'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CategoricalQuestion:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the entity
        object:
          type: string
          const: question
          title: Object
          default: question
        created_by:
          $ref: '#/components/schemas/Identity'
          description: The identity that created the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: ISO-timestamp when the entity was created
        name:
          type: string
          title: Name
        prompt:
          type: string
          title: Prompt
          description: user-facing question prompt
        conditions:
          title: Conditions
          description: Conditions for the question to be shown
          items:
            additionalProperties: true
            type: object
          type: array
        archived_at:
          title: Archived At
          description: ISO-timestamp when the entity was archived
          type: string
          format: date-time
        question_type:
          type: string
          const: categorical
          title: Question Type
          default: categorical
        configuration:
          $ref: '#/components/schemas/CategoricalQuestionConfiguration'
      type: object
      required:
        - created_by
        - id
        - created_at
        - name
        - prompt
        - configuration
    RatingQuestion:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the entity
        object:
          type: string
          const: question
          title: Object
          default: question
        created_by:
          $ref: '#/components/schemas/Identity'
          description: The identity that created the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: ISO-timestamp when the entity was created
        name:
          type: string
          title: Name
        prompt:
          type: string
          title: Prompt
          description: user-facing question prompt
        conditions:
          title: Conditions
          description: Conditions for the question to be shown
          items:
            additionalProperties: true
            type: object
          type: array
        archived_at:
          title: Archived At
          description: ISO-timestamp when the entity was archived
          type: string
          format: date-time
        question_type:
          type: string
          const: rating
          title: Question Type
          default: rating
        configuration:
          $ref: '#/components/schemas/RatingQuestionConfiguration'
      type: object
      required:
        - created_by
        - id
        - created_at
        - name
        - prompt
        - configuration
    NumberQuestion:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the entity
        object:
          type: string
          const: question
          title: Object
          default: question
        created_by:
          $ref: '#/components/schemas/Identity'
          description: The identity that created the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: ISO-timestamp when the entity was created
        name:
          type: string
          title: Name
        prompt:
          type: string
          title: Prompt
          description: user-facing question prompt
        conditions:
          title: Conditions
          description: Conditions for the question to be shown
          items:
            additionalProperties: true
            type: object
          type: array
        archived_at:
          title: Archived At
          description: ISO-timestamp when the entity was archived
          type: string
          format: date-time
        question_type:
          type: string
          const: number
          title: Question Type
          default: number
        configuration:
          $ref: '#/components/schemas/NumberQuestionConfiguration'
      type: object
      required:
        - created_by
        - id
        - created_at
        - name
        - prompt
    FreeTextQuestion:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the entity
        object:
          type: string
          const: question
          title: Object
          default: question
        created_by:
          $ref: '#/components/schemas/Identity'
          description: The identity that created the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: ISO-timestamp when the entity was created
        name:
          type: string
          title: Name
        prompt:
          type: string
          title: Prompt
          description: user-facing question prompt
        conditions:
          title: Conditions
          description: Conditions for the question to be shown
          items:
            additionalProperties: true
            type: object
          type: array
        archived_at:
          title: Archived At
          description: ISO-timestamp when the entity was archived
          type: string
          format: date-time
        question_type:
          type: string
          const: free_text
          title: Question Type
          default: free_text
        configuration:
          $ref: '#/components/schemas/FreeTextQuestionConfiguration'
      type: object
      required:
        - created_by
        - id
        - created_at
        - name
        - prompt
    FormQuestion:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the entity
        object:
          type: string
          const: question
          title: Object
          default: question
        created_by:
          $ref: '#/components/schemas/Identity'
          description: The identity that created the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: ISO-timestamp when the entity was created
        name:
          type: string
          title: Name
        prompt:
          type: string
          title: Prompt
          description: user-facing question prompt
        conditions:
          title: Conditions
          description: Conditions for the question to be shown
          items:
            additionalProperties: true
            type: object
          type: array
        archived_at:
          title: Archived At
          description: ISO-timestamp when the entity was archived
          type: string
          format: date-time
        question_type:
          type: string
          const: form
          title: Question Type
          default: form
        configuration:
          $ref: '#/components/schemas/FormQuestionConfiguration'
      type: object
      required:
        - created_by
        - id
        - created_at
        - name
        - prompt
        - configuration
    TimestampQuestion:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the entity
        object:
          type: string
          const: question
          title: Object
          default: question
        created_by:
          $ref: '#/components/schemas/Identity'
          description: The identity that created the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: ISO-timestamp when the entity was created
        name:
          type: string
          title: Name
        prompt:
          type: string
          title: Prompt
          description: user-facing question prompt
        conditions:
          title: Conditions
          description: Conditions for the question to be shown
          items:
            additionalProperties: true
            type: object
          type: array
        archived_at:
          title: Archived At
          description: ISO-timestamp when the entity was archived
          type: string
          format: date-time
        question_type:
          type: string
          const: timestamp
          title: Question Type
          default: timestamp
        configuration:
          $ref: '#/components/schemas/TimestampQuestionConfiguration'
      type: object
      required:
        - created_by
        - id
        - created_at
        - name
        - prompt
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          title: Error Type
          type: string
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Identity:
      properties:
        id:
          type: string
          title: Id
        object:
          type: string
          const: identity
          title: Object
          default: identity
        type:
          $ref: '#/components/schemas/IdentityType'
      type: object
      required:
        - id
        - type
      title: Identity
    CategoricalQuestionConfiguration:
      properties:
        choices:
          items:
            type: string
          type: array
          minItems: 1
          title: Choices
          description: Categorical answer choices (must contain at least one entry)
        multi:
          title: Multi
          description: Whether the question allows multiple answers.
          type: boolean
        dropdown:
          title: Dropdown
          description: Whether the question is displayed as a dropdown in the UI.
          type: boolean
      type: object
      required:
        - choices
      title: CategoricalQuestionConfiguration
    RatingQuestionConfiguration:
      properties:
        min_label:
          type: string
          title: Min Label
          description: Label shown for the minimum rating
        max_label:
          type: string
          title: Max Label
          description: Label shown for the maximum rating
        steps:
          type: integer
          minimum: 1
          title: Steps
          description: Number of discrete points on the scale (e.g., 5 for a 1–5 scale)
      type: object
      required:
        - min_label
        - max_label
        - steps
      title: RatingQuestionConfiguration
    NumberQuestionConfiguration:
      properties:
        min:
          title: Min
          description: Minimum value for the number
          type: number
        max:
          title: Max
          description: Maximum value for the number
          type: number
      type: object
      title: NumberQuestionConfiguration
    FreeTextQuestionConfiguration:
      properties:
        min_length:
          type: integer
          minimum: 0
          title: Min Length
          description: Minimum characters required
          default: 50
        max_length:
          type: integer
          minimum: 1
          title: Max Length
          description: Maximum characters allowed
          default: 1000
      type: object
      title: FreeTextQuestionConfiguration
    FormQuestionConfiguration:
      properties:
        form_schema:
          additionalProperties: true
          type: object
          title: Form Schema
          description: The JSON schema of the desired form object
      type: object
      required:
        - form_schema
      title: FormQuestionConfiguration
    TimestampQuestionConfiguration:
      properties:
        multi:
          type: boolean
          title: Multi
          description: Whether to allow multiple timestamps
          default: false
      type: object
      title: TimestampQuestionConfiguration
    IdentityType:
      type: string
      enum:
        - user
        - service_account
      title: IdentityType
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````