# add()

Canonical URL: https://developers.iagenify.com/ar/sdk/ref/domains/add/
Language: ar

`api.domains.add(name) → Promise<Domain>`

يُمسك a حقل و إلى الخلف الاسم خادم إلى إلى set عند سجل المنطقة فارغ ولا شيء.

Status: writes nothing · one account per name · nameservers come back

```javascript
const domain = await api.domains.add("example.com");

domain.status;        // "pending_nameservers"
domain.nameservers;   // the pair to set at the registrar
```

## « تبدأ المنطقة » أي بدءها « فارغا » أي لا يُ « وذلك هو الور » الفخ « وهذا هو الو الور » المط « والطريق » الممير هو الم {#empty}

> **لا تطلب من العميل أن يبدل بعد**
>
> حقل تم شراؤه في مكان آخر يخدم بالفعل الموقع و صناديق البريد. توجيه المسجل في منطقة فارغة يوقف كل ذلك في تلك الثانية. اقرأ الهجرة أولاً، والاستيراد إذا كان يقول ذلك.

## Attaching triggers a read, not a write {#search}

A search of what the domain serves today runs on attach, and what it finds feeds [migration()](/ar/sdk/ref/domain/migration) and [import()](/ar/sdk/ref/domain/records/import). Nothing is posed in the zone.

## الـ الكل {#sequence}

```javascript
const domain = await api.domains.add("example.com");

const plan = await domain.migration();
if (!plan.safeToSwitch) {
  const { added, skipped } = await domain.records.import();
  console.log(added, "copied,", skipped.length, "to do by hand");
}

// Now the registrar can be pointed at domain.nameservers
await domain.check();
```

## اسم يعود إلى حساب واحد {#once}

`domain_taken` في محاولة ثانية: الحساب الثاني سيطلي منطقة الأولى

## اقر الاسم المُسْتَذْذِر، لا تُفرِّزهم {#nameservers}

إنها مخزنة في كل مجال وتعود إلى الكائن. كتابة زوج في رمزك الخاص هو نوع من الأشياء التي تعمل حتى اليوم الذي لا تعمل فيه.

- [migration()](/ar/sdk/ref/domain/migration): هل التحول آمن بعد؟
- [check()](/ar/sdk/ref/domain/check): هل حدث التبديل؟
- [هذا](/ar/sdk/ref/domain): ما يحمله المجال، وما يمكنك فعله به.

```python
domain = api.domains.add("example.com")

domain.status        # "pending_nameservers"
domain.nameservers   # the pair to set at the registrar
```

```python
domain = api.domains.add("example.com")

plan = domain.migration()
if not plan["safeToSwitch"]:
    result = domain.records.import_zone()
    print(result.get("added"), "copied,", len(result.get("skipped") or []), "to do by hand")

# Now the registrar can be pointed at domain.nameservers
domain.check()
```
