# Questions

## Create a question

`questions.create(QuestionCreateParams**kwargs)  -> Question`

**post** `/v5/questions`

Create a new question owned by the caller's account.

The question is one of six types selected by the required `question_type`
discriminator (categorical, rating, number, free_text, form, or timestamp),
and each type carries its own `configuration` block; `name` and `prompt`
are required for every type. Questions are the reusable units that are grouped
into question sets and referenced by rubrics, so create them before assembling
a question set. The created question is scoped to the caller's account and
records the creating identity. The question type and its configuration are set
at creation time and cannot be changed afterward through the update endpoint.

### Parameters

- `question: Question`

  - `class QuestionCategoricalQuestionRequest: …`

    - `configuration: CategoricalQuestionConfigurationParam`

      - `choices: List[str]`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: Optional[bool]`

        Whether the question is displayed as a dropdown in the UI.

      - `multi: Optional[bool]`

        Whether the question allows multiple answers.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `conditions: Optional[Iterable[Dict[str, object]]]`

      Conditions for the question to be shown

    - `question_type: Optional[Literal["categorical"]]`

      - `"categorical"`

  - `class QuestionRatingQuestionRequest: …`

    - `configuration: RatingQuestionConfigurationParam`

      - `max_label: str`

        Label shown for the maximum rating

      - `min_label: str`

        Label shown for the minimum rating

      - `steps: int`

        Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `conditions: Optional[Iterable[Dict[str, object]]]`

      Conditions for the question to be shown

    - `question_type: Optional[Literal["rating"]]`

      - `"rating"`

  - `class QuestionNumberQuestionRequest: …`

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `conditions: Optional[Iterable[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[NumberQuestionConfigurationParam]`

      - `max: Optional[float]`

        Maximum value for the number

      - `min: Optional[float]`

        Minimum value for the number

    - `question_type: Optional[Literal["number"]]`

      - `"number"`

  - `class QuestionFreeTextQuestionRequest: …`

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `conditions: Optional[Iterable[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[FreeTextQuestionConfigurationParam]`

      - `max_length: Optional[int]`

        Maximum characters allowed

      - `min_length: Optional[int]`

        Minimum characters required

    - `question_type: Optional[Literal["free_text"]]`

      - `"free_text"`

  - `class QuestionFormQuestionRequest: …`

    - `configuration: FormQuestionConfigurationParam`

      - `form_schema: Dict[str, object]`

        The JSON schema of the desired form object

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `conditions: Optional[Iterable[Dict[str, object]]]`

      Conditions for the question to be shown

    - `question_type: Optional[Literal["form"]]`

      - `"form"`

  - `class QuestionTimestampQuestionRequest: …`

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `conditions: Optional[Iterable[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[TimestampQuestionConfigurationParam]`

      - `multi: Optional[bool]`

        Whether to allow multiple timestamps

    - `question_type: Optional[Literal["timestamp"]]`

      - `"timestamp"`

### Returns

- `Question`

  - `class CategoricalQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: List[str]`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: Optional[bool]`

        Whether the question is displayed as a dropdown in the UI.

      - `multi: Optional[bool]`

        Whether the question allows multiple answers.

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: str`

      - `type: Literal["user", "service_account"]`

        - `"user"`

        - `"service_account"`

      - `object: Optional[Literal["identity"]]`

        - `"identity"`

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["categorical"]]`

      - `"categorical"`

  - `class RatingQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: str`

        Label shown for the maximum rating

      - `min_label: str`

        Label shown for the minimum rating

      - `steps: int`

        Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["rating"]]`

      - `"rating"`

  - `class NumberQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[NumberQuestionConfiguration]`

      - `max: Optional[float]`

        Maximum value for the number

      - `min: Optional[float]`

        Minimum value for the number

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["number"]]`

      - `"number"`

  - `class FreeTextQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[FreeTextQuestionConfiguration]`

      - `max_length: Optional[int]`

        Maximum characters allowed

      - `min_length: Optional[int]`

        Minimum characters required

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["free_text"]]`

      - `"free_text"`

  - `class FormQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: Dict[str, object]`

        The JSON schema of the desired form object

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["form"]]`

      - `"form"`

  - `class TimestampQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[TimestampQuestionConfiguration]`

      - `multi: Optional[bool]`

        Whether to allow multiple timestamps

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["timestamp"]]`

      - `"timestamp"`

### Example

```python
import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
question = client.questions.create(
    question={
        "configuration": {
            "choices": ["string"]
        },
        "name": "name",
        "prompt": "prompt",
        "question_type": "categorical",
    },
)
print(question)
```

#### Response

```json
{
  "id": "id",
  "configuration": {
    "choices": [
      "string"
    ],
    "dropdown": true,
    "multi": true
  },
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by": {
    "id": "id",
    "type": "user",
    "object": "identity"
  },
  "name": "name",
  "prompt": "prompt",
  "archived_at": "2019-12-27T18:11:19.117Z",
  "conditions": [
    {
      "foo": "bar"
    }
  ],
  "object": "question",
  "question_type": "categorical"
}
```

## List questions

`questions.list(QuestionListParams**kwargs)  -> SyncCursorPage[Question]`

**get** `/v5/questions`

Return a paginated list of the caller's account's questions.

Archived questions are excluded by default; set `include_archived` to true
to include them alongside active ones. Pass `ids` to restrict the result to
a specific set of question IDs. Results are paginated through the standard
pagination parameters. Use this to discover existing questions before adding
them to a question set, or to audit which questions have been archived.

### Parameters

- `ending_before: Optional[str]`

- `ids: Optional[Sequence[str]]`

- `include_archived: Optional[bool]`

- `limit: Optional[int]`

- `sort_by: Optional[str]`

- `sort_order: Optional[SortOrder]`

  - `"asc"`

  - `"desc"`

- `starting_after: Optional[str]`

### Returns

- `Question`

  - `class CategoricalQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: List[str]`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: Optional[bool]`

        Whether the question is displayed as a dropdown in the UI.

      - `multi: Optional[bool]`

        Whether the question allows multiple answers.

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: str`

      - `type: Literal["user", "service_account"]`

        - `"user"`

        - `"service_account"`

      - `object: Optional[Literal["identity"]]`

        - `"identity"`

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["categorical"]]`

      - `"categorical"`

  - `class RatingQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: str`

        Label shown for the maximum rating

      - `min_label: str`

        Label shown for the minimum rating

      - `steps: int`

        Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["rating"]]`

      - `"rating"`

  - `class NumberQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[NumberQuestionConfiguration]`

      - `max: Optional[float]`

        Maximum value for the number

      - `min: Optional[float]`

        Minimum value for the number

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["number"]]`

      - `"number"`

  - `class FreeTextQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[FreeTextQuestionConfiguration]`

      - `max_length: Optional[int]`

        Maximum characters allowed

      - `min_length: Optional[int]`

        Minimum characters required

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["free_text"]]`

      - `"free_text"`

  - `class FormQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: Dict[str, object]`

        The JSON schema of the desired form object

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["form"]]`

      - `"form"`

  - `class TimestampQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[TimestampQuestionConfiguration]`

      - `multi: Optional[bool]`

        Whether to allow multiple timestamps

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["timestamp"]]`

      - `"timestamp"`

### Example

```python
import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
page = client.questions.list()
page = page.items[0]
print(page)
```

#### Response

```json
{
  "has_more": true,
  "items": [
    {
      "id": "id",
      "configuration": {
        "choices": [
          "string"
        ],
        "dropdown": true,
        "multi": true
      },
      "created_at": "2019-12-27T18:11:19.117Z",
      "created_by": {
        "id": "id",
        "type": "user",
        "object": "identity"
      },
      "name": "name",
      "prompt": "prompt",
      "archived_at": "2019-12-27T18:11:19.117Z",
      "conditions": [
        {
          "foo": "bar"
        }
      ],
      "object": "question",
      "question_type": "categorical"
    }
  ],
  "total": 0,
  "limit": 0,
  "object": "list"
}
```

## Get a question

`questions.retrieve(strquestion_id)  -> Question`

**get** `/v5/questions/{question_id}`

Retrieve a single question in the caller's account by its ID.

Both active and archived questions are returned; the archived state is
conveyed by the `archived_at` field on the response. The lookup is scoped to
the caller's account, and a question that does not exist within that account
results in a not-found error.

### Parameters

- `question_id: str`

### Returns

- `Question`

  - `class CategoricalQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: List[str]`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: Optional[bool]`

        Whether the question is displayed as a dropdown in the UI.

      - `multi: Optional[bool]`

        Whether the question allows multiple answers.

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: str`

      - `type: Literal["user", "service_account"]`

        - `"user"`

        - `"service_account"`

      - `object: Optional[Literal["identity"]]`

        - `"identity"`

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["categorical"]]`

      - `"categorical"`

  - `class RatingQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: str`

        Label shown for the maximum rating

      - `min_label: str`

        Label shown for the minimum rating

      - `steps: int`

        Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["rating"]]`

      - `"rating"`

  - `class NumberQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[NumberQuestionConfiguration]`

      - `max: Optional[float]`

        Maximum value for the number

      - `min: Optional[float]`

        Minimum value for the number

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["number"]]`

      - `"number"`

  - `class FreeTextQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[FreeTextQuestionConfiguration]`

      - `max_length: Optional[int]`

        Maximum characters allowed

      - `min_length: Optional[int]`

        Minimum characters required

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["free_text"]]`

      - `"free_text"`

  - `class FormQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: Dict[str, object]`

        The JSON schema of the desired form object

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["form"]]`

      - `"form"`

  - `class TimestampQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[TimestampQuestionConfiguration]`

      - `multi: Optional[bool]`

        Whether to allow multiple timestamps

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["timestamp"]]`

      - `"timestamp"`

### Example

```python
import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
question = client.questions.retrieve(
    "question_id",
)
print(question)
```

#### Response

```json
{
  "id": "id",
  "configuration": {
    "choices": [
      "string"
    ],
    "dropdown": true,
    "multi": true
  },
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by": {
    "id": "id",
    "type": "user",
    "object": "identity"
  },
  "name": "name",
  "prompt": "prompt",
  "archived_at": "2019-12-27T18:11:19.117Z",
  "conditions": [
    {
      "foo": "bar"
    }
  ],
  "object": "question",
  "question_type": "categorical"
}
```

## Update a question

`questions.update(strquestion_id, QuestionUpdateParams**kwargs)  -> Question`

**patch** `/v5/questions/{question_id}`

Update a question's display name.

Only the `name` is mutable through this endpoint; a question's type, prompt,
and type-specific configuration are fixed at creation and cannot be changed
here. Updating an archived question is rejected with a client error, so restore
it first if it needs to be edited. The update is scoped to the caller's account.

### Parameters

- `question_id: str`

- `name: str`

  Display name for the question

### Returns

- `Question`

  - `class CategoricalQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: List[str]`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: Optional[bool]`

        Whether the question is displayed as a dropdown in the UI.

      - `multi: Optional[bool]`

        Whether the question allows multiple answers.

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: str`

      - `type: Literal["user", "service_account"]`

        - `"user"`

        - `"service_account"`

      - `object: Optional[Literal["identity"]]`

        - `"identity"`

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["categorical"]]`

      - `"categorical"`

  - `class RatingQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: str`

        Label shown for the maximum rating

      - `min_label: str`

        Label shown for the minimum rating

      - `steps: int`

        Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["rating"]]`

      - `"rating"`

  - `class NumberQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[NumberQuestionConfiguration]`

      - `max: Optional[float]`

        Maximum value for the number

      - `min: Optional[float]`

        Minimum value for the number

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["number"]]`

      - `"number"`

  - `class FreeTextQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[FreeTextQuestionConfiguration]`

      - `max_length: Optional[int]`

        Maximum characters allowed

      - `min_length: Optional[int]`

        Minimum characters required

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["free_text"]]`

      - `"free_text"`

  - `class FormQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: Dict[str, object]`

        The JSON schema of the desired form object

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["form"]]`

      - `"form"`

  - `class TimestampQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[TimestampQuestionConfiguration]`

      - `multi: Optional[bool]`

        Whether to allow multiple timestamps

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["timestamp"]]`

      - `"timestamp"`

### Example

```python
import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
question = client.questions.update(
    question_id="question_id",
    name="x",
)
print(question)
```

#### Response

```json
{
  "id": "id",
  "configuration": {
    "choices": [
      "string"
    ],
    "dropdown": true,
    "multi": true
  },
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by": {
    "id": "id",
    "type": "user",
    "object": "identity"
  },
  "name": "name",
  "prompt": "prompt",
  "archived_at": "2019-12-27T18:11:19.117Z",
  "conditions": [
    {
      "foo": "bar"
    }
  ],
  "object": "question",
  "question_type": "categorical"
}
```

## Archive a question

`questions.archive(strquestion_id)  -> Question`

**delete** `/v5/questions/{question_id}`

Soft-delete a question by setting its `archived_at` timestamp.

This is not a permanent delete: the row is retained and can be brought back
with the restore endpoint. Once archived, the question is excluded from list
results by default (unless `include_archived` is set) and can no longer be
updated until it is restored. The archived question is returned in the
response with its `archived_at` populated.

### Parameters

- `question_id: str`

### Returns

- `Question`

  - `class CategoricalQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: List[str]`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: Optional[bool]`

        Whether the question is displayed as a dropdown in the UI.

      - `multi: Optional[bool]`

        Whether the question allows multiple answers.

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: str`

      - `type: Literal["user", "service_account"]`

        - `"user"`

        - `"service_account"`

      - `object: Optional[Literal["identity"]]`

        - `"identity"`

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["categorical"]]`

      - `"categorical"`

  - `class RatingQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: str`

        Label shown for the maximum rating

      - `min_label: str`

        Label shown for the minimum rating

      - `steps: int`

        Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["rating"]]`

      - `"rating"`

  - `class NumberQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[NumberQuestionConfiguration]`

      - `max: Optional[float]`

        Maximum value for the number

      - `min: Optional[float]`

        Minimum value for the number

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["number"]]`

      - `"number"`

  - `class FreeTextQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[FreeTextQuestionConfiguration]`

      - `max_length: Optional[int]`

        Maximum characters allowed

      - `min_length: Optional[int]`

        Minimum characters required

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["free_text"]]`

      - `"free_text"`

  - `class FormQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: Dict[str, object]`

        The JSON schema of the desired form object

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["form"]]`

      - `"form"`

  - `class TimestampQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[TimestampQuestionConfiguration]`

      - `multi: Optional[bool]`

        Whether to allow multiple timestamps

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["timestamp"]]`

      - `"timestamp"`

### Example

```python
import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
question = client.questions.archive(
    "question_id",
)
print(question)
```

#### Response

```json
{
  "id": "id",
  "configuration": {
    "choices": [
      "string"
    ],
    "dropdown": true,
    "multi": true
  },
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by": {
    "id": "id",
    "type": "user",
    "object": "identity"
  },
  "name": "name",
  "prompt": "prompt",
  "archived_at": "2019-12-27T18:11:19.117Z",
  "conditions": [
    {
      "foo": "bar"
    }
  ],
  "object": "question",
  "question_type": "categorical"
}
```

## Restore an archived question

`questions.restore(strquestion_id)  -> Question`

**post** `/v5/questions/{question_id}/restore`

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.

### Parameters

- `question_id: str`

### Returns

- `Question`

  - `class CategoricalQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: List[str]`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: Optional[bool]`

        Whether the question is displayed as a dropdown in the UI.

      - `multi: Optional[bool]`

        Whether the question allows multiple answers.

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: str`

      - `type: Literal["user", "service_account"]`

        - `"user"`

        - `"service_account"`

      - `object: Optional[Literal["identity"]]`

        - `"identity"`

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["categorical"]]`

      - `"categorical"`

  - `class RatingQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: str`

        Label shown for the maximum rating

      - `min_label: str`

        Label shown for the minimum rating

      - `steps: int`

        Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["rating"]]`

      - `"rating"`

  - `class NumberQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[NumberQuestionConfiguration]`

      - `max: Optional[float]`

        Maximum value for the number

      - `min: Optional[float]`

        Minimum value for the number

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["number"]]`

      - `"number"`

  - `class FreeTextQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[FreeTextQuestionConfiguration]`

      - `max_length: Optional[int]`

        Maximum characters allowed

      - `min_length: Optional[int]`

        Minimum characters required

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["free_text"]]`

      - `"free_text"`

  - `class FormQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: Dict[str, object]`

        The JSON schema of the desired form object

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["form"]]`

      - `"form"`

  - `class TimestampQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[TimestampQuestionConfiguration]`

      - `multi: Optional[bool]`

        Whether to allow multiple timestamps

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["timestamp"]]`

      - `"timestamp"`

### Example

```python
import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
question = client.questions.restore(
    "question_id",
)
print(question)
```

#### Response

```json
{
  "id": "id",
  "configuration": {
    "choices": [
      "string"
    ],
    "dropdown": true,
    "multi": true
  },
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by": {
    "id": "id",
    "type": "user",
    "object": "identity"
  },
  "name": "name",
  "prompt": "prompt",
  "archived_at": "2019-12-27T18:11:19.117Z",
  "conditions": [
    {
      "foo": "bar"
    }
  ],
  "object": "question",
  "question_type": "categorical"
}
```

## Domain Types

### Categorical Question

- `class CategoricalQuestion: …`

  - `id: str`

    Unique identifier of the entity

  - `configuration: CategoricalQuestionConfiguration`

    - `choices: List[str]`

      Categorical answer choices (must contain at least one entry)

    - `dropdown: Optional[bool]`

      Whether the question is displayed as a dropdown in the UI.

    - `multi: Optional[bool]`

      Whether the question allows multiple answers.

  - `created_at: datetime`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: str`

    - `type: Literal["user", "service_account"]`

      - `"user"`

      - `"service_account"`

    - `object: Optional[Literal["identity"]]`

      - `"identity"`

  - `name: str`

  - `prompt: str`

    user-facing question prompt

  - `archived_at: Optional[datetime]`

    ISO-timestamp when the entity was archived

  - `conditions: Optional[List[Dict[str, object]]]`

    Conditions for the question to be shown

  - `object: Optional[Literal["question"]]`

    - `"question"`

  - `question_type: Optional[Literal["categorical"]]`

    - `"categorical"`

### Categorical Question Configuration

- `class CategoricalQuestionConfiguration: …`

  - `choices: List[str]`

    Categorical answer choices (must contain at least one entry)

  - `dropdown: Optional[bool]`

    Whether the question is displayed as a dropdown in the UI.

  - `multi: Optional[bool]`

    Whether the question allows multiple answers.

### Form Question

- `class FormQuestion: …`

  - `id: str`

    Unique identifier of the entity

  - `configuration: FormQuestionConfiguration`

    - `form_schema: Dict[str, object]`

      The JSON schema of the desired form object

  - `created_at: datetime`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: str`

    - `type: Literal["user", "service_account"]`

      - `"user"`

      - `"service_account"`

    - `object: Optional[Literal["identity"]]`

      - `"identity"`

  - `name: str`

  - `prompt: str`

    user-facing question prompt

  - `archived_at: Optional[datetime]`

    ISO-timestamp when the entity was archived

  - `conditions: Optional[List[Dict[str, object]]]`

    Conditions for the question to be shown

  - `object: Optional[Literal["question"]]`

    - `"question"`

  - `question_type: Optional[Literal["form"]]`

    - `"form"`

### Form Question Configuration

- `class FormQuestionConfiguration: …`

  - `form_schema: Dict[str, object]`

    The JSON schema of the desired form object

### Free Text Question

- `class FreeTextQuestion: …`

  - `id: str`

    Unique identifier of the entity

  - `created_at: datetime`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: str`

    - `type: Literal["user", "service_account"]`

      - `"user"`

      - `"service_account"`

    - `object: Optional[Literal["identity"]]`

      - `"identity"`

  - `name: str`

  - `prompt: str`

    user-facing question prompt

  - `archived_at: Optional[datetime]`

    ISO-timestamp when the entity was archived

  - `conditions: Optional[List[Dict[str, object]]]`

    Conditions for the question to be shown

  - `configuration: Optional[FreeTextQuestionConfiguration]`

    - `max_length: Optional[int]`

      Maximum characters allowed

    - `min_length: Optional[int]`

      Minimum characters required

  - `object: Optional[Literal["question"]]`

    - `"question"`

  - `question_type: Optional[Literal["free_text"]]`

    - `"free_text"`

### Free Text Question Configuration

- `class FreeTextQuestionConfiguration: …`

  - `max_length: Optional[int]`

    Maximum characters allowed

  - `min_length: Optional[int]`

    Minimum characters required

### Number Question

- `class NumberQuestion: …`

  - `id: str`

    Unique identifier of the entity

  - `created_at: datetime`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: str`

    - `type: Literal["user", "service_account"]`

      - `"user"`

      - `"service_account"`

    - `object: Optional[Literal["identity"]]`

      - `"identity"`

  - `name: str`

  - `prompt: str`

    user-facing question prompt

  - `archived_at: Optional[datetime]`

    ISO-timestamp when the entity was archived

  - `conditions: Optional[List[Dict[str, object]]]`

    Conditions for the question to be shown

  - `configuration: Optional[NumberQuestionConfiguration]`

    - `max: Optional[float]`

      Maximum value for the number

    - `min: Optional[float]`

      Minimum value for the number

  - `object: Optional[Literal["question"]]`

    - `"question"`

  - `question_type: Optional[Literal["number"]]`

    - `"number"`

### Number Question Configuration

- `class NumberQuestionConfiguration: …`

  - `max: Optional[float]`

    Maximum value for the number

  - `min: Optional[float]`

    Minimum value for the number

### Question

- `Question`

  - `class CategoricalQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: List[str]`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: Optional[bool]`

        Whether the question is displayed as a dropdown in the UI.

      - `multi: Optional[bool]`

        Whether the question allows multiple answers.

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: str`

      - `type: Literal["user", "service_account"]`

        - `"user"`

        - `"service_account"`

      - `object: Optional[Literal["identity"]]`

        - `"identity"`

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["categorical"]]`

      - `"categorical"`

  - `class RatingQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: str`

        Label shown for the maximum rating

      - `min_label: str`

        Label shown for the minimum rating

      - `steps: int`

        Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["rating"]]`

      - `"rating"`

  - `class NumberQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[NumberQuestionConfiguration]`

      - `max: Optional[float]`

        Maximum value for the number

      - `min: Optional[float]`

        Minimum value for the number

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["number"]]`

      - `"number"`

  - `class FreeTextQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[FreeTextQuestionConfiguration]`

      - `max_length: Optional[int]`

        Maximum characters allowed

      - `min_length: Optional[int]`

        Minimum characters required

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["free_text"]]`

      - `"free_text"`

  - `class FormQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: Dict[str, object]`

        The JSON schema of the desired form object

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["form"]]`

      - `"form"`

  - `class TimestampQuestion: …`

    - `id: str`

      Unique identifier of the entity

    - `created_at: datetime`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: str`

    - `prompt: str`

      user-facing question prompt

    - `archived_at: Optional[datetime]`

      ISO-timestamp when the entity was archived

    - `conditions: Optional[List[Dict[str, object]]]`

      Conditions for the question to be shown

    - `configuration: Optional[TimestampQuestionConfiguration]`

      - `multi: Optional[bool]`

        Whether to allow multiple timestamps

    - `object: Optional[Literal["question"]]`

      - `"question"`

    - `question_type: Optional[Literal["timestamp"]]`

      - `"timestamp"`

### Rating Question

- `class RatingQuestion: …`

  - `id: str`

    Unique identifier of the entity

  - `configuration: RatingQuestionConfiguration`

    - `max_label: str`

      Label shown for the maximum rating

    - `min_label: str`

      Label shown for the minimum rating

    - `steps: int`

      Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

  - `created_at: datetime`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: str`

    - `type: Literal["user", "service_account"]`

      - `"user"`

      - `"service_account"`

    - `object: Optional[Literal["identity"]]`

      - `"identity"`

  - `name: str`

  - `prompt: str`

    user-facing question prompt

  - `archived_at: Optional[datetime]`

    ISO-timestamp when the entity was archived

  - `conditions: Optional[List[Dict[str, object]]]`

    Conditions for the question to be shown

  - `object: Optional[Literal["question"]]`

    - `"question"`

  - `question_type: Optional[Literal["rating"]]`

    - `"rating"`

### Rating Question Configuration

- `class RatingQuestionConfiguration: …`

  - `max_label: str`

    Label shown for the maximum rating

  - `min_label: str`

    Label shown for the minimum rating

  - `steps: int`

    Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

### Timestamp Question

- `class TimestampQuestion: …`

  - `id: str`

    Unique identifier of the entity

  - `created_at: datetime`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: str`

    - `type: Literal["user", "service_account"]`

      - `"user"`

      - `"service_account"`

    - `object: Optional[Literal["identity"]]`

      - `"identity"`

  - `name: str`

  - `prompt: str`

    user-facing question prompt

  - `archived_at: Optional[datetime]`

    ISO-timestamp when the entity was archived

  - `conditions: Optional[List[Dict[str, object]]]`

    Conditions for the question to be shown

  - `configuration: Optional[TimestampQuestionConfiguration]`

    - `multi: Optional[bool]`

      Whether to allow multiple timestamps

  - `object: Optional[Literal["question"]]`

    - `"question"`

  - `question_type: Optional[Literal["timestamp"]]`

    - `"timestamp"`

### Timestamp Question Configuration

- `class TimestampQuestionConfiguration: …`

  - `multi: Optional[bool]`

    Whether to allow multiple timestamps
