# Quickstart

Make your first check in a few minutes, with a test key that never counts toward your quota.

## 1. Get a test key

Sign in to the [dashboard](/dashboard), open **API keys** and create a key with the **Test** mode. Copy it: it starts with `sg_test_` and you only see it once.

Keep it in an environment variable, never in code:

```bash
export SPAMGONE_API_KEY="sg_test_..."
```

## 2. Check a message

```bash
curl -X POST https://spamgone.dev/v1/checks \
  -H "Authorization: Bearer $SPAMGONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Win a free prize spamgone_test_block"}'
```

Test keys return fixed results: text containing `spamgone_test_block` is blocked, `spamgone_test_review` goes to review, and anything else is allowed. The response looks like this:

```json
{
  "object": "check",
  "id": "8f6f1c9e-0f0e-4c55-9a31-5d1d1e7f2b10",
  "spam": {
    "score": 0.99,
    "action": "block",
    "category": "other_spam",
    "reasons": ["Test key: the text contains spamgone_test_block"]
  },
  "cached": false,
  "test": true,
  "created_at": "2026-11-14T12:00:00.000Z"
}
```

Act on `spam.action`: `block` hides the message, `review` holds it for a person, and `allow` lets it through.

The same call in Node.js:

```typescript
const response = await fetch("https://spamgone.dev/v1/checks", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SPAMGONE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ text: "Win a free prize spamgone_test_block" }),
});
const check = await response.json();
console.log(check.spam.action);
```

And in Python:

```python
import os
import requests

response = requests.post(
    "https://spamgone.dev/v1/checks",
    headers={"Authorization": f"Bearer {os.environ['SPAMGONE_API_KEY']}"},
    json={"text": "Win a free prize spamgone_test_block"},
)
print(response.json()["spam"]["action"])
```

## 3. See it in the dashboard

Open **Checks** in the dashboard. Your check is there, with its score, reasons and a timeline.

## 4. Send context, then go live

Checks are most accurate with context about the author and where the message was posted:

```json
{
  "text": "Turn $250 into $5,000 in 7 days. DM me on Telegram",
  "context": {
    "content_type": "message",
    "author": {
      "id": "user_8412",
      "created_at": "2026-11-14T07:58:00Z",
      "verified": false
    }
  }
}
```

When your integration works, create a live key (`sg_live_`) and swap it in. Live checks use the AI model and count toward your plan's quota.

Next: read [How checks work](/docs/how-checks-work), then the [Checks reference](/docs/checks).
