---
title: "Import an already-provisioned email domain from the provider"
method: POST
path: "/email-domains/import"
tags: ["Email Domains"]
---

# Import an already-provisioned email domain from the provider

`POST /email-domains/import`

## Request

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

Use this endpoint when the domain identity was created directly in the email
provider's console or API. Temps will fetch its current verification state
rather than registering a new identity, preventing duplicate or conflicting
provider-side entries.

## Request body

- ImportEmailDomainRequest: Request body for importing an already-provisioned email domain. Use this when the domain identity was created directly in the email provider's own console or API — Temps will look it up rather than attempting to re-create it, avoiding duplicate or conflicting identities. `provider_identity_id` is required for Scaleway (where the provider keys lookups off an internal UUID rather than the domain name) and optional for SES (which uses the domain name for all lookups). If a required field is missing, the provider will surface a clear error.
  - `domain` string, required: Domain name (e.g., "updates.example.com")
  - `provider_id` integer, required: Provider ID to import the domain into
  - `provider_identity_id` string, nullable: Provider-internal identity identifier. Required for Scaleway (the domain UUID shown in the Scaleway console); ignored/optional for SES.

## Response `201`

Domain imported successfully

- EmailDomainWithDnsResponse
  - `dns_records` DnsRecordResponse[], required
    - `name` string, required: DNS record name (host)
    - `priority` integer, nullable: Priority (for MX records)
    - `record_type` string, required: Record type: TXT, CNAME, MX
    - `status` 'unknown' | 'verified' | 'pending' | 'failed', required: Verification status: unknown, verified, pending, failed
    - `value` string, required: DNS record value
  - `domain` EmailDomainResponse, required
    - `created_at` string, required
    - `domain` string, required
    - `id` integer, required
    - `last_verified_at` string, nullable
    - `provider_id` integer, required
    - `status` string, required
    - `updated_at` string, required
    - `verification_error` string, nullable

## Other responses

- `400`: Invalid request or provider lookup failed
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Provider not found
- `409`: Domain already registered for this provider
- `500`: Internal server error

## Changes

- **2026-09-07** `ebd376a7af05`: 1 info
  - endpoint added
- **2026-09-07** `f7404eb7ac98`: 1 breaking
  - api path removed without deprecation
- **2026-09-06** `bb8d46b0c5f6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/email-domains/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)
