Create a condition for a content block
Creates a condition requiring progress on another block before this block unlocks. Scoped to your integration’s institution via Basic Auth credentials.
POST
/content-blocks/{id}/conditionsPath parameters
idstringrequiredContent block ID
Request body
requiredapplication/jsonrequiredBlockIdstringrequiredID of the content block that must meet the condition.
min length 1
conditionTypestringrequiredType of condition to evaluate
Allowed:
SimpleDependencySurveyDataWorkbenchDataGradeDataconditionobjectrequiredCondition-specific data. SimpleDependency: `{ requiredStatus: string[] }`. SurveyData: `{ questionId: string, optionIds: string[] }`. WorkbenchData: `{ workbenchFileId: string, requiredStatus: string }`. GradeData: `{ passed: boolean }`.
Responses
201Condition created
dataConditionrequiredUnlock condition on a content block. The block stays locked until the referenced `requiredBlockId` satisfies `conditionType` and `condition`.
Show propertiesHide properties
idstringrequiredCondition ID
blockIdstringrequiredContent block this condition belongs to
requiredBlockIdstringrequiredID of the content block that must meet the condition.
conditionTypestringrequiredSimpleDependency: block must have a specific status. SurveyData: survey must have specific answers. WorkbenchData: workbench must meet criteria. GradeData: grade must meet criteria.
Allowed:
SimpleDependencySurveyDataWorkbenchDataGradeDataconditionobjectrequiredCondition-specific data. Structure depends on conditionType.
requiredBlockobjectShow propertiesHide properties
idstringnamestringtypestringmetaResponseMetarequiredShow propertiesHide properties
requestIdstringrequiredtimestampstring<date-time>requiredversionstringrequiredAllowed:
v4400Bad Request
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring401Unauthorized
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring403Forbidden
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring409Conflict
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring429Too Many Requests
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring500Internal Server Error
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestringRequest
curl -X POST "https://fuxam.app/api/v4/content-blocks/string/conditions" \
-H "Content-Type: application/json" \
-d '{
"requiredBlockId": "string",
"conditionType": "SimpleDependency",
"condition": {}
}'const response = await fetch("https://fuxam.app/api/v4/content-blocks/string/conditions", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"requiredBlockId": "string",
"conditionType": "SimpleDependency",
"condition": {}
})
});import requests
response = requests.post(
"https://fuxam.app/api/v4/content-blocks/string/conditions",
headers={
"Content-Type": "application/json"
},
json={
"requiredBlockId": "string",
"conditionType": "SimpleDependency",
"condition": {}
},
)Response
{
"data": {
"id": "string",
"blockId": "string",
"requiredBlockId": "string",
"conditionType": "SimpleDependency",
"condition": {},
"requiredBlock": {
"id": "string",
"name": "string",
"type": "string"
}
},
"meta": {
"requestId": "req_1234567890_abc",
"timestamp": "2026-06-02T07:00:00.000Z",
"version": "v4"
}
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}