v68

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-0189430445.4 KB
Answers

Create Answer

Create a user-generated Answer that contains a question and answer.

post/rest/api/v1/createanswer

Query parameters

localestring

The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request body

Example request

{
  "data": {
    "question": "Why is the sky blue?",
    "bodyText": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.",
    "audienceFilters": [
      {
        "fieldName": "type",
        "values": [
          {
            "value": "Spreadsheet",
            "relationType": "EQUALS"
          },
          {
            "value": "Presentation",
            "relationType": "EQUALS"
          }
        ]
      }
    ],
    "addedRoles": [
      {
        "person": {
          "name": "George Clooney",
          "obfuscatedId": "abc123"
        }
      }
    ],
    "removedRoles": [
      {
        "person": {
          "name": "George Clooney",
          "obfuscatedId": "abc123"
        }
      }
    ],
    "roles": [
      {
        "person": {
          "name": "George Clooney",
          "obfuscatedId": "abc123"
        }
      }
    ],
    "combinedAnswerText": {
      "text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."
    }
  }
}

Response

OK

idinteger required

The opaque ID of the Answer.

docIdstring

Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID isn't available. If both are available, using the Answer ID is preferred.

questionstring
questionVariationsstring[]

Additional ways of phrasing this question.

bodyTextstring

The plain text answer to the question.

boardIdinteger

The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted.

sourceType'DOCUMENT' | 'ASSISTANT'
trackingTokenstring

An opaque token that represents this particular UGC. To be used for /feedback reporting.

createTimestring date-time

The time the answer was created in ISO format (ISO 8601).

updateTimestring date-time

The time the answer was last updated in ISO format (ISO 8601).

documentCategorystring

The document's document_category(.proto).