Technical reference
Prompt My Candis API
Create, read and update CANDIS entries over HTTP — with a browser session or a personal trv_… token.
Base
https://promptmycandis.com/api/v1
Authentication
Preferred: token in the header. Generate it in Profile (after you log in).
Authorization: Bearer trv_••••••••
Alternative: session cookie (same routes, from an authenticated browser).
Quick start
- Log in and generate a token in your profile
PUT /diary/AAAA-MM-DD— PUT /diary/YYYY-MM-DD with consumed and, if yes, slots- Confirm with GET /diary/YYYY-MM-DD or in the app history
curl -X PUT "https://promptmycandis.com/api/v1/diary/2026-07-27" \
-H "Authorization: Bearer trv_SEU_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"consumed": false,
"notes": "Dia limpo"
}'
/me
Authenticated user.
{
"ok": true,
"user": { "id": 1, "email": "…", "name": "…", "role": "patient" }
}
/stats?days=28
Motivational summary (streak, trend, days logged).
/diary
List entries. Optional query: from, to (ISO), limit (max 365).
/diary/<AAAA-MM-DD>
One day. 404 if it doesn't exist yet.
/diary/<AAAA-MM-DD>
Create or update the day (also accepts POST). Future days → 400.
{
"consumed": true,
"notes": "opcional",
"slots": {
"morning": [{ "qty": 1, "method": "C" }],
"afternoon": [],
"evening": [{ "qty": 2, "method": "B" }],
"night": []
}
}
Response includes created: true|false and the saved entry.
/diary/<AAAA-MM-DD>
Delete that day's entry.
Slots and methods
Time slots
morning— 6:00 – 12:00afternoon— 12:00 – 18:00evening— 18:00 – 24:00night— 24:00 – 6:00
Methods
C— JointB— BongBA— BucketCA— PipeO— Other
Errors
401— not authenticated ({"ok":false,"error":"auth"})403— account without a defined role400— invalid date, future, or missing consumed404— entry not found
Assistants and automation
Yes — you can ask an assistant (like Cursor) to create entries for you: share the token (or generate one just for that) and give dates / use. Revoke the token in your profile when you no longer need it.
Health data: treat the token like a password. OpenCloud prototype — not formally validated by the CANDIS programme.