---
title: "POST /CreateTargetDomain"
method: POST
path: "/CreateTargetDomain"
---

# POST /CreateTargetDomain

`POST /CreateTargetDomain`

Creates a new target domain for penetration testing. A target domain is a web domain that must be registered and verified before it can be tested.

## Request body

- object
  - `targetDomainName` string, required — The domain name to register as a target domain.
  - `verificationMethod` 'DNS_TXT' | 'HTTP_ROUTE' | 'PRIVATE_VPC', required — Method used to verify domain ownership.
  - `tags` object — Map of tags for a resource.

## Response `200`

Success

- CreateTargetDomainOutput — Output for the CreateTargetDomain operation.
  - `targetDomainId` string, required — The unique identifier of the created target domain.
  - `domainName` string, required — The domain name of the target domain.
  - `verificationStatus` 'PENDING' | 'VERIFIED' | 'FAILED' | 'UNREACHABLE', required — The current verification status of the target domain.
  - `verificationStatusReason` string — The reason for the current target domain verification status.
  - `verificationDetails` object — The verification details for the target domain, including the verification token and instructions.
    - `method` 'DNS_TXT' | 'HTTP_ROUTE' | 'PRIVATE_VPC' — The verification method used for the target domain.
    - `dnsTxt` object — The DNS TXT verification details.
      - `token` string — The verification token to include in the DNS record value.
      - `dnsRecordName` string — The name of the DNS record to create for verification.
      - `dnsRecordType` 'TXT' — The type of DNS record to create. Currently, only TXT is supported.
    - `httpRoute` object — The HTTP route verification details.
      - `token` string — The verification token to serve at the specified route path.
      - `routePath` string — The HTTP route path where the verification token must be served.
  - `createdAt` string, date-time — The date and time the target domain was created, in UTC format.
  - `verifiedAt` string, date-time — The date and time the target domain was verified, in UTC format.

---

[API](https://skmtc.net/aws/apis/securityagent.md) · [All operations](https://skmtc.net/aws/apis/securityagent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/securityagent/versions/cad56717d636/schema)
