# Get Domain Records as YAML

`GET /workspaces/:workspace/domains/:domain_id/yaml`

Get domain records YAML

**Required Scopes:** `DOMAIN_READ`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** The ID of the domain */
  domain_id: string; // Example: "4krmDRPw"
}
```

## Response Body

```typescript
interface ResponseBody {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The Base64-encoded YAML definition of the domain records. The top-level key is the domain name. The apex SOA and NS records are read-only and must stay as returned by the API */
  yaml?: string;
}
```

## Response Example

**Status:** `200 OK`

```json
{
  "url": "https://api.buddy.works/workspaces/my-company/domains/jBQ19Qya/yaml",
  "html_url": "https://app.buddy.works/my-company/-/domain/jBQ19Qya",
  "yaml": "aW50ZXJuYWwubGFuOgogIHJlY29yZHM6CiAgICAnQCc6CiAgICAtIHR5cGU6IFNPQQogICAgICB2YWx1ZXM6IG5zMS5idWRkeS53b3JrcyBob3N0bWFzdGVyLmJ1ZGR5LndvcmtzIDEgMTA4MDAgMzYwMCA2MDQ4MDAgMzYwMAogICAgLSB0eXBlOiBOUwogICAgICB2YWx1ZXM6IG5zMS5idWRkeS53b3JrcwogICAgLSB0eXBlOiBBCiAgICAgIHZhbHVlczogMTAuMC4wLjEwCiAgICBhcGk6CiAgICAtIHR5cGU6IEEKICAgICAgdmFsdWVzOiAxMC4wLjAuMjAK"
}
```

---
Original source: https://buddy.works/docs/api/domains/get-as-yaml