---
search:
  tags:
    - Content blocks
    - POST
seo:
  description: >-
    Creates a condition requiring progress on another block before this…
    Reference for the POST /content-blocks/{id}/conditions endpoint in the Fuxam
    API v4.
sidebar:
  label: Create a condition for a content block
  badge: POST
title: Create a condition for a content block
type: openapi-operation
---
Creates a condition requiring progress on another block before this block unlocks. Idempotent via `Idempotency-Key` header. Scoped to your integration's institution via Basic Auth credentials.

`POST /content-blocks/{id}/conditions`

**Request body** (`application/json`, required)

- `requiredBlockId` (string, required) — ID of the content block that must meet the condition.
- `conditionType` (string, required) — Type of condition to evaluate
- `condition` (object, required) — Condition-specific data. SimpleDependency: \`{ requiredStatus: string\[\] }\`. SurveyData: \`{ questionId: string, expectedAnswer: string }\`. WorkbenchData: \`{ elementId: string, optionIds: string\[\] }\`. GradeData: \`{ passed: boolean }\`.

Request body example, SimpleDependency:

```json
{
  "requiredBlockId": "block_prev_xyz",
  "conditionType": "SimpleDependency",
  "condition": {
    "requiredStatus": [
      "FINISHED",
      "REVIEWED"
    ]
  }
}
```

Request body example, SurveyData:

```json
{
  "requiredBlockId": "block_survey_abc",
  "conditionType": "SurveyData",
  "condition": {
    "questionId": "q_123",
    "expectedAnswer": "opt_1"
  }
}
```

Request body example, WorkbenchData:

```json
{
  "requiredBlockId": "block_workbench_def",
  "conditionType": "WorkbenchData",
  "condition": {
    "elementId": "elem_abc",
    "optionIds": [
      "opt_1",
      "opt_2"
    ]
  }
}
```

Request body example, GradeData:

```json
{
  "requiredBlockId": "block_exam_ghi",
  "conditionType": "GradeData",
  "condition": {
    "passed": true
  }
}
```

**Responses**

- `201` — Condition created
- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `409` — Conflict — duplicate email or membership code (body includes \`existingUserId\` when known), a time-tracking session that is already running (\`activeSession\`), a time-tracking interval that overlaps an existing log (\`conflictingLog\`), idempotency key reused with a different body (\`idempotency\_key\_reused\`), or concurrent request with the same key still in progress (\`idempotency\_key\_in\_progress\`)
- `429` — Too Many Requests — 1000 requests per minute per institution. Includes \`X-RateLimit-Limit\`, \`X-RateLimit-Remaining\`, \`X-RateLimit-Reset\` (ISO-8601), and \`Retry-After\` (seconds).
- `500` — Internal Server Error
- `503` — Service unavailable — idempotency store temporarily unreachable, or the database is busy (lock wait, transaction timeout, or exhausted serialization/deadlock retries). Database contention includes \`Retry-After: 1\`. The idempotency key is released. Retry the same key (\`service\_unavailable\`).

Response example, 201:

```json
{
  "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",
    "watermark": "2019-08-24T14:15:22Z"
  }
}
```
