---
title: "Creates a TXT record for a specific primary domain."
method: POST
path: "/domains/primary/{domainId}/records/TXT"
tags: ["records - primary - TXT"]
---

# Creates a TXT record for a specific primary domain.

`POST /domains/primary/{domainId}/records/TXT`

## Request

- Base URL: `https://manager.digicertdns.com/v1`
- URL: `https://manager.digicertdns.com/v1/domains/primary/{domainId}/records/TXT`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/digicert/apis/digicert-dns/docs/domains/primary/:domainId/records/TXT/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint creates a TXT record for a specific primary domain, enabling users to associate the domain with an IP address.</br></br>Key features include:</br></br>- **Clear success messaging:** Returns a `200` success code with a confirmation message indicating the successful completion of the requested action.</br>- **Comprehensive error handling:** Returns a `400` error code with a clear description when requests fail.</br>- **Seamless record creation:** Facilitates the creation of a TXT record in-line with the appropriate schema, ensuring smooth and efficient organization.</br>- **Targeted data addition:** Leverages the `domainId` parameter in the URL path to add a new TXT record to the specified domain, ensuring accurate and focused modifications for effective domain management.

## Path parameters

- `domainId` integer, required

## Request body

- TXTRecordWithoutId
  - `type` string
  - `name` string
  - `createdTs` string, date-time
  - `modifiedTs` string, date-time
  - `systemFlag` boolean
  - `ttl` integer
  - `region` GtdRegion
    - `gtdLocationId` integer
    - `regionName` string
    - `regionLabel` string
  - `values` TXTRecordWithoutIdValues[]
    - `id` integer
    - `value` string
    - `syntax` 'BIMI' | 'DKIM' | 'SPF' | 'DMARC' | 'Generic'
    - `enabled` boolean
    - `sortOrder` integer

## Response `200`

TXT record created successfully.

- TXTRecord
  - `id` integer
  - `type` string
  - `name` string
  - `createdTs` string, date-time
  - `modifiedTs` string, date-time
  - `systemFlag` boolean
  - `ttl` integer
  - `region` GtdRegion
    - `gtdLocationId` integer
    - `regionName` string
    - `regionLabel` string
  - `values` TXTRecordWithoutIdValues[]
    - `id` integer
    - `value` string
    - `syntax` 'BIMI' | 'DKIM' | 'SPF' | 'DMARC' | 'Generic'
    - `enabled` boolean
    - `sortOrder` integer

## Other responses

- `400`: Request is malformed or invalid.

---

[API](https://skmtc.dev/digicert/apis/digicert-dns.md) - [All operations](https://skmtc.dev/digicert/apis/digicert-dns/llms.txt) - [OpenAPI document](https://skmtc.dev/digicert/apis/digicert-dns/revisions/c74fc728cff8?raw)
