POST /v1/enrollments
Service: clinical · operationId: (none)
Required scopes
(no scope declared — review service config)
Request body
{
"type": "object",
"properties": {
"consent": {
"type": "object",
"properties": {
"agreed_to_privacy": {
"type": "boolean",
"enum": [
true
]
},
"agreed_to_terms": {
"type": "boolean",
"enum": [
true
]
}
},
"required": [
"agreed_to_privacy",
"agreed_to_terms"
]
},
"goals": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
},
"intake": {
"type": "object",
"properties": {
"age": {
"type": "integer",
"minimum": 18
},
"conditions": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
},
"email": {
"type": "string",
"format": "email"
},
"full_name": {
"type": "string",
"minLength": 2
},
"notes": {
"type": "string"
}
},
"required": [
"age",
"conditions",
"email",
"full_name"
]
},
"patient_id": {
"type": "string",
"minLength": 1
},
"protocol_id": {
"type": "string",
"minLength": 1
}
},
"required": [
"consent",
"goals",
"intake",
"patient_id",
"protocol_id"
]
}Responses
201 Protocol enrollment created
{
"type": "object",
"properties": {
"enrolled_at": {
"type": "string"
},
"id": {
"type": "string"
},
"patient_id": {
"type": "string"
},
"protocol_id": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"active"
]
}
},
"required": [
"enrolled_at",
"id",
"patient_id",
"protocol_id",
"status"
]
}404 Protocol not found
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}Example
curl -X POST https://clinical.platform.loop.health/v1/enrollments \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'Related
services/clinical— service overview- All endpoints — directory across services
- Auth model — how scopes are enforced