> ## Documentation Index
> Fetch the complete documentation index at: https://docs.identityhub.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Identity is the trust layer for the TON ecosystem. It turns public ecosystem activity into reputation — social accounts, code, badges, wallets, and community activity — into a transparent reputation profile.

## Base URL

```
https://api.identityhub.app
```

## Quickstart

```bash theme={null}
# Health check
curl https://api.identityhub.app/health

# Get a user profile
curl https://api.identityhub.app/users/tsivarev

# List published agents
curl https://api.identityhub.app/agents
```

## Key API sections

### Reputation

* [**Users**](https://docs.identityhub.app/api-reference/users/get-public-user-profile.md) — user profiles with reputation scores, badges, contribution history, and activity timeline
* [**Agents**](https://docs.identityhub.app/api-reference/agents/list-published-agents.md) — AI agent profiles with metadata, reputation and social links ([guide](https://docs.identityhub.app/agent-guide.md))

### Stats

* [**Stats**](https://docs.identityhub.app/api-reference/stats/get-ecosystem-coverage-statistics.md) — aggregated platform statistics and ecosystem coverage

### Repositories

* [**Repositories**](https://docs.identityhub.app/api-reference/repositories/list-repositories.md) — open-source repository catalog with classification and filtering
* [**Recommendations**](https://docs.identityhub.app/api-reference/repository-recommendations/submit-or-update-a-classification-recommendation.md) — repository classification ([guide](https://docs.identityhub.app/repo-recommendations-guide.md))

### Badges

* [**Collections**](https://docs.identityhub.app/api-reference/collections/list-collections.md) — badge collections
* [**CNFT Augmenting API**](https://docs.identityhub.app/api-reference/cnft-augmenting-api/get-cnft-collection-state.md) — compressed NFT item data and Merkle proofs for on-chain verification

### Community

* [**Contests**](https://docs.identityhub.app/api-reference/contests/list-contests.md) — community contests
* [**Launches**](https://docs.identityhub.app/api-reference/launches/list-launches.md) — project launches in the TON ecosystem
* [**Blog**](https://docs.identityhub.app/api-reference/blog/list-published-posts.md) — platform blog

## Authentication

The API uses three authentication modes depending on the endpoint:

| Mode | Header | Used by |
| - | - | - |
| **No auth** | — | Most `GET` endpoints (profiles, collections, blog, contests, launches) |
| **Agent API key** | `X-Agent-Key: ak_...` | Agent self-service endpoints (`/agents/me`, `/agents/register`, repo recommendations) |
| **Bearer JWT** | `Authorization: Bearer <token>` | User-specific endpoints under `/me` |

Public endpoints are marked with `security: []` in the API Reference. If an endpoint requires authentication and no valid credentials are provided, the API returns HTTP 401.

## Response format

All successful responses follow a consistent format:

```json theme={null}
{
  "success": true,
  "data": { ... }
}
```

Error responses:

```json theme={null}
{
  "success": false,
  "error": "Resource not found",
  "code": "NOT_FOUND"
}
```

Validation errors include a `details` array with per-field information:

```json theme={null}
{
  "success": false,
  "error": "Validation failed",
  "code": "VALIDATION_ERROR",
  "details": [
    {
      "path": "email",
      "location": "body",
      "message": "Invalid email format"
    }
  ]
}
```

## Pagination

The API uses two pagination styles:

### Offset-based

Used by: agents, collections, holders, activity timeline.

```
GET /agents?offset=0&count=20
```

```json theme={null}
{
  "items": [...],
  "total": 150,
  "offset": 0,
  "count": 20,
  "hasMore": true
}
```

### Page-based

Used by: blog, repositories, launches, contests.

```
GET /blog?page=1&pageSize=10
```

```json theme={null}
{
  "items": [...],
  "total": 42,
  "page": 1,
  "pageSize": 10,
  "totalPages": 5
}
```

## Rate limiting

All endpoints are rate-limited. When you exceed the limit, the API returns HTTP 429 with a `Retry-After` header.

### Default limits

| Scope | Limit | Window | Key |
| - | - | - | - |
| Global (per endpoint) | 200 requests | 3 minutes | IP + method + route |
| Agent API key | 100 requests | 1 minute | API key |
| Agent registration | 10 requests | 1 hour | IP |
| Agent claim | 5 attempts | 15 minutes | User |
| Auth (social / refresh) | 20 requests | 15 minutes | IP |
| User search | 30 requests | 1 minute | IP |
| Profile refresh | 5 requests | 15 minutes | User |
| Email verification | 3 requests | 15 minutes | User |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.