---
title: "Create a new DNS provider"
method: POST
path: "/dns-providers"
tags: ["DNS Providers"]
---

# Create a new DNS provider

`POST /dns-providers`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/dns-providers`
- Auth: HTTP bearer

The provider's credentials will be tested before creation.
If the connection test fails, the provider will not be created.

## Request body

- CreateDnsProviderRequest: Request to create a new DNS provider
  - `credentials` union, required: Provider credentials
    - object
      - `api_key` string, password, required: A credential. Write-only: it is never returned, and the AI assistant supplies it through a secret slot instead of typing it into the conversation.
      - `type` 'bunny', required
    - object
      - `account_id` string, nullable
      - `api_token` string, password, required: A credential. Write-only: it is never returned, and the AI assistant supplies it through a secret slot instead of typing it into the conversation.
      - `type` 'cloudflare', required
    - object
      - `api_key` string, password, required: A credential. Write-only: it is never returned, and the AI assistant supplies it through a secret slot instead of typing it into the conversation.
      - `api_user` string, required
      - `client_ip` string, nullable
      - `sandbox` boolean
      - `type` 'namecheap', required
    - object
      - `access_key_id` string, required
      - `region` string, nullable
      - `secret_access_key` string, password, required: A credential. Write-only: it is never returned, and the AI assistant supplies it through a secret slot instead of typing it into the conversation.
      - `session_token` string, password, nullable: A credential. Write-only: it is never returned, and the AI assistant supplies it through a secret slot instead of typing it into the conversation.
      - `type` 'route53', required
    - object
      - `api_token` string, password, required: A credential. Write-only: it is never returned, and the AI assistant supplies it through a secret slot instead of typing it into the conversation.
      - `type` 'digitalocean', required
    - object
      - `private_key` string, password, required: A credential. Write-only: it is never returned, and the AI assistant supplies it through a secret slot instead of typing it into the conversation.
      - `project_id` string, required
      - `service_account_email` string, required
      - `type` 'gcp', required
    - object
      - `client_id` string, required
      - `client_secret` string, password, required: A credential. Write-only: it is never returned, and the AI assistant supplies it through a secret slot instead of typing it into the conversation.
      - `resource_group` string, required
      - `subscription_id` string, required
      - `tenant_id` string, required
      - `type` 'azure', required
    - object: Pebble challtestsrv mock DNS (LOCAL DEV/TEST ONLY)
      - `management_url` string, required
      - `type` 'pebble', required
  - `description` string, nullable: Optional description
  - `name` string, required: User-friendly name
  - `provider_type` 'cloudflare' | 'bunny' | 'namecheap' | 'route53' | 'digitalocean' | 'gcp' | 'azure' | 'manual' | 'pebble', required: Provider type

## Response `201`

DNS provider created

- DnsProviderResponse: DNS provider response
  - `created_at` string, required
  - `credentials` unknown, required
  - `description` string, nullable
  - `flat_hostnames_supported` boolean, required: Whether this provider benefits from the flat hostname mode (e.g. Cloudflare Universal SSL). The UI surfaces/recommends the Flat toggle when true.
  - `id` integer, required
  - `is_active` boolean, required
  - `last_error` string, nullable
  - `last_used_at` string, nullable
  - `name` string, required
  - `provider_type` string, required
  - `updated_at` string, required

## Other responses

- `400`: Invalid request or connection test failed
- `401`: Unauthorized
- `403`: Insufficient permissions

## Changes

- **2026-10-23** `7d41b820a372`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7` from the `credentials` request property `oneOf` list
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7` to the `credentials` request property `oneOf` list
- **2026-10-23** `24af93ff5379`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7` from the `credentials` request property `oneOf` list
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7` to the `credentials` request property `oneOf` list
- **2026-10-22** `842d42ed4659`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7` from the `credentials` request property `oneOf` list
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7` to the `credentials` request property `oneOf` list
- …earlier changes not shown

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/dns-providers/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
