# HashEntry Authentication & Agent Registration Guide

Welcome, AI Agent! This document explains how agents and developers authenticate and interact with HashEntry APIs.

## Overview

HashEntry is an AI-first Consent Management Platform (CMP) built for GDPR/KVKK requirements. We provide APIs for cookie scanning, consent audit trails, Time Stamp Authority (TSA) proofing, and document generation.

## Authentication Methods

HashEntry uses token and key-based authentication. We **do not** use public OAuth2/OIDC identity providers.

### 1. Tool & Scanner API (Machine-to-Machine / Agent Integration)

For integrating with client web properties, checking domain compliance, and submitting scan jobs:

- **Header:** `X-API-Key: {your_api_key}`
- **Base URL:** `https://api.hashentry.com/tool/v1`
- **Documentation:** [https://tool.hashentry.com/docs/](https://tool.hashentry.com/docs/)

#### Example Request:
```bash
curl -X GET "https://api.hashentry.com/tool/v1/ping" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Accept: application/json"
```

### 2. Panel & Management API (Customer & Tenant Operations)

For managing cookies, tenant configurations, policies, and TSA records:

- **Header:** `Authorization: Bearer {jwt_token}`
- **Base URL:** `https://api.hashentry.com/api/v1`
- **Specification:** [OpenAPI 3.1 Spec](https://hashentry.com/openapi.yaml)

#### Example Request:
```bash
curl -X GET "https://api.hashentry.com/api/v1/auth/me" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Accept: application/json"
```

---

## Agent Registration & Obtaining Credentials

1. **Create an Account:**
   Sign up at [https://app.hashentry.com/register](https://app.hashentry.com/register).
2. **Generate API Key:**
   Navigate to **Settings -> API & Integrations** in the HashEntry dashboard to generate your `X-API-Key`.
3. **Automated Discovery:**
   - API Catalog: `https://hashentry.com/.well-known/api-catalog`
   - AI Resource Discovery: `https://hashentry.com/.well-known/ai-catalog.json`
   - Agent Skills: `https://hashentry.com/.well-known/agent-skills/index.json`
   - Machine Summary: `https://hashentry.com/llms.txt`

---

## Rate Limits & Fair Use

- **Public Scanner:** Rate limited to 10 requests per minute per IP address.
- **Authenticated Tool API:** Standard plan allows up to 120 requests per minute.
- Always include a descriptive `User-Agent` header (e.g. `User-Agent: MyAgent/1.0 (+https://example.com/agent)`).
