---
title: "Create company question"
method: POST
path: "/v2/companies/{companyId}/questions"
tags: ["Custom Fields"]
deprecated: true
---

# Create company question

`POST /v2/companies/{companyId}/questions`

## Request

- Base URL: `https://api-ext-sboxmeta.partners.spotnana.com`
- URL: `https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/{companyId}/questions`
- Auth: HTTP bearer

> **Deprecated.**

## Request body

- CreateQuestionRequest: Request for question creation.
  - `name` string, required: Question display name that the user will see. For eg, 'Choose the purpose of your trip'.
  - `questionFormat` 'INPUT_BOX' | 'RADIO_BUTTON' | 'CHECKBOX' | 'CHECKBOX_WITH_PERCENTAGE', required: Question types. INPUT_BOX will make user enter a free flowing text. RADIO_BUTTON will have multiple options, user can select only one. CHECKBOX questions contain the possible set of options, from which the user can choose multiple options. CHECKBOX_WITH_PERCENTAGE is similar to checkbox, with the difference being that each option having an additional input field whose values must add up to 100.
  - `optionInfo` OptionInfo: Options related information for the question.
    - `source` 'MANUAL' | 'COMPANY_CONFIG', required: Option source
    - `sourceMetadata` OptionSourceMetadata: Wrapper for option source company config.
      - `companyConfig` CompanyConfigSource: For this option source, options would be auto generated based on specified parameter.
        - `optionsParam` 'COST_CENTER' | 'LEGAL_ENTITY' | 'OFFICE' | 'DEPARTMENT', required: Parameter to form options for the custom field.
    - `totalNumOptions` integer: Total number of options
    - `options` Option[]: Available options for the question. This will contain only max 10 options if only summary is requested.
      - `displayCode` string, required: The code which is sent in answer response.
      - `displayValue` string: The text to be displayed to the user beside this option.
  - `isRequired` boolean, required: Whether its compulsory to answer the question or not.
  - `isDisabled` boolean, required: Whether the question is disabled or not. If true, this should not be asked.
  - `includeInItinerary` boolean: Whether to include this question in the itinerary related emails.
  - `customFieldLocations` CustomFieldLocation[]
  - `matchConditions` CustomFieldMatchConditions: Conditions to select the custom field for given context.
    - `travelerConditions` TravelerMatchConditions: Matching conditions for traveler.
      - `workerTypes` WorkerType[]: Worker types. Users belonging to any of these would match.
      - `countries` string[]: Countries.
      - `legalEntities` Reference[]: Legal entities
        - `id` string, uuid, required
        - `name` string
      - `departments` Reference[]: Departments
        - `id` string, uuid, required
        - `name` string
      - `costCenters` Reference[]: Cost centers
        - `id` string, uuid, required
        - `name` string
      - `offices` Reference[]: Offices
        - `id` string, uuid, required
        - `name` string
    - `travelTypes` TravelType[]: Travel types to match.
    - `travelRegionTypes` TravelRegionType[]: Travel region types to match.
    - `tripUsageTypes` TripUsageType[]: Trip usage types to match. If empty, all trip usage types will be matched.

## Response `200`

OK

- EntityId: Identifier of an object
  - `id` string, uuid, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: The specified resource was not found.

## Changes

- **2026-09-10** `40073a2635de`: 1 info
  - endpoint deprecated with sunset date `2027-07-01`

[Operation history](https://skmtc.dev/spotnana/apis/policy-api/changes/v2/companies/:companyId/questions/post.md)

---

[API](https://skmtc.dev/spotnana/apis/policy-api.md) - [All operations](https://skmtc.dev/spotnana/apis/policy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spotnana/apis/policy-api/revisions/acc1e7cac8c4?raw)
