> For the complete documentation index, see [llms.txt](https://trust-positif.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trust-positif.gitbook.io/docs/getting-started.md).

# Getting started

## Prerequisites

* HTTP client (cURL, Guzzle, fetch, axios, dll.)
* (Opsional) API key premium untuk kuota paket dan whitelist IP

## 1. Cek tanpa API key (freemium)

Cukup kirim `POST` ke `/check` dengan body JSON. Limit: **100 domain per hari per IP**.

```bash
curl -X POST "https://trustpositif.id/api/v1/check" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"domains": "example.com"}'
```

## 2. Cek dengan API key

Tambahkan header `X-API-Key`:

```bash
curl -X POST "https://trustpositif.id/api/v1/check" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: tp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -d '{"domains": "example.com, domain2.id"}'
```

## 3. Cek kuota sebelum batch besar

```bash
curl "https://trustpositif.id/api/v1/limit" \
  -H "X-API-Key: tp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

## Format input domain

Field `domains` adalah **string** (bukan array JSON), berisi satu atau lebih domain:

* Pisahkan dengan **baris baru**, **koma**, atau **koma + spasi**
* `https://` dan `www.` otomatis dibuang
* Maksimal **100 domain** per request
* Maksimal **10.000 karakter** pada string `domains`

Contoh valid:

```json
{
  "domains": "example.com\ngoogle.co.id\nhttps://www.site.id/path"
}
```

## Interpretasi hasil

Setiap item di `results` memiliki:

| Field     | Tipe    | Arti                                                  |
| --------- | ------- | ----------------------------------------------------- |
| `Domain`  | string  | Nama domain yang dicek                                |
| `Blocked` | boolean | `true` = terdaftar Nawala (terblokir), `false` = aman |

```json
{
  "Domain": "example.com",
  "Blocked": false
}
```

## Dashboard vs API

| Fitur                       | Dashboard           | API                   |
| --------------------------- | ------------------- | --------------------- |
| Cek manual sekali           | ✅ (1 kredit/domain) | ✅                     |
| Pemantauan otomatis 3 menit | ✅                   | ❌ (gunakan dashboard) |
| Whitelist IP key            | ✅                   | ✅ (premium)           |

## Langkah berikutnya

* [Authentication](/docs/authentication.md) — header, whitelist IP
* [Rate limits](/docs/rate-limits.md) — freemium vs premium
* [POST /check](/docs/api-reference/check-domains.md) — referensi lengkap
