---
title: Verify domain mapping TXT record.
url: https://developers.wpengine.com/docs/headless-platform/reference/api/endpoints/operations/apps_verifydomainmappingtxtrecord/
image: https://developers.wpengine.com/og/docs/headless-platform/reference/api/endpoints/operations/apps_verifydomainmappingtxtrecord.png
---

# Verify domain mapping TXT record.

POST

/v1/accounts/{account}/apps/{app}/environments/{environment}/domainMappings/{domain}:verifyTxtRecord

Select code sample

```sh
curl --request POST \
  --url https://js.wpengineapi.com/v1/accounts/example/apps/example/environments/example/domainMappings/example:verifyTxtRecord \
  --header 'Authorization: Basic <credentials>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

-

## Authorizations

- **[basicAuth](https://developers.wpengine.com/docs/headless-platform/reference/api/endpoints/#basicauth)**

## Parameters

### Path Parameters

**account**

required

string

Name of your WP Engine Headless Platform account

**app**

required

string

Name of your Headless Platform application

**environment**

required

string

ID of your environment

**domain**

required

string

Domain name of the domain associated with the environment by this DomainMapping Must be a valid domain name as defined in RFC-1123

## Request Body

Media typeapplication/json

Request to verify domain mapping TXT record.

object

### Example generated

```json
{}
```

## Responses

### 200

A successful response.

Media typeapplication/json

*Response of VerifyDomainMappingTxtRecordRequest*

object

**domainMapping**

*DomainMapping represents a domain associated with an environment*

object

**destinationDomainMapping**

*Domain redirect associated with this DomainMapping in the format of accounts/{account}/apps/{app}/environments/{environment}/domainMappings/{domain_mapping}*

string

**destinationDomainMappingState**

*Possible states of a DomainMapping*

- STATE_UNSPECIFIED: Domain mapping state is unknown
- CREATING: Domain mapping is being created
- DELETING: Domain mapping is being deleted
- ACTIVE: Domain mapping is deployed. Does not necessarily mean that the domain is already directing to the environment, as Cloudflare status is currently not checked
- FAILED: Domain mapping creation has failed, or domain was created but is no longer active due to other error

string

default: STATE_UNSPECIFIED

Allowed values: STATE_UNSPECIFIED CREATING DELETING ACTIVE FAILED

**domain**

required

*Domain name of the domain associated with the environment by this DomainMapping Must be a valid domain name as defined in RFC-1123*

string

**name**

*Output only. Domain mapping name in the format of: \`accounts/{account}/apps/{app}/environments/{environment}/domainMappings/{domain_mapping}\`*

string

**primary**

*Defines if domain mapping is primary*

boolean

**state**

*Possible states of a DomainMapping*

- STATE_UNSPECIFIED: Domain mapping state is unknown
- CREATING: Domain mapping is being created
- DELETING: Domain mapping is being deleted
- ACTIVE: Domain mapping is deployed. Does not necessarily mean that the domain is already directing to the environment, as Cloudflare status is currently not checked
- FAILED: Domain mapping creation has failed, or domain was created but is no longer active due to other error

string

default: STATE_UNSPECIFIED

Allowed values: STATE_UNSPECIFIED CREATING DELETING ACTIVE FAILED

**txtRecordVerifiedTime**

*Domain mapping txt record verified at*

string format: date-time

**txtVerificationName**

*Domain mapping txt verification record name*

string

**txtVerificationValue**

*Domain mapping txt verification record value*

string

#### Example

```json
{
  "domainMapping": {
    "destinationDomainMappingState": "STATE_UNSPECIFIED",
    "state": "STATE_UNSPECIFIED"
  }
}
```

## Was this helpful?

Thanks for the feedback!

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://developers.wpengine.com/#website","name":"WP Engine Product Documentation","url":"https://developers.wpengine.com/","description":"Resources for developing, deploying, and scaling on WP Engine.","inLanguage":"en-US","keywords":["API documentation","product documentation","headless WordPress","managed WordPress hosting"],"publisher":{"@id":"https://wpengine.com/#organization"}}]}
```
