---
title: "Import an existing DNS record into temps management (explicit adoption)"
method: POST
path: "/dns-records/import"
tags: ["DNS Records"]
---

# Import an existing DNS record into temps management (explicit adoption)

`POST /dns-records/import`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/dns-records/import`
- Auth: HTTP bearer

## Request body

- ImportManagedRecordRequest: Request to import (adopt) an existing record into temps management
  - `domain` string, required: Domain (any FQDN under a managed zone)
  - `environment_id` integer, nullable: Environment this record belongs to (stamped into the ownership marker)
  - `name` string, required: Record name relative to the zone ("@" for apex)
  - `project_id` integer, nullable: Project this record belongs to (stamped into the ownership marker)
  - `record_type` 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'MX' | 'NS' | 'SRV' | 'CAA' | 'PTR', required: Record type

## Response `200`

Record imported

- ImportManagedRecordResponse: Result of importing a record into temps management
  - `environment_id` integer, nullable: Environment stamped in the ownership marker
  - `name` string, required: Record name that was imported
  - `project_id` integer, nullable: Project stamped in the ownership marker
  - `record_type` string, required: Record type that was imported

## Other responses

- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Record or managed domain not found
- `409`: Record is owned by another temps install

## Changes

- **2026-10-05** `4b228ebed583`: 1 info
  - endpoint added
- **2026-10-05** `63a80791dc58`: 1 breaking
  - api path removed without deprecation
- **2026-10-03** `de8387218c0b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/dns-records/import/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
