Add patients to cohort
Adds one or more patients to a cohort.
POST
api:manage-patients
Idempotent — patients already in the cohort are skipped. Max 500 per call. If the cohort has template assignments, snapshot documents are seeded for newly added patients in the background.
Parameters
Olira-assigned cohort id.
Olira patient ids to add (max 500).
Returns
CohortPatientMutationResult
Cohort id.
Total enrolled patients after the operation.
Raises
| Exception | When |
|---|---|
AuthError | HTTP 401 or 403 — invalid API key or insufficient OAuth scope for this endpoint. |
ValidationError | HTTP 400, 404, or 422 — malformed JSON, unknown patient, or validation failure (message includes response excerpt). |
ServerError | HTTP 409 (e.g. conflicting external identifier) or repeated 5xx after retries; includes status_code when applicable. |
RateLimitError | HTTP 429 — rate limited; check retry_after (seconds). |
NetworkError | Connection timeout, DNS failure, or read error after retries. |

