---
title: Quickstart
path: quickstart
status: published
---

# Quickstart

Your first ScaiDNS zone in under ten minutes. Assumes you have a ScaiDNS instance, a ScaiKey account, and control over the domain you're going to add.

## 1. Get an API key

From the admin UI: **API Keys → Create**. Name it something specific (`quickstart-kb`). Choose a permission source — either yourself as a user or a group — and click create.

The key is shown **exactly once** and looks like `sdk_live_` followed by a long opaque token. Copy it now.

```bash
export SCAIDNS_API_KEY="sdk_live_..."
```

If you don't have admin UI access, ask your tenant admin to create one for you.

## 2. Create a domain

```bash
curl -X POST https://scaidns.scailabs.ai/api/v1/domains/ \
  -H "X-API-Key: $SCAIDNS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "example.com",
    "domain_type": "primary",
    "default_ttl": 3600,
    "description": "Quickstart zone"
  }'
```

```python
import os, httpx

resp = httpx.post(
    "https://scaidns.scailabs.ai/api/v1/domains/",
    headers={"X-API-Key": os.environ["SCAIDNS_API_KEY"]},
    json={
        "name": "example.com",
        "domain_type": "primary",
        "default_ttl": 3600,
        "description": "Quickstart zone",
    },
)
resp.raise_for_status()
domain = resp.json()
print(domain["id"], domain["status"])
```

```typescript
const resp = await fetch("https://scaidns.scailabs.ai/api/v1/domains/", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.SCAIDNS_API_KEY!,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "example.com",
    domain_type: "primary",
    default_ttl: 3600,
    description: "Quickstart zone",
  }),
});
const domain = await resp.json();
console.log(domain.id, domain.status);
```

You get back the domain record:

```json
{
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "name": "example.com",
  "status": "pending_validation",
  "domain_type": "primary",
  "default_ttl": 3600,
  "description": "Quickstart zone",
  "created_at": "2026-04-23T10:42:00Z"
}
```

The zone is `pending_validation`. You need to prove you own it before ScaiDNS will serve records for it.

## 3. Validate the domain

Get the validation challenge:

```bash
curl https://scaidns.scailabs.ai/api/v1/domains/$DOMAIN_ID/validation \
  -H "X-API-Key: $SCAIDNS_API_KEY"
```

Response:

```json
{
  "validation_type": "txt_record",
  "status": "pending",
  "dns_record": {
    "name": "_scaidns-verify.example.com",
    "type": "TXT",
    "value": "scaidns-verify=r3d4c7-v41u3-0f-ch411en9e"
  },
  "expires_at": "2026-04-26T10:42:00Z"
}
```

Publish that TXT record at your current DNS provider. Wait for propagation (usually under a minute; up to the record's TTL).

Then trigger a check:

```bash
curl -X POST https://scaidns.scailabs.ai/api/v1/domains/$DOMAIN_ID/validation/check \
  -H "X-API-Key: $SCAIDNS_API_KEY"
```

When the TXT record matches, the response is:

```json
{"is_valid": true, "message": "Domain validated"}
```

The domain's status flips to `active`. You can now delegate your domain's NS records to the ScaiDNS nameservers — ask your operator for the NS hostnames.

## 4. Add an A record

```bash
curl -X POST https://scaidns.scailabs.ai/api/v1/domains/$DOMAIN_ID/records \
  -H "X-API-Key: $SCAIDNS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "www",
    "type": "A",
    "content": "192.0.2.10",
    "ttl": 300
  }'
```

```python
resp = httpx.post(
    f"https://scaidns.scailabs.ai/api/v1/domains/{domain_id}/records",
    headers={"X-API-Key": os.environ["SCAIDNS_API_KEY"]},
    json={"name": "www", "type": "A", "content": "192.0.2.10", "ttl": 300},
)
print(resp.json())
```

```typescript
const resp = await fetch(
  `https://scaidns.scailabs.ai/api/v1/domains/${domainId}/records`,
  {
    method: "POST",
    headers: {
      "X-API-Key": process.env.SCAIDNS_API_KEY!,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      name: "www",
      type: "A",
      content: "192.0.2.10",
      ttl: 300,
    }),
  },
);
console.log(await resp.json());
```

The response contains the created record:

```json
{
  "id": "a1b2c3d4-...",
  "name": "www.example.com",
  "type": "A",
  "content": "192.0.2.10",
  "ttl": 300,
  "disabled": false
}
```

That's it. A resolver pointed at the ScaiDNS nameservers will now return `192.0.2.10` for `www.example.com`.

## 5. Query it

```bash
dig @ns1.scaidns.scailabs.ai www.example.com
```

Replace `ns1.scaidns.scailabs.ai` with your instance's authoritative nameserver.

## What's next

- [Authentication](./concepts/authentication.md) — OAuth flow for human users, API keys for services.
- [Your First Zone](./tutorials/your-first-zone.md) — a complete walkthrough: zone, records, NS delegation, DNSSEC.
- [Managing Records](./tutorials/managing-records.md) — create, update, bulk, search.
