Interesse an einer wissenschaftlichen Studie?Mehr erfahren

Core API

Decode Symptoms API

Available

Decode Symptoms structures free-text, image or voice symptom reports into consistent symptom events with labels, intensity and timing context.

Endpoint

POST/functions/v1/decode_symptoms

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
  • Status response with structured symptom events
  • Timing metadata and clarification status

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.
  • Completed results return structured symptom data for the requesting integration.
  • 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 quota headers are returned when available.
  • Writing symptom events to a mymolecules account requires additional account permissions.

Examples

Request JSON

{
  "symptomText": "Felt bloated and tired about two hours after dinner",
  "timezone": "Europe/Berlin"
}

Response JSON

{
  "job_id": "cb08a1...",
  "status": "queued",
  "status_url": "https://tirqjzahcinadeulfylj.supabase.co/functions/v1/decode_symptoms?job_id=cb08a1..."
}

Code examples

curl -X POST 'https://tirqjzahcinadeulfylj.supabase.co/functions/v1/decode_symptoms' \
  -H 'x-api-key: $MYMOLECULES_API_KEY' \
  -H 'Content-Type: application/json' \
  --data '{  "symptomText": "Felt bloated and tired about two hours after dinner",  "timezone": "Europe/Berlin"}'