Respond to a check-in
POST/api/public/updates/{updateId}/respond
Respond to a submitted check-in. Accepts any id returned by GET /updates or GET /forms/registration, resolving it to a form response or a legacy update record and applying the same review flow the dashboard uses: the record is marked Handled, coachNotes, feedback and rating are stored, and target changes (trainingDays, cardioDays, cardioTime, dailyStepsTarget, nutritionNotes) update the active coaching period. customTrainingPlan and customNutritionPlan switch the active plan or menu to the given id. Feedback is delivered to the trainee as an in-app notification by default; setting notificationChannel to whatsapp or both, or supplying whatsappMessage, sends WhatsApp and additionally requires the messaging:send scope.
Authentication
Requires an API key, sent as Authorization: Bearer cp_live_....
API keys carry scopes. Get the catalog of scopes and webhook events lists every scope.
Path parameters
| Name | Type | Description |
|---|---|---|
updateIdrequired | string |
Header parameters
| Name | Type | Description |
|---|---|---|
Idempotency-Key | string | Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate. |
Request body
application/json, required
| Name | Type | Description |
|---|---|---|
coachNotes | string | Private note, never shown to the trainee. |
feedback | string | Feedback text delivered to the trainee. |
rating | integer | |
trainingDays | integer | |
cardioDays | integer | |
cardioTime | integer | Cardio minutes per session. |
dailyStepsTarget | integer | |
nutritionNotes | string | |
customTrainingPlan | string | Training plan id to switch the coaching period to. |
customNutritionPlan | string | Nutrition menu id to switch the coaching period to. |
saveFeedbackToTrainee | boolean | |
notificationChannel | string | How to deliver the feedback. Defaults to notification (in-app). whatsapp and both require the messaging:send scope. |
whatsappMessage | string | WhatsApp text to send instead of the feedback text. Requires the messaging:send scope. |
Request examples
curl --request POST \
--url 'https://api.coach-platform.com/api/public/updates/<updateId>/respond' \
--header 'Authorization: Bearer cp_live_...' \
--header 'Content-Type: application/json' \
--data '{
"coachNotes": "<string>"
}'const response = await fetch('https://api.coach-platform.com/api/public/updates/<updateId>/respond', {
method: 'POST',
headers: {
Authorization: 'Bearer cp_live_...',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"coachNotes": "<string>"
}),
});
const data = await response.json();Responses
200 OK
Successful response
{
"data": {
"id": "<string>",
"target": "formResponse",
"whatsappSent": true
}
}Response fields (4)
| Name | Type | Description |
|---|---|---|
data | object | |
data.id | string | |
data.target | string | Which kind of record the id resolved to. |
data.whatsappSent | boolean |
Error responses
400Bad Request401Unauthorized403Forbidden404Not Found409Conflict429Too Many Requests500Internal Server Error
These statuses share the same response body.
{
"error": {
"code": "<string>",
"message": "<string>",
"fix": "<string>",
"details": {},
"retryAfterMs": 123
}
}Error fields (6)
| Name | Type | Description |
|---|---|---|
error | object | |
error.code | string | |
error.message | string | |
error.fix | string | null | |
error.details | object | null | |
error.retryAfterMs | number | null |
More Forms endpoints
This page is also available as Markdown. Browse it in the interactive explorer or download the OpenAPI spec.