POST /v1/coach-assignments
Service: membership · operationId: (none)
Required scopes
(no scope declared — review service config)
Request body
{
"type": "object",
"properties": {
"patient_id": {
"type": "string",
"format": "uuid"
},
"coach_user_id": {
"type": "string",
"format": "uuid"
},
"protocol_id": {
"type": [
"string",
"null"
],
"format": "uuid"
}
},
"required": [
"patient_id",
"coach_user_id"
]
}Responses
201 Coach assignment created (or returned idempotently)
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"coach_user_id": {
"type": "string",
"format": "uuid"
},
"patient_id": {
"type": "string",
"format": "uuid"
},
"brand_id": {
"type": "string"
},
"protocol_id": {
"type": [
"string",
"null"
],
"format": "uuid"
},
"effective_at": {
"type": "string"
},
"ended_at": {
"type": [
"string",
"null"
]
},
"created_by": {
"type": "string",
"format": "uuid"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"required": [
"id",
"coach_user_id",
"patient_id",
"brand_id",
"protocol_id",
"effective_at",
"ended_at",
"created_by",
"metadata",
"created_at",
"updated_at"
]
}403 Forbidden
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}500 Internal error
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}Example
curl -X POST https://membership.platform.loop.health/v1/coach-assignments \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'Related
services/membership— service overview- All endpoints — directory across services
- Auth model — how scopes are enforced