Skip to main content
POST
/
api
/
v1
/
refinements
/
{refinement_id}
/
qa
Create Refinement Question
curl --request POST \
  --url https://api.example.com/api/v1/refinements/{refinement_id}/qa \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "question": "<string>",
  "allow_free_text": false,
  "choices": [
    {
      "id": "<string>",
      "label": "<string>"
    }
  ],
  "question_type": "text"
}
'
{
  "answer": "<string>",
  "answered_at": "2023-11-07T05:31:56Z",
  "answered_by": "<string>",
  "asked_by": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "question": "<string>",
  "refinement_id": "<string>",
  "allow_free_text": false,
  "choices": [
    {
      "id": "<string>",
      "label": "<string>"
    }
  ],
  "question_type": "text",
  "selected": [
    "<string>"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.oktolabs.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

refinement_id
string
required

Body

application/json

Schema for creating a Q&A item on a refinement.

question
string
required
Minimum string length: 1
allow_free_text
boolean
default:false
choices
RefinementQAChoiceOption · object[] | null
question_type
string
default:text

Response

Successful Response

Schema for refinement Q&A response.

answer
string | null
required
answered_at
string<date-time> | null
required
answered_by
string | null
required
asked_by
string
required
created_at
string<date-time>
required
id
string
required
question
string
required
refinement_id
string
required
allow_free_text
boolean
default:false
choices
RefinementQAChoiceOption · object[] | null
question_type
string
default:text
selected
string[] | null
Last modified on May 8, 2026