Endpoint
POST
/functions/v1/decode_symptomsContract
Send mymolecules-api-version with 2026-07-10 to use the documented response contract.
{
"data": {},
"meta": {
"request_id": "req_...",
"api_version": "2026-07-10"
}
}Headers
Request
x-api-keyrequired - Server-side API key for your integration.mymolecules-api-versionrequired2026-07-10- Use the latest stable API version: 2026-07-10.Content-Typerequiredapplication/json- Required for JSON request bodies.
Response
x-request-idrequired - Request identifier. Log this value when contacting support.mymolecules-api-versionrequired2026-07-10- The API contract version used for the response.x-ratelimit-limitoptional - Quota limit for the current key and window when quota data is available.x-ratelimit-remainingoptional - Remaining requests in the current quota window when quota data is available.x-ratelimit-resetoptional - ISO timestamp for the current quota window reset when quota data is available.retry-afteroptional - Seconds to wait before retrying when the request is rate-limited or temporarily unavailable.
Inputs
- symptomText, symptomImage, symptomImageUrl, symptomVoice, symptomVoiceUrl or attachments
- Optional timing fields such as timezone, reported_time, occurred_at_utc and occurred_end_at_utc
- Optional source context such as user_id, conversation_id, source_message_id and correlation_id
Returns
- 202 queued response with job_id, status_url and async meta
- Completed symptom_detected result with one or more structured symptoms
- Completed no_symptom_detected result with an empty symptoms array
Async pattern
Create the job with POST, then poll the same endpoint with job_id until the status is completed or failed.
- Poll parameter:
job_id - Status values: queued, processing, completed, failed
Error codes
missing_api_keyinvalid_api_keyscope_not_allowedquota_exceededinvalid_jsoninvalid_requestvalidation_errormethod_not_allowedunsupported_api_versionjob_not_foundbacklog_highupstream_timeoutupstream_errorinternal_error
Request details
- Provide at least one symptom input source.
- Use timezone and reported_time when the user described a relative time such as "after dinner".
- supersedes_event_id must be a UUID when provided.
Response details
- Poll GET /functions/v1/decode_symptoms?job_id=... until status is completed or failed.
- Every completed result has type: symptom_detected or type: no_symptom_detected.
- symptom_detected returns symptoms with symptom_type, symptom_label, intensity_1_to_5 and duration.
- intensity_1_to_5 is an integer from 1 to 5, or null when a symptom was detected without an explicit intensity.
- no_symptom_detected returns symptoms: [] and error: null as a completed domain result.
- The meta object includes retry_count and timestamps when available.
Operational notes
- Requires x-api-key with the edge:decode_symptoms scope.
- POST usage is counted and rate-limit headers are returned when quota data is available.
- Writing symptom events to a mymolecules account requires additional account permissions.
Examples
Request JSON
{
"symptomText": "Seit zwei Stunden habe ich mäßige Übelkeit.",
"timezone": "Europe/Berlin"
}Response JSON
{
"data": {
"job_id": "cb08a1...",
"status": "queued",
"status_url": "https://api.mymolecules.de/functions/v1/decode_symptoms?job_id=cb08a1..."
},
"meta": {
"request_id": "req_...",
"api_version": "2026-07-10"
}
}Code examples
curl -X POST 'https://api.mymolecules.de/functions/v1/decode_symptoms' \
-H 'x-api-key: $MYMOLECULES_API_KEY' \
-H 'mymolecules-api-version: 2026-07-10' \
-H 'Content-Type: application/json' \
--data '{ "symptomText": "Seit zwei Stunden habe ich mäßige Übelkeit.", "timezone": "Europe/Berlin"}'


