API Reference

The KredPilot API provides read-only access to display your professional reputation data on external sites. Perfect for portfolios, personal websites, and integrations.

Read-Only API: All write operations (creating projects, updating profiles, requesting ratings) must be done through the KredPilot dashboard for security.

Base URL

https://api.kredpilot.com

Authentication

The KredPilot API uses API key authentication for external access:

API Key Authentication (Pro Only)

For server-to-server integrations and external applications. API keys are only available for Pro plan subscribers. Generate your API key in the dashboard settings.

X-API-Key: <your_api_key>

⚠️ Keep your API key secure and never expose it in client-side code.

Rate Limits

API access requires a Pro subscription ($9.99/month). All Pro users receive the same rate limit:

Rate Limit

1,000 requests/hour

Error Handling

The KredPilot API uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success, 4xx range indicate client errors, and 5xx range indicate server errors.

200OK

The request was successful.

201Created

The resource was successfully created.

400Bad Request

The request was malformed or missing required parameters.

401Unauthorized

Authentication failed or token is invalid/expired.

403Forbidden

You don't have permission to access this resource.

404Not Found

The requested resource doesn't exist.

429Too Many Requests

Rate limit exceeded. Please wait before making additional requests.

500Internal Server Error

Something went wrong on our end. Please try again later.

Error Response Format

{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Email is required",
    "details": {}
  }
}

Endpoints

GET/api/profiles/[username]

Get public user profile by username - Display on your portfolio sites

ParameterTypeRequired
usernamestringRequired
GET/api/ratings/[username]

Get all public ratings for a user - Show ratings on external sites

ParameterTypeRequired
usernamestringRequired
GET/api/projects/[username]

Get all projects for a user by username - Display projects on external sites

ParameterTypeRequired
usernamestringRequired
GET/api/analytics/[username]

Get comprehensive analytics data for a user - Access reputation insights, trends, and fraud detection by username

ParameterTypeRequired
usernamestringRequired

Quick Start Examples

See how to integrate KredPilot API into your favorite framework or language

// hooks/useKredPilot.js
import { useState, useEffect } from 'react';

export function useProfile(username) {
  const [data, setData] = useState(null);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState(null);

  useEffect(() => {
    fetch(`https://api.kredpilot.com/api/profiles/${username}`, {
      headers: {
        'X-API-Key': process.env.REACT_APP_KREDPILOT_API_KEY
      }
    })
      .then(res => res.json())
      .then(data => {
        if (data.success) setData(data.data);
        else setError(data.error);
      })
      .catch(err => setError(err))
      .finally(() => setLoading(false));
  }, [username]);

  return { data, loading, error };
}

// Component usage
function ProfileCard({ username }) {
  const { data, loading, error } = useProfile(username);

  if (loading) return <div>Loading...</div>;
  if (error) return <div>Error: {error.message}</div>;

  return (
    <div>
      <h2>{data.profile.fullName}</h2>
      <p>@{data.profile.username}</p>
      <p>Average Rating: {data.profile.averageRating}/5</p>
    </div>
  );
}