Skip to content

Create a meal

Logs a meal you ate, or plans one ahead.

POSThttps://app.splot.health/v1/meals

Needs the Read and write permission.

FieldTypeDescription
eatenAtdate-timeRequired. When it was eaten, or will be for a plan, with a UTC offset.
timezonestringRequired. The IANA timezone it is eaten in, such as Europe/Berlin. Up to 100 characters.
itemsarrayRequired. What was eaten. 1 to 100 items.
statestringWhether the meal was eaten or is planned ahead. One of planned or logged. Defaults to logged.
imagesarrayPhotos: public links as { "url" }, or saved Splot photos as { "path" } from an earlier read. Up to 20 items.
namestring or nullA name, such as Breakfast. Up to 2,000 characters.
notesstring or nullNotes about the meal. Up to 2,000 characters.

Each item is either a food that already exists or a new one, and a portion.

FieldTypeDescription
foodobjectA food that exists: its library and key from a food search.
newFoodobjectA food that isn't in Splot yet, as saving a food takes it. It is saved to your foods first.
quantitynumber or nullHow much was eaten, in unit. Send it with unit, or leave both out.
unitstring or nullThe food's base unit (g, ml or serving) or one of its measures. Up to 2,000 characters.

Give either food, from Search foods, or newFood, in the shape Save a food takes. Convert other units first, such as 1 oz to 28.35 g. A dish is one item: don’t add a dish and its ingredients as separate items.

201 with the new meal, including its id and its items’ ids.

Terminal window
curl https://app.splot.health/v1/meals \
-H "Authorization: Bearer $SPLOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"eatenAt": "2026-10-02T12:40:00+02:00",
"timezone": "Europe/Berlin",
"name": "Lunch",
"items": [
{ "food": { "library": "composition", "key": "c3f1a2b4-5d6e-4f70-8a91-b2c3d4e5f607" }, "quantity": 180, "unit": "g" },
{
"newFood": {
"name": "Flat white",
"data": { "base": "ml", "nutrition": { "basisAmount": 100, "values": { "kcal": 54, "protein": 3.1, "carbs": 4.6, "fat": 2.6 } } }
},
"quantity": 220,
"unit": "ml"
}
]
}'

Last updated