---
updatedAt: 2026-01-28T20:52:08.000Z
agentTools:
  projectIndex: https://developer.vyasa.com/llms.txt
---

# Create a new question

Create a new Question object.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Layar API Documentation",
    "version": "v1.927.2",
    "contact": {
      "name": "Certara AI Support",
      "email": "AI-Support@Certara.com",
      "url": "https://vyasa.readme.io/"
    }
  },
  "servers": [
    {
      "url": "BASE_PATH"
    }
  ],
  "paths": {
    "/layar/question": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "datePublished": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "assignedUserCount": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "assignedUserIds": {
                    "type": "array",
                    "items": {
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "batchGroupingKey": {
                    "type": "string"
                  },
                  "bestAnswers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "complete": {
                    "type": "boolean"
                  },
                  "conceptTypes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "curatedAnswerUserCount": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "curatedAnswerTotalCount": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "curatedAnswerUniqueCount": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "curationPercentComplete": {
                    "format": "double",
                    "type": "number"
                  },
                  "curationDiscord": {
                    "type": "boolean"
                  },
                  "deepLearningModelId": {
                    "type": "string"
                  },
                  "dataProviders": {
                    "type": "string"
                  },
                  "fieldToAnalyze": {
                    "type": "string"
                  },
                  "hasAnswers": {
                    "type": "boolean"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "minimumRequestedAnswers": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "moderated": {
                    "type": "boolean"
                  },
                  "moderatorUserIds": {
                    "type": "array",
                    "items": {
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "numberOfBestAnswers": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "queryString": {
                    "type": "string"
                  },
                  "questionKey": {
                    "type": "string"
                  },
                  "search": {
                    "type": "object",
                    "$ref": "#/components/schemas/ParagraphQuestionSearchCommand"
                  },
                  "searchCommandJsonString": {
                    "type": "string"
                  },
                  "sectionKeywords": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "singleDocQuestionDocumentId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "QUEUED",
                      "COMPLETE",
                      "ERROR"
                    ]
                  },
                  "template": {
                    "deprecated": true,
                    "type": "string"
                  },
                  "truncateTextToLength": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "typeOfSearch": {
                    "type": "string",
                    "$ref": "#/components/schemas/QuestionAnswerTypeOfSearch"
                  },
                  "userCurations": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/UserCuration"
                    }
                  },
                  "advancedParams": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/xVyasaDataProvidersParam"
          },
          {
            "$ref": "#/components/parameters/xVyasaQuestionAnswerAdvancedParams"
          }
        ],
        "operationId": "createQuestion",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/Question"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Create a new question",
        "description": "Create a new Question object.",
        "tags": [
          "question"
        ]
      }
    }
  },
  "tags": [
    {
      "description": "Question",
      "name": "question"
    }
  ],
  "components": {
    "parameters": {
      "xVyasaDataProvidersParam": {
        "in": "header",
        "name": "X-Vyasa-Data-Providers",
        "schema": {
          "type": "string"
        },
        "required": true,
        "example": "master-pubmed.vyasa.com",
        "description": "remote data providers to query"
      },
      "xVyasaQuestionAnswerAdvancedParams": {
        "in": "header",
        "name": "X-Vyasa-Advanced-Parameters",
        "schema": {
          "type": "string"
        },
        "required": false,
        "example": "{\"null_threshold\":0}",
        "description": "for advanced users and debugging.  A JSON structure overriding default Question Answering parameters"
      }
    },
    "schemas": {
      "DomainObject": {
        "title": "DomainObject",
        "type": "object",
        "properties": {
          "createdByUser": {
            "format": "int64",
            "type": "integer"
          },
          "dateIndexed": {
            "format": "date-time",
            "type": "string"
          },
          "datePublished": {
            "format": "date-time",
            "type": "string"
          },
          "dateUpdated": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "Curation": {
        "title": "UserCuration",
        "type": "object",
        "properties": {
          "answerId": {
            "type": "string"
          },
          "customString": {
            "type": "string"
          },
          "customStringContext": {
            "type": "object",
            "properties": {
              "documentId": {
                "type": "string"
              },
              "paragraphId": {
                "type": "string"
              },
              "sectionHeading": {
                "type": "string"
              },
              "textField": {
                "type": "string"
              },
              "provider": {
                "type": "string"
              },
              "startOffset": {
                "format": "int64",
                "type": "integer"
              },
              "endOffset": {
                "format": "int64",
                "type": "integer"
              },
              "startsOnPageNumber": {
                "format": "int64",
                "type": "integer"
              }
            }
          },
          "notes": {
            "type": "string"
          },
          "curationType": {
            "$ref": "#/components/schemas/CurationType"
          }
        }
      },
      "NamedEntity": {
        "properties": {
          "columnKey": {
            "type": "string"
          },
          "concept": {
            "type": "string"
          },
          "pos": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "format": "int32",
                "type": "number"
              }
            }
          },
          "typeId": {
            "type": "string"
          }
        }
      },
      "Question": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DomainObject"
          },
          {
            "type": "object",
            "properties": {
              "assignedUserCount": {
                "format": "int64",
                "type": "integer"
              },
              "assignedUserIds": {
                "type": "array",
                "items": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "batchGroupingKey": {
                "type": "string"
              },
              "bestAnswers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "complete": {
                "type": "boolean"
              },
              "conceptTypes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "curatedAnswerUserCount": {
                "format": "int64",
                "type": "integer"
              },
              "curatedAnswerTotalCount": {
                "format": "int64",
                "type": "integer"
              },
              "curatedAnswerUniqueCount": {
                "format": "int64",
                "type": "integer"
              },
              "curationPercentComplete": {
                "format": "double",
                "type": "number"
              },
              "curationDiscord": {
                "type": "boolean"
              },
              "deepLearningModelId": {
                "type": "string"
              },
              "dataProviders": {
                "type": "string"
              },
              "fieldToAnalyze": {
                "type": "string"
              },
              "hasAnswers": {
                "type": "boolean"
              },
              "jobId": {
                "type": "string"
              },
              "minimumRequestedAnswers": {
                "format": "int32",
                "type": "integer"
              },
              "moderated": {
                "type": "boolean"
              },
              "moderatorUserIds": {
                "type": "array",
                "items": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "numberOfBestAnswers": {
                "format": "int32",
                "type": "integer"
              },
              "queryString": {
                "type": "string"
              },
              "questionKey": {
                "type": "string"
              },
              "search": {
                "type": "object",
                "$ref": "#/components/schemas/ParagraphQuestionSearchCommand"
              },
              "searchCommandJsonString": {
                "type": "string"
              },
              "sectionKeywords": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "singleDocQuestionDocumentId": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "QUEUED",
                  "COMPLETE",
                  "ERROR"
                ]
              },
              "template": {
                "deprecated": true,
                "type": "string"
              },
              "truncateTextToLength": {
                "format": "int32",
                "type": "integer"
              },
              "typeOfSearch": {
                "type": "string",
                "$ref": "#/components/schemas/QuestionAnswerTypeOfSearch"
              },
              "userCurations": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UserCuration"
                }
              },
              "advancedParams": {
                "type": "object"
              }
            }
          }
        ]
      },
      "UserCuration": {
        "title": "UserCuration",
        "type": "object",
        "properties": {
          "createdByUser": {
            "format": "int64",
            "type": "integer"
          },
          "curations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Curation"
            }
          }
        }
      },
      "CurationType": {
        "title": "CurationType",
        "type": "string",
        "enum": [
          "ACCEPTED_EXISTING",
          "SELECT_FROM_TEXT",
          "SELECT_FROM_PDF",
          "CUSTOM",
          "UNKNOWN",
          "NONE"
        ]
      },
      "LiveSourceType": {
        "title": "LiveSourceType",
        "enum": [
          "RSS",
          "WEBSITE",
          "TWITTER",
          "GCS",
          "GOOGLE_DRIVE",
          "S3",
          "GBQ_PROJECT",
          "GBQ_DATASET",
          "GBQ_FHIR_PROJECT",
          "NEO4J_CYPHER"
        ],
        "type": "string"
      },
      "QuestionAnswerTypeOfSearch": {
        "title": "QuestionAnswerTypeOfSearch",
        "enum": [
          "DOCUMENT",
          "DOCUMENT_AS_PARAGRAPHS",
          "PARAGRAPH"
        ],
        "type": "string"
      },
      "SourceDocumentType": {
        "type": "string",
        "enum": [
          "DOCUMENT",
          "IMAGE",
          "IMAGE_GROUP",
          "WEBSITE",
          "RSS",
          "TABLE",
          "SDF"
        ]
      },
      "BaseSearchCommand": {
        "title": "BaseSearch",
        "type": "object",
        "properties": {
          "fromDate": {
            "format": "date-time",
            "type": "string",
            "description": "Starting date formatted as YYYY-MM-DD"
          },
          "q": {
            "type": "string",
            "description": "The query string to search for"
          },
          "rows": {
            "format": "int32",
            "type": "integer",
            "description": "The number of results to return"
          },
          "sort": {
            "type": "string",
            "description": "The result value to sort by"
          },
          "sortOrder": {
            "type": "string",
            "description": "The order to sort by (ex- 'ASC' or 'DESC')"
          },
          "start": {
            "format": "int32",
            "type": "integer",
            "description": "The index of the row to start returning values from"
          },
          "toDate": {
            "format": "date-time",
            "type": "string",
            "description": "Ending date formatted as YYYY-MM-DD"
          }
        }
      },
      "ParagraphQuestionSearchCommand": {
        "title": "ParagraphQuestionSearchCommand",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseSearchCommand"
          },
          {
            "type": "object",
            "properties": {
              "paragraphSearchCommand": {
                "type": "object",
                "$ref": "#/components/schemas/ParagraphSearchCommand"
              },
              "queryClauses": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "sourceDocumentSearchCommand": {
                "type": "object",
                "$ref": "#/components/schemas/SourceDocumentSearchCommand"
              }
            }
          }
        ]
      },
      "ParagraphSearchCommand": {
        "title": "ParagraphSearchCommand",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseSearchCommand"
          },
          {
            "type": "object",
            "properties": {
              "documentIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The list of Layar document IDs to search within"
              },
              "excludes": {
                "$ref": "#/components/schemas/ParagraphExcludeSearchCommand"
              },
              "highlight": {
                "type": "boolean",
                "description": "Allows the ability to turn on/off concept highlighting ion your results"
              },
              "highlightFragmentSize": {
                "format": "int32",
                "type": "integer"
              },
              "highlightNumberOfFragments": {
                "format": "int32",
                "type": "integer"
              },
              "highlightPostTag": {
                "type": "string",
                "description": "The closing tag to denote concept highlighting"
              },
              "highlightPreTag": {
                "type": "string",
                "description": "The opening tag to denote concept highlighting"
              },
              "ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Limit your search to a list of specific IDs"
              },
              "similarIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "similarText": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "sources": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Limit your search to specific data sources"
              }
            }
          }
        ]
      },
      "SourceDocumentSearchCommand": {
        "title": "SourceDocumentSearchCommand",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseSearchCommand"
          },
          {
            "type": "object",
            "properties": {
              "annotationSearches": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AnnotationSearch"
                }
              },
              "categoryIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "conceptIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "connectorId": {
                "type": "string"
              },
              "connectorIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "dataSourceTypes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "excludes": {
                "$ref": "#/components/schemas/SourceDocumentExcludeSearchCommand"
              },
              "filters": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldFilter"
                }
              },
              "filterOp": {
                "type": "string",
                "enum": [
                  "AND",
                  "OR"
                ]
              },
              "hasFields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "highlight": {
                "type": "boolean"
              },
              "highlightFragmentSize": {
                "type": "integer",
                "format": "int32"
              },
              "highlightNumberOfFragments": {
                "type": "integer",
                "format": "int32"
              },
              "highlightPostTag": {
                "type": "string"
              },
              "highlightPreTag": {
                "type": "string"
              },
              "ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "liveSourceId": {
                "type": "string"
              },
              "liveSourceIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "liveSourceTypes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LiveSourceType"
                }
              },
              "logSearch": {
                "type": "boolean"
              },
              "mimeTypes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "mustHaveAnnotations": {
                "type": "boolean"
              },
              "namedEntities": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NamedEntity"
                }
              },
              "parentIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "paths": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "projectComputationId": {
                "type": "string"
              },
              "question": {
                "type": "string"
              },
              "savedListIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "sectionSearches": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SectionSearch"
                }
              },
              "similarityDocumentId": {
                "type": "string"
              },
              "similarityThreshold": {
                "type": "number",
                "format": "float"
              },
              "sourceFields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "sources": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "termOperator": {
                "type": "string",
                "enum": [
                  "AND",
                  "OR"
                ]
              },
              "terms": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "trialData": {
                "type": "object"
              },
              "type": {
                "$ref": "#/components/schemas/SourceDocumentType"
              },
              "types": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SourceDocumentType"
                }
              },
              "userIds": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "vyasaClients": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ]
      },
      "SourceDocumentExcludeSearchCommand": {
        "title": "SourceDocumentExcludeSearchCommand",
        "type": "object",
        "properties": {
          "annotationSearches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnnotationSearch"
            }
          },
          "categoryIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "conceptIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "connectorId": {
            "type": "string"
          },
          "connectorIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dataSourceTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "hasFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "highlight": {
            "type": "boolean"
          },
          "highlightFragmentSize": {
            "type": "integer",
            "format": "int32"
          },
          "highlightNumberOfFragments": {
            "type": "integer",
            "format": "int32"
          },
          "highlightPostTag": {
            "type": "string"
          },
          "highlightPreTag": {
            "type": "string"
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "liveSourceId": {
            "type": "string"
          },
          "liveSourceIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "liveSourceTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LiveSourceType"
            }
          },
          "logSearch": {
            "type": "boolean"
          },
          "mimeTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mustHaveAnnotations": {
            "type": "boolean"
          },
          "namedEntities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NamedEntity"
            }
          },
          "parentIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "paths": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "projectComputationId": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "savedListIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sectionSearches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SectionSearch"
            }
          },
          "similarityDocumentId": {
            "type": "string"
          },
          "similarityThreshold": {
            "type": "number",
            "format": "float"
          },
          "sourceFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "termOperator": {
            "type": "string",
            "enum": [
              "AND",
              "OR"
            ]
          },
          "terms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "trialData": {
            "type": "object"
          },
          "type": {
            "$ref": "#/components/schemas/SourceDocumentType"
          },
          "types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceDocumentType"
            }
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "vyasaClients": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ParagraphExcludeSearchCommand": {
        "title": "ParagraphExcludeSearchCommand",
        "type": "object",
        "properties": {
          "documentIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "highlight": {
            "type": "boolean"
          },
          "highlightFragmentSize": {
            "format": "int32",
            "type": "integer"
          },
          "highlightNumberOfFragments": {
            "format": "int32",
            "type": "integer"
          },
          "highlightPostTag": {
            "type": "string"
          },
          "highlightPreTag": {
            "type": "string"
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "similarIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "similarText": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AnnotationSearch": {
        "title": "AnnotationSearch",
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "valueType": {
            "type": "string",
            "enum": [
              "STRING",
              "BOOLEAN",
              "INTEGER",
              "DOUBLE",
              "DATE"
            ]
          },
          "values": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          "minValue": {
            "type": "integer"
          },
          "maxValue": {
            "type": "integer"
          },
          "minDateValue": {
            "format": "date-time",
            "type": "string"
          },
          "maxDateValue": {
            "format": "date-time",
            "type": "string"
          }
        }
      },
      "SectionSearch": {
        "title": "SectionSearch",
        "type": "object",
        "properties": {
          "heading": {
            "type": "string"
          },
          "section": {
            "type": "string"
          }
        }
      },
      "FieldFilter": {
        "type": "object",
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "AND",
              "OR"
            ]
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "exists": {
                  "type": "boolean"
                },
                "minValue": {
                  "type": "number"
                },
                "maxValue": {
                  "type": "number"
                },
                "minDate": {
                  "format": "date-time",
                  "type": "string"
                },
                "maxDate": {
                  "format": "date-time",
                  "type": "string"
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "oAuth2ClientCredentials": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "CONNECT_API_URL/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "oAuth2ClientCredentials": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```