---
title: "Store dns record"
method: POST
path: "/2/zones/{zone}/records"
tags: ["Zone > Dns Record"]
---

# Store dns record

`POST /2/zones/{zone}/records`

Create a dns record in a given zone

## Path parameters

- `zone` string, required

## Query parameters

- `with` string

## Request body

- object
  - `source` string, nullable — Source of the dns record
  - `target` string, required — Target of the dns record
  - `ttl` integer, required — TTL of the dns record
  - `type` 'A' | 'AAAA' | 'CAA' | 'CNAME' | 'DNAME' | 'DS' | 'MX' | 'NS' | 'SMIMEA' | 'SRV' | 'SSHFP' | 'TLSA' | 'TXT', required — Type of the dns record

## Response `200`

OK

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` 2f8071fdApiDnsDnsRecord — unresolved $ref

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/667aae28fec6/schema)
