---
title: "Complete a one-click DNS return"
method: POST
path: "/v1/email/domains/{id}/domain-connect/complete"
tags: ["Email"]
---

# Complete a one-click DNS return

`POST /v1/email/domains/{id}/domain-connect/complete`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/email/domains/{id}/domain-connect/complete`
- Auth: API key in header `x-api-key`

Consumes the Domain Connect provider's redirect. Validates the signed state and, when the DNS provider reports success, starts checking the domain's records. A DNS provider error is reported separately from a customer cancelling setup.

## Path parameters

- `id` string, required

## Request body

- object
  - `state` string, required
  - `error` string, nullable
  - `errorDescription` string, nullable

## Response `200`

DomainConnectCompleteResult

- DomainConnectCompleteResult
  - `status` 'applied' | 'cancelled' | 'failed' | 'invalid', required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `422`: ValidationError
- `500`: InternalError
- `502`: EmailChannelError
- `504`: GatewayTimeoutError

---

[API](https://skmtc.dev/samva/apis/samva-api.md) · [All operations](https://skmtc.dev/samva/apis/samva-api/llms.txt) · [OpenAPI document](https://skmtc.dev/samva/apis/samva-api/revisions/a99408542cc3?raw)
