# Splot API

> Read and write your journal from your own scripts and apps with a personal API key.

## Guides

- [Quickstart](https://splot.health/docs/api/quickstart): Create a key, read your journal and log your first meal in a few minutes.
- [Authentication](https://splot.health/docs/api/authentication): Personal API keys, what each permission allows, and how to keep keys safe.
- [Errors](https://splot.health/docs/api/errors): Status codes, error bodies and request limits.
- [Pagination](https://splot.health/docs/api/pagination): Read long lists a page at a time with limit, offset and nextOffset.

## Meals

- [The meal object](https://splot.health/docs/api/meals/object): What a meal holds, its items, and how its nutrition is added up.
- [List meals](https://splot.health/docs/api/meals/list) `GET /meals`: Lists your meals, newest first, a page at a time.
- [Retrieve a meal](https://splot.health/docs/api/meals/retrieve) `GET /meals/:id`: Reads one meal and its items.
- [Create a meal](https://splot.health/docs/api/meals/create) `POST /meals`: Logs a meal you ate, or plans one ahead.
- [Update a meal](https://splot.health/docs/api/meals/update) `PATCH /meals/:id`: Changes a meal. Only what you send changes.
- [Delete a meal](https://splot.health/docs/api/meals/delete) `DELETE /meals/:id`: Deletes a meal and its photos.

## Foods

- [The food object](https://splot.health/docs/api/foods/object): Where a food lives, its versions, and how its nutrition and portions are described.
- [Search foods](https://splot.health/docs/api/foods/search) `GET /foods`: Finds foods to log in one library, by name, brand or barcode.
- [Save a food](https://splot.health/docs/api/foods/create) `POST /foods`: Saves a food or recipe to your foods, or changes one you saved.
- [Delete a food](https://splot.health/docs/api/foods/delete) `DELETE /foods/:id`: Removes a food from your foods. Past meals and recipes keep it.
- [List food corrections](https://splot.health/docs/api/foods/corrections) `GET /food-corrections`: Lists the changes you made to catalogue products, newest first, and where their review stands.

## Settings

- [The settings object](https://splot.health/docs/api/settings/object): Your daily targets over time, display preferences and body measurements.
- [Retrieve settings](https://splot.health/docs/api/settings/retrieve) `GET /settings`: Reads your daily targets, display preferences and body measurements.
- [Update settings](https://splot.health/docs/api/settings/update) `PATCH /settings`: Changes your daily targets, display preferences or body measurements. Only what you send changes.
