---
title: "Complete an automatic Custom Tracking Domain return"
method: POST
path: "/v1/email/domains/{id}/custom-tracking/domain-connect/complete"
tags: ["Email"]
---

# Complete an automatic Custom Tracking Domain return

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

## Request

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

Validates the signed state returned by the DNS provider, then checks the tracking host again. Returning here never marks the host ready or changes which tracking host email uses.

## Path parameters

- `id` string, required

## Request body

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

## Response `200`

CustomTrackingDomainConnectCompleteResult

- CustomTrackingDomainConnectCompleteResult
  - `status` 'applied' | 'cancelled' | 'failed' | 'stale' | 'invalid', required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `422`: ValidationError
- `500`: InternalError
- `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)
