# How it works

> From a search to a domain that serves your app.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://domains.docs.sypnia.com/start/how-it-works/

For agents: How Domains works: search (free endings, final first-year and renewal price) → quote (name, years, credits, registrant contact; holds 15 min) → buy (credits reserved, Route 53 registration; minutes to days; refused → credits released) → zone created + optional connection (Run address records + certificate validation, Mail DKIM/SPF/DMARC) → automatic renewal from credits with reminders. API https://domains.api.sypnia.com/v1; Route 53 Domains and hosted zones; Postgres for quotes, connections, history.

### 1. Search

`domains search laespiga` asks the registry which endings are free and returns each one with its final price for the first year and its renewal price.

### 2. Quote

Choosing one makes a **quote**: the name, the years, the price in credits, and the contact data that will be the registrant. A quote holds its price for 15 minutes.

### 3. Buy

Confirming the quote reserves the credits and starts the registration with Amazon Route 53. Most endings finish within minutes; some take up to a few days. If the registry refuses, the credits are released.

### 4. Zone and connection

When the registration completes, Domains creates the domain's DNS zone and, if you asked for one, the **connection**: for a Run app, the address records and the certificate validation; for Mail, DKIM, SPF and DMARC.

### 5. Renewal

Before the domain expires, Domains renews it from your credits and tells you. If credits are short, you are reminded several times beforehand.

## Where things live

| Thing                        | Where                                                    |
| ---------------------------- | -------------------------------------------------------- |
| The API                      | `https://domains.api.sypnia.com/v1` **\[Cloud]**         |
| Registrations                | Amazon Route 53 Domains                                  |
| DNS zones                    | Amazon Route 53 hosted zones, four name servers per zone |
| Quotes, connections, history | the engine's Postgres                                    |
