---
title: "Create a template record"
method: POST
path: "/{account}/templates/{template}/records"
tags: ["templates"]
---

# Create a template record

`POST /{account}/templates/{template}/records`

Creates a new template record.

## Path parameters

- `account` integer, required
- `template` string, required

## Request body

- object
  - `name` string, required
  - `type` string, required
  - `content` string, required
  - `ttl` integer
  - `priority` integer

## Response `201`

Successfully create a template record.

- object
  - `data` TemplateRecord, required
    - `id` integer, required
    - `template_id` integer, required
    - `name` string, required
    - `content` string, required
    - `ttl` integer, required — The Time To Live (TTL) value for the entry, in seconds.
    - `priority` string, nullable, required
    - `type` 'A' | 'AAAA' | 'ALIAS' | 'CAA' | 'CNAME' | 'DNSKEY' | 'DS' | 'HINFO' | 'MX' | 'NAPTR' | 'NS' | 'POOL' | 'PTR' | 'SOA' | 'SPF' | 'SRV' | 'SSHFP' | 'TXT' | 'URL', required — Supported DNS record types for templates.
    - `created_at` string, date-time, required — A date-time value, representing when the entry was created, formatted as ISO 8601.
    - `updated_at` string, date-time, required — A date-time value, representing when the entry was last updated, formatted as ISO 8601.

## Changes

- **2025-07-30** (v2) `2a675399e169` — 1 breaking
  - the `data/priority` response's property type changed from `integer` to `string, null` for status `201`
- **2025-07-11** (v2) `06780be0ef17` — 3 breaking, 12 info
  - added the new required request property `content`
  - added the new required request property `name`
  - added the new required request property `type`
  - added the new optional request property `priority`
  - …11 more
- **2023-07-18** (v2) `c8591dcf8c29` — 12 breaking, 5 warning
  - the response property `data/priority` became nullable for the status `201`
  - the response property `data` became optional for the status `201`
  - the response property `data/content` became optional for the status `201`
  - the response property `data/created_at` became optional for the status `201`
  - …13 more

[Change history](https://skmtc.dev/dnsimple/apis/dnsimple-api/changes/:account/templates/:template/records/post.md)

---

[API](https://skmtc.dev/dnsimple/apis/dnsimple-api.md) · [All operations](https://skmtc.dev/dnsimple/apis/dnsimple-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dnsimple/dnsimple-api/revisions/f0f58c839e7d/schema)
