Get All Endpoint GET /v1/question/all/
| Resource URL | /v1/question/all/ |
|---|
| Response Format | JSON |
| Requires Authentication | Yes |
| Rate Limited | No |
| HTTPS | Yes |
Retrieve all questions without pagination.
curl -X 'GET' \
'https://braegen.ai/v1/question/all/' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>'
{
"description": "Successful Response"
}
| HTTP Code | Message |
|---|
| 200 | Successful Response |
Get Questions Endpoint GET /v1/question/all_filtered/
| Resource URL | /v1/question/all_filtered/ |
|---|
| Response Format | JSON |
| Requires Authentication | Yes |
| Rate Limited | No |
| HTTPS | Yes |
Retrieve questions with optional filters.
| Parameter | Description | Required | Type | Default Value |
|---|
| page | Page number | No | Integer | 1 |
| page_size | Number of items per page | No | Integer | 10 |
| list_id | List ID to filter questions | No | Integer | N/A |
| group_ids | Comma-separated group IDs | No | String | N/A |
| user | User identifier | No | String | N/A |
| status | Question status(active/inactive) | No | String | N/A |
| answer_format | Answer format | No | String | N/A |
| mandatory | Mandatory flag | No | Boolean | N/A |
| weight | Question weight | No | Integer | N/A |
| search_query | Text to search in question | No | String | N/A |
curl -X 'GET' \
'https://braegen.ai/v1/question/all_filtered/?page=1&page_size=10&list_id=1&group_ids=1,2' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>'
{
"description": "Successful Response"
}
| HTTP Code | Message |
|---|
| 200 | Successful Response |
| 422 | Validation Error |
Get By Id Endpoint GET /v1/question/{question_id}
| Resource URL | /v1/question/{question_id} |
|---|
| Response Format | JSON |
| Requires Authentication | Yes |
| Rate Limited | No |
| HTTPS | Yes |
Retrieve a question by its ID.
| Parameter | Description | Required | Type | Default Value |
|---|
| question_id | Question ID | Yes | Integer | N/A |
curl -X 'GET' \
'https://braegen.ai/v1/question/1' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>'
{
"description": "Successful Response"
}
| HTTP Code | Message |
|---|
| 200 | Successful Response |
| 422 | Validation Error |
Update Endpoint PUT /v1/question/{question_id}
| Resource URL | /v1/question/{question_id} |
|---|
| Response Format | JSON |
| Requires Authentication | Yes |
| Rate Limited | No |
| HTTPS | Yes |
Update an existing question by its ID. Status is an enum with values: active and inactive.
| Parameter | Description | Required | Type | Default Value |
|---|
| question_id | Question ID | Yes | Integer | N/A |
| Parameter | Description | Required | Type | Default Value |
|---|
| user | User identifier | No | String | null |
| question | Question text | No | String | null |
| question_list_id | Question list ID | No | Integer | null |
| answer_format | Answer format | No | String | null |
| aliase | Alias for the question | No | String | null |
| status | Status (active/inactive) | No | String | active |
| mandatory | Mandatory flag | No | Boolean | false |
| question_prompt | Question prompt | No | String | null |
| weight | Question weight | No | Integer | null |
| groups | List of group IDs | No | Array | null |
| schema_id | Schema ID | No | Integer | null |
| dependent_question_id | Dependent question ID | No | Integer | null |
| dependent_answer | Dependent answer | No | String | null |
curl -X 'PUT' \
'https://braegen.ai/v1/question/1' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"question": "Updated question",
"status": "active",
"mandatory": true
}'
{
"description": "Successful Response"
}
| HTTP Code | Message |
|---|
| 200 | Successful Response |
| 422 | Validation Error |
Get By Group Name Endpoint GET /v1/question/questions/group_name/{group_name}
| Resource URL | /v1/question/questions/group_name/{group_name} |
|---|
| Response Format | JSON |
| Requires Authentication | Yes |
| Rate Limited | No |
| HTTPS | Yes |
Retrieve questions by group name.
| Parameter | Description | Required | Type | Default Value |
|---|
| group_name | Group name | Yes | String | N/A |
curl -X 'GET' \
'https://braegen.ai/v1/question/questions/group_name/sample_group' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>'
{
"description": "Successful Response"
}
| HTTP Code | Message |
|---|
| 200 | Successful Response |
| 422 | Validation Error |
Create Endpoint POST /v1/question/
| Resource URL | /v1/question/ |
|---|
| Response Format | JSON |
| Requires Authentication | Yes |
| Rate Limited | No |
| HTTPS | Yes |
Create a new question. Status is an enum with values: active and inactive.
| Parameter | Description | Required | Type | Default Value |
|---|
| user | User identifier | No | String | null |
| question | Question text | No | String | null |
| question_list_id | Question list ID | No | Integer | null |
| answer_format | Answer format | No | String | null |
| aliase | Alias for the question | No | String | null |
| status | Status (active/inactive) | No | String | active |
| mandatory | Mandatory flag | No | Boolean | false |
| question_prompt | Question prompt | No | String | null |
| weight | Question weight | No | Integer | null |
| groups | List of group IDs | No | Array | null |
| schema_id | Schema ID | No | Integer | null |
| dependent_question_id | Dependent question ID | No | Integer | null |
| dependent_answer | Dependent answer | No | String | null |
curl -X 'POST' \
'https://braegen.ai/v1/question/' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"question": "Sample question",
"status": "active",
"mandatory": true
}'
{
"description": "Successful Response"
}
| HTTP Code | Message |
|---|
| 200 | Successful Response |
| 422 | Validation Error |
Delete Endpoint DELETE /v1/question/multiple/
| Resource URL | /v1/question/multiple/ |
|---|
| Response Format | JSON |
| Requires Authentication | Yes |
| Rate Limited | No |
| HTTPS | Yes |
Delete multiple questions by their IDs.
| Parameter | Description | Required | Type | Default Value |
|---|
| user_id | User ID | No | String | N/A |
| Parameter | Description | Required | Type | Default Value |
|---|
| ids | List of question IDs | Yes | Array | N/A |
curl -X 'DELETE' \
'https://braegen.ai/v1/question/multiple/?user_id=user_123' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '[1, 2, 3]'
{
"description": "Successful Response"
}
| HTTP Code | Message |
|---|
| 200 | Successful Response |
| 422 | Validation Error |