# Questions

## Create a 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.

### Body Parameters

- `question: object { configuration, name, prompt, 2 more }  or object { configuration, name, prompt, 2 more }  or object { name, prompt, conditions, 2 more }  or 3 more`

  - `Categorical object { configuration, name, prompt, 2 more }`

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: array of string`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: optional boolean`

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

      - `multi: optional boolean`

        Whether the question allows multiple answers.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `question_type: optional "categorical"`

      - `"categorical"`

  - `Rating object { configuration, name, prompt, 2 more }`

    - `configuration: RatingQuestionConfiguration`

      - `max_label: string`

        Label shown for the maximum rating

      - `min_label: string`

        Label shown for the minimum rating

      - `steps: number`

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

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `question_type: optional "rating"`

      - `"rating"`

  - `Number object { name, prompt, conditions, 2 more }`

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional NumberQuestionConfiguration`

      - `max: optional number`

        Maximum value for the number

      - `min: optional number`

        Minimum value for the number

    - `question_type: optional "number"`

      - `"number"`

  - `FreeText object { name, prompt, conditions, 2 more }`

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional FreeTextQuestionConfiguration`

      - `max_length: optional number`

        Maximum characters allowed

      - `min_length: optional number`

        Minimum characters required

    - `question_type: optional "free_text"`

      - `"free_text"`

  - `Form object { configuration, name, prompt, 2 more }`

    - `configuration: FormQuestionConfiguration`

      - `form_schema: map[unknown]`

        The JSON schema of the desired form object

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `question_type: optional "form"`

      - `"form"`

  - `Timestamp object { name, prompt, conditions, 2 more }`

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional TimestampQuestionConfiguration`

      - `multi: optional boolean`

        Whether to allow multiple timestamps

    - `question_type: optional "timestamp"`

      - `"timestamp"`

### Returns

- `Question = CategoricalQuestion or RatingQuestion or NumberQuestion or 3 more`

  - `CategoricalQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: array of string`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: optional boolean`

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

      - `multi: optional boolean`

        Whether the question allows multiple answers.

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: string`

      - `type: "user" or "service_account"`

        - `"user"`

        - `"service_account"`

      - `object: optional "identity"`

        - `"identity"`

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "categorical"`

      - `"categorical"`

  - `RatingQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: string`

        Label shown for the maximum rating

      - `min_label: string`

        Label shown for the minimum rating

      - `steps: number`

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

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "rating"`

      - `"rating"`

  - `NumberQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional NumberQuestionConfiguration`

      - `max: optional number`

        Maximum value for the number

      - `min: optional number`

        Minimum value for the number

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "number"`

      - `"number"`

  - `FreeTextQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional FreeTextQuestionConfiguration`

      - `max_length: optional number`

        Maximum characters allowed

      - `min_length: optional number`

        Minimum characters required

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "free_text"`

      - `"free_text"`

  - `FormQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: map[unknown]`

        The JSON schema of the desired form object

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "form"`

      - `"form"`

  - `TimestampQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional TimestampQuestionConfiguration`

      - `multi: optional boolean`

        Whether to allow multiple timestamps

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "timestamp"`

      - `"timestamp"`

### Example

```http
curl https://api.egp.scale.com/v5/questions \
    -H 'Content-Type: application/json' \
    -H "x-api-key: $SGP_API_KEY" \
    -d '{
          "configuration": {
            "choices": [
              "string"
            ],
            "dropdown": true,
            "multi": true
          },
          "name": "name",
          "prompt": "prompt",
          "conditions": [
            {
              "foo": "bar"
            }
          ],
          "question_type": "categorical"
        }'
