---
title: "Update a DNS provider"
method: PUT
path: "/dns-providers/{id}"
tags: ["DNS Providers"]
---

# Update a DNS provider

`PUT /dns-providers/{id}`

## Request

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

If new credentials are supplied, they are tested before the update is
persisted (same as creation) -- otherwise a provider's credentials (and,
for Pebble, its target URL) could be swapped for something invalid or
unsafe without ever going through validation.

## Path parameters

- `id` integer, required

## Request body

- UpdateDnsProviderRequest: Request to update a DNS provider
  - `credentials` union: DNS provider credentials (API-facing)
    - 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: New description
  - `is_active` boolean, nullable: Active status
  - `name` string, nullable: New name

## Response `200`

DNS provider updated

- 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
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Provider not found
- `409`: Deactivation refused while domain delivery bindings use the provider

## Changes

- **2026-11-09** `12896146b193`: 1 breaking
  - removed the required property `extensions` from the response with the `409` status
- **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/oneOf[#/components/schemas/DnsProviderCredentials]/` request property `oneOf` list
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7` to the `credentials/oneOf[#/components/schemas/DnsProviderCredentials]/` 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/oneOf[#/components/schemas/DnsProviderCredentials]/` request property `oneOf` list
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7` to the `credentials/oneOf[#/components/schemas/DnsProviderCredentials]/` request property `oneOf` list
- …earlier changes not shown

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/dns-providers/:id/put.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)
