API Documentation

Build amazing health apps with the ClapDiet API. Our simple REST API lets you access lab analysis, food data, and personalized nutrition recommendations.

Quick Start

1. Get Your API Key

Sign up for a ClapDiet account and go to Settings to create your API key. Keep this key safe - you will need it for every request.

2. Make Your First Request

Use your API key in the header of every request. Here is an example:

curl -X GET https://api.nutribalance.com/api/v1/foods \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

3. Handle the Response

All responses come back as JSON. Check the status code to see if your request worked. A 200 means success, while 400 or 500 codes mean something went wrong.

Authentication

The ClapDiet API uses Bearer tokens for authentication. Include your API key in the Authorization header of every request.

Important: Never share your API key or put it in client-side code where others can see it. Always keep it on your server.

API Endpoints

POST/api/v1/auth/register
POST/api/v1/auth/login
GET/api/v1/labs
POST/api/v1/labs/upload
GET/api/v1/foods
GET/api/v1/recommendations

Rate Limits

To keep our API fast and fair for everyone, we limit how many requests you can make:

1,000

Requests per hour (Free)

10,000

Requests per hour (Pro)

Unlimited

Enterprise plans

Need Help?

Our team is here to help you build great things with our API.

Contact Support