← Back to Docs

API Tutorial

Learn how to build and interact with Eggeia's API from scratch.

Overview

This tutorial will walk you through creating a working integration with Eggeia's API. You'll learn authentication, request formatting, error handling, and data processing.

What You'll Need

  • Eggeia API key (from your dashboard)
  • Code editor or cURL client
  • Basic understanding of HTTP

Step 1: Authentication

Use Bearer authentication with your API key. Find yours in the Dashboard.

curl -X GET \
  https://api.eggeia.com/api/v1/data \
  -H 'Authorization: Bearer YOUR_API_KEY'

Request Headers

  • Authorization Bearer your-key-here
  • Accept application/json

Response Success

{}
  "status": "success",
  "data": {
    "example": true
  }
}

Step 2: GET Requests

Fetching Resource Data

Retrieve data using the GET method with query parameters.

curl -X GET \
  https://api.eggeia.com/api/v1/data?format=json \
  -H 'Authorization: Bearer YOUR_API_KEY'

Supported Parameters

  • filter - Filter results (e.g., filter=recent)
  • page - Pagination number (e.g., page=2)

Rate Limits

  • Free Tier: 1,000 requests/month
  • Premium Tier: 100,000 requests/month

Step 3: POST Requests

Creating Resources

Use POST to create new data entries with required parameters.

curl -X POST \
  POST https://api.eggeia.com/api/v1/resources \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name": "New Resource", "value": 42}'

Required Data

  • name - Resource identifier
  • value – Data payload

Response

{}
  "status": "success",
  "data": {
    "id": 12345,
    "created_at": "2025-09-11"
  }
}

Step 4: Error Handling

Understand and handle common API errors.

Status Code Description Fix
401 Unauthorized Validate API key format
429 Too Many Requests Wait 5-10 seconds
500 Server Error Retry request

Need Help?

Visit Support Center for assistance with errors or integration issues.

Ready to Implement?

You've now covered authentication, GET and POST requests, and error handling in Eggeia's API. Start building your integration or try the sandbox environment.