```

#### 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

**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.

### Query Parameters

- `ending_before: optional string`

- `ids: optional array of string`

- `include_archived: optional boolean`

- `limit: optional number`

- `sort_by: optional string`

- `sort_order: optional SortOrder`

  - `"asc"`

  - `"desc"`

- `starting_after: optional string`

### Returns

- `has_more: boolean`

  Whether there are more items left to be fetched.

- `items: array of Question`

  - `CategoricalQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: array of string`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: optional boolean`

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

      - `multi: optional boolean`

        Whether the question allows multiple answers.

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: string`

      - `type: "user" or "service_account"`

        - `"user"`

        - `"service_account"`

      - `object: optional "identity"`

        - `"identity"`

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "categorical"`

      - `"categorical"`

  - `RatingQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: string`

        Label shown for the maximum rating

      - `min_label: string`

        Label shown for the minimum rating

      - `steps: number`

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

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "rating"`

      - `"rating"`

  - `NumberQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional NumberQuestionConfiguration`

      - `max: optional number`

        Maximum value for the number

      - `min: optional number`

        Minimum value for the number

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "number"`

      - `"number"`

  - `FreeTextQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional FreeTextQuestionConfiguration`

      - `max_length: optional number`

        Maximum characters allowed

      - `min_length: optional number`

        Minimum characters required

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "free_text"`

      - `"free_text"`

  - `FormQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: map[unknown]`

        The JSON schema of the desired form object

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "form"`

      - `"form"`

  - `TimestampQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional TimestampQuestionConfiguration`

      - `multi: optional boolean`

        Whether to allow multiple timestamps

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "timestamp"`

      - `"timestamp"`

- `total: number`

  The total of items that match the query. This is greater than or equal to the number of items returned.

- `limit: optional number`

  The maximum number of items to return.

- `object: optional "list"`

  - `"list"`

### Example

```http
curl https://api.egp.scale.com/v5/questions \
    -H "x-api-key: $SGP_API_KEY"
```

#### 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

**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.

### Path Parameters

- `question_id: string`

### Returns

- `Question = CategoricalQuestion or RatingQuestion or NumberQuestion or 3 more`

  - `CategoricalQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: array of string`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: optional boolean`

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

      - `multi: optional boolean`

        Whether the question allows multiple answers.

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: string`

      - `type: "user" or "service_account"`

        - `"user"`

        - `"service_account"`

      - `object: optional "identity"`

        - `"identity"`

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "categorical"`

      - `"categorical"`

  - `RatingQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: string`

        Label shown for the maximum rating

      - `min_label: string`

        Label shown for the minimum rating

      - `steps: number`

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

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "rating"`

      - `"rating"`

  - `NumberQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional NumberQuestionConfiguration`

      - `max: optional number`

        Maximum value for the number

      - `min: optional number`

        Minimum value for the number

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "number"`

      - `"number"`

  - `FreeTextQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional FreeTextQuestionConfiguration`

      - `max_length: optional number`

        Maximum characters allowed

      - `min_length: optional number`

        Minimum characters required

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "free_text"`

      - `"free_text"`

  - `FormQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: map[unknown]`

        The JSON schema of the desired form object

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "form"`

      - `"form"`

  - `TimestampQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional TimestampQuestionConfiguration`

      - `multi: optional boolean`

        Whether to allow multiple timestamps

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "timestamp"`

      - `"timestamp"`

### Example

```http
curl https://api.egp.scale.com/v5/questions/$QUESTION_ID \
    -H "x-api-key: $SGP_API_KEY"
```

#### 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

**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.

### Path Parameters

- `question_id: string`

### Body Parameters

- `name: string`

  Display name for the question

### Returns

- `Question = CategoricalQuestion or RatingQuestion or NumberQuestion or 3 more`

  - `CategoricalQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: array of string`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: optional boolean`

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

      - `multi: optional boolean`

        Whether the question allows multiple answers.

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: string`

      - `type: "user" or "service_account"`

        - `"user"`

        - `"service_account"`

      - `object: optional "identity"`

        - `"identity"`

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "categorical"`

      - `"categorical"`

  - `RatingQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: string`

        Label shown for the maximum rating

      - `min_label: string`

        Label shown for the minimum rating

      - `steps: number`

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

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "rating"`

      - `"rating"`

  - `NumberQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional NumberQuestionConfiguration`

      - `max: optional number`

        Maximum value for the number

      - `min: optional number`

        Minimum value for the number

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "number"`

      - `"number"`

  - `FreeTextQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional FreeTextQuestionConfiguration`

      - `max_length: optional number`

        Maximum characters allowed

      - `min_length: optional number`

        Minimum characters required

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "free_text"`

      - `"free_text"`

  - `FormQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: map[unknown]`

        The JSON schema of the desired form object

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "form"`

      - `"form"`

  - `TimestampQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional TimestampQuestionConfiguration`

      - `multi: optional boolean`

        Whether to allow multiple timestamps

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "timestamp"`

      - `"timestamp"`

### Example

```http
curl https://api.egp.scale.com/v5/questions/$QUESTION_ID \
    -X PATCH \
    -H 'Content-Type: application/json' \
    -H "x-api-key: $SGP_API_KEY" \
    -d '{
          "name": "x"
        }'
```

#### 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

**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.

### Path Parameters

- `question_id: string`

### Returns

- `Question = CategoricalQuestion or RatingQuestion or NumberQuestion or 3 more`

  - `CategoricalQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: array of string`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: optional boolean`

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

      - `multi: optional boolean`

        Whether the question allows multiple answers.

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: string`

      - `type: "user" or "service_account"`

        - `"user"`

        - `"service_account"`

      - `object: optional "identity"`

        - `"identity"`

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "categorical"`

      - `"categorical"`

  - `RatingQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: string`

        Label shown for the maximum rating

      - `min_label: string`

        Label shown for the minimum rating

      - `steps: number`

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

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "rating"`

      - `"rating"`

  - `NumberQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional NumberQuestionConfiguration`

      - `max: optional number`

        Maximum value for the number

      - `min: optional number`

        Minimum value for the number

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "number"`

      - `"number"`

  - `FreeTextQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional FreeTextQuestionConfiguration`

      - `max_length: optional number`

        Maximum characters allowed

      - `min_length: optional number`

        Minimum characters required

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "free_text"`

      - `"free_text"`

  - `FormQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: map[unknown]`

        The JSON schema of the desired form object

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "form"`

      - `"form"`

  - `TimestampQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional TimestampQuestionConfiguration`

      - `multi: optional boolean`

        Whether to allow multiple timestamps

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "timestamp"`

      - `"timestamp"`

### Example

```http
curl https://api.egp.scale.com/v5/questions/$QUESTION_ID \
    -X DELETE \
    -H "x-api-key: $SGP_API_KEY"
```

#### 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

**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.

### Path Parameters

- `question_id: string`

### Returns

- `Question = CategoricalQuestion or RatingQuestion or NumberQuestion or 3 more`

  - `CategoricalQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: array of string`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: optional boolean`

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

      - `multi: optional boolean`

        Whether the question allows multiple answers.

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: string`

      - `type: "user" or "service_account"`

        - `"user"`

        - `"service_account"`

      - `object: optional "identity"`

        - `"identity"`

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "categorical"`

      - `"categorical"`

  - `RatingQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: string`

        Label shown for the maximum rating

      - `min_label: string`

        Label shown for the minimum rating

      - `steps: number`

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

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "rating"`

      - `"rating"`

  - `NumberQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional NumberQuestionConfiguration`

      - `max: optional number`

        Maximum value for the number

      - `min: optional number`

        Minimum value for the number

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "number"`

      - `"number"`

  - `FreeTextQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional FreeTextQuestionConfiguration`

      - `max_length: optional number`

        Maximum characters allowed

      - `min_length: optional number`

        Minimum characters required

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "free_text"`

      - `"free_text"`

  - `FormQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: map[unknown]`

        The JSON schema of the desired form object

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "form"`

      - `"form"`

  - `TimestampQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional TimestampQuestionConfiguration`

      - `multi: optional boolean`

        Whether to allow multiple timestamps

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "timestamp"`

      - `"timestamp"`

### Example

```http
curl https://api.egp.scale.com/v5/questions/$QUESTION_ID/restore \
    -X POST \
    -H "x-api-key: $SGP_API_KEY"
```

#### 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

- `CategoricalQuestion object { id, configuration, created_at, 7 more }`

  - `id: string`

    Unique identifier of the entity

  - `configuration: CategoricalQuestionConfiguration`

    - `choices: array of string`

      Categorical answer choices (must contain at least one entry)

    - `dropdown: optional boolean`

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

    - `multi: optional boolean`

      Whether the question allows multiple answers.

  - `created_at: string`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: string`

    - `type: "user" or "service_account"`

      - `"user"`

      - `"service_account"`

    - `object: optional "identity"`

      - `"identity"`

  - `name: string`

  - `prompt: string`

    user-facing question prompt

  - `archived_at: optional string`

    ISO-timestamp when the entity was archived

  - `conditions: optional array of map[unknown]`

    Conditions for the question to be shown

  - `object: optional "question"`

    - `"question"`

  - `question_type: optional "categorical"`

    - `"categorical"`

### Categorical Question Configuration

- `CategoricalQuestionConfiguration object { choices, dropdown, multi }`

  - `choices: array of string`

    Categorical answer choices (must contain at least one entry)

  - `dropdown: optional boolean`

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

  - `multi: optional boolean`

    Whether the question allows multiple answers.

### Form Question

- `FormQuestion object { id, configuration, created_at, 7 more }`

  - `id: string`

    Unique identifier of the entity

  - `configuration: FormQuestionConfiguration`

    - `form_schema: map[unknown]`

      The JSON schema of the desired form object

  - `created_at: string`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: string`

    - `type: "user" or "service_account"`

      - `"user"`

      - `"service_account"`

    - `object: optional "identity"`

      - `"identity"`

  - `name: string`

  - `prompt: string`

    user-facing question prompt

  - `archived_at: optional string`

    ISO-timestamp when the entity was archived

  - `conditions: optional array of map[unknown]`

    Conditions for the question to be shown

  - `object: optional "question"`

    - `"question"`

  - `question_type: optional "form"`

    - `"form"`

### Form Question Configuration

- `FormQuestionConfiguration object { form_schema }`

  - `form_schema: map[unknown]`

    The JSON schema of the desired form object

### Free Text Question

- `FreeTextQuestion object { id, created_at, created_by, 7 more }`

  - `id: string`

    Unique identifier of the entity

  - `created_at: string`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: string`

    - `type: "user" or "service_account"`

      - `"user"`

      - `"service_account"`

    - `object: optional "identity"`

      - `"identity"`

  - `name: string`

  - `prompt: string`

    user-facing question prompt

  - `archived_at: optional string`

    ISO-timestamp when the entity was archived

  - `conditions: optional array of map[unknown]`

    Conditions for the question to be shown

  - `configuration: optional FreeTextQuestionConfiguration`

    - `max_length: optional number`

      Maximum characters allowed

    - `min_length: optional number`

      Minimum characters required

  - `object: optional "question"`

    - `"question"`

  - `question_type: optional "free_text"`

    - `"free_text"`

### Free Text Question Configuration

- `FreeTextQuestionConfiguration object { max_length, min_length }`

  - `max_length: optional number`

    Maximum characters allowed

  - `min_length: optional number`

    Minimum characters required

### Number Question

- `NumberQuestion object { id, created_at, created_by, 7 more }`

  - `id: string`

    Unique identifier of the entity

  - `created_at: string`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: string`

    - `type: "user" or "service_account"`

      - `"user"`

      - `"service_account"`

    - `object: optional "identity"`

      - `"identity"`

  - `name: string`

  - `prompt: string`

    user-facing question prompt

  - `archived_at: optional string`

    ISO-timestamp when the entity was archived

  - `conditions: optional array of map[unknown]`

    Conditions for the question to be shown

  - `configuration: optional NumberQuestionConfiguration`

    - `max: optional number`

      Maximum value for the number

    - `min: optional number`

      Minimum value for the number

  - `object: optional "question"`

    - `"question"`

  - `question_type: optional "number"`

    - `"number"`

### Number Question Configuration

- `NumberQuestionConfiguration object { max, min }`

  - `max: optional number`

    Maximum value for the number

  - `min: optional number`

    Minimum value for the number

### Question

- `Question = CategoricalQuestion or RatingQuestion or NumberQuestion or 3 more`

  - `CategoricalQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: CategoricalQuestionConfiguration`

      - `choices: array of string`

        Categorical answer choices (must contain at least one entry)

      - `dropdown: optional boolean`

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

      - `multi: optional boolean`

        Whether the question allows multiple answers.

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

      - `id: string`

      - `type: "user" or "service_account"`

        - `"user"`

        - `"service_account"`

      - `object: optional "identity"`

        - `"identity"`

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "categorical"`

      - `"categorical"`

  - `RatingQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: RatingQuestionConfiguration`

      - `max_label: string`

        Label shown for the maximum rating

      - `min_label: string`

        Label shown for the minimum rating

      - `steps: number`

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

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "rating"`

      - `"rating"`

  - `NumberQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional NumberQuestionConfiguration`

      - `max: optional number`

        Maximum value for the number

      - `min: optional number`

        Minimum value for the number

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "number"`

      - `"number"`

  - `FreeTextQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional FreeTextQuestionConfiguration`

      - `max_length: optional number`

        Maximum characters allowed

      - `min_length: optional number`

        Minimum characters required

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "free_text"`

      - `"free_text"`

  - `FormQuestion object { id, configuration, created_at, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `configuration: FormQuestionConfiguration`

      - `form_schema: map[unknown]`

        The JSON schema of the desired form object

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "form"`

      - `"form"`

  - `TimestampQuestion object { id, created_at, created_by, 7 more }`

    - `id: string`

      Unique identifier of the entity

    - `created_at: string`

      ISO-timestamp when the entity was created

    - `created_by: Identity`

      The identity that created the entity.

    - `name: string`

    - `prompt: string`

      user-facing question prompt

    - `archived_at: optional string`

      ISO-timestamp when the entity was archived

    - `conditions: optional array of map[unknown]`

      Conditions for the question to be shown

    - `configuration: optional TimestampQuestionConfiguration`

      - `multi: optional boolean`

        Whether to allow multiple timestamps

    - `object: optional "question"`

      - `"question"`

    - `question_type: optional "timestamp"`

      - `"timestamp"`

### Rating Question

- `RatingQuestion object { id, configuration, created_at, 7 more }`

  - `id: string`

    Unique identifier of the entity

  - `configuration: RatingQuestionConfiguration`

    - `max_label: string`

      Label shown for the maximum rating

    - `min_label: string`

      Label shown for the minimum rating

    - `steps: number`

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

  - `created_at: string`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: string`

    - `type: "user" or "service_account"`

      - `"user"`

      - `"service_account"`

    - `object: optional "identity"`

      - `"identity"`

  - `name: string`

  - `prompt: string`

    user-facing question prompt

  - `archived_at: optional string`

    ISO-timestamp when the entity was archived

  - `conditions: optional array of map[unknown]`

    Conditions for the question to be shown

  - `object: optional "question"`

    - `"question"`

  - `question_type: optional "rating"`

    - `"rating"`

### Rating Question Configuration

- `RatingQuestionConfiguration object { max_label, min_label, steps }`

  - `max_label: string`

    Label shown for the maximum rating

  - `min_label: string`

    Label shown for the minimum rating

  - `steps: number`

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

### Timestamp Question

- `TimestampQuestion object { id, created_at, created_by, 7 more }`

  - `id: string`

    Unique identifier of the entity

  - `created_at: string`

    ISO-timestamp when the entity was created

  - `created_by: Identity`

    The identity that created the entity.

    - `id: string`

    - `type: "user" or "service_account"`

      - `"user"`

      - `"service_account"`

    - `object: optional "identity"`

      - `"identity"`

  - `name: string`

  - `prompt: string`

    user-facing question prompt

  - `archived_at: optional string`

    ISO-timestamp when the entity was archived

  - `conditions: optional array of map[unknown]`

    Conditions for the question to be shown

  - `configuration: optional TimestampQuestionConfiguration`

    - `multi: optional boolean`

      Whether to allow multiple timestamps

  - `object: optional "question"`

    - `"question"`

  - `question_type: optional "timestamp"`

    - `"timestamp"`

### Timestamp Question Configuration

- `TimestampQuestionConfiguration object { multi }`

  - `multi: optional boolean`

    Whether to allow multiple timestamps
