Portal Community

dns/update

Replace an existing DNS record. All required fields must be provided — this is a full replacement (PUT), not a partial update (PATCH).

Full replacement: dns/update sends a PUT request. You must supply all required fields (Type, Name, Content) even if you are only changing one value. Use dns/get first to retrieve the current record values and carry forward any fields you are not changing.

When to Use

Configuration

Connection

FieldTypeRequiredDescription
ApiTokenstringrequiredScoped Cloudflare API Token with DNS.Edit permission. Store in BizFirst Credentials Manager.

Operation Fields

FieldTypeRequiredDescription
ZoneIdstringrequired32-character hexadecimal Zone ID.
RecordIdstringrequiredUUID of the record to update. Obtain from dns/list or dns/create output.
TypestringrequiredRecord type — must be provided even if unchanged.
NamestringrequiredFully-qualified record name — must be provided even if unchanged.
ContentstringrequiredNew record value — provide the updated value here.
TtlintegeroptionalTTL in seconds. Use 1 for automatic.
ProxiedbooleanoptionalWhether to route through Cloudflare proxy.

Sample Configuration

{
  "resource": "dns",
  "operation": "update",
  "connection": {
    "ApiToken": "{{ $credentials.cloudflare_dns_edit }}"
  },
  "ZoneId": "023e105f4ecef8ad9ca31a8372d0c353",
  "RecordId": "372e67954025e0ba6aaa6d586b9e0b59",
  "Type": "A",
  "Name": "api.example.com",
  "Content": "203.0.113.10",
  "Ttl": 1,
  "Proxied": true
}

Validation Errors

CodeConditionResolution
MISSING_API_TOKENApiToken is emptySet the ApiToken credential with DNS.Edit permission
MISSING_ZONE_IDZoneId is emptyProvide the Zone ID
MISSING_TYPEType field is emptyProvide the record type (carry forward from dns/get if unchanged)
MISSING_NAMEName field is emptyProvide the record name (carry forward from dns/get if unchanged)
MISSING_CONTENTContent field is emptyProvide the updated record value
UNKNOWN_ERRORRecord not found or insufficient permissionsVerify RecordId and Zone ID; confirm token has DNS.Edit

Output

Success Port

FieldTypeDescription
idstringRecord UUID (unchanged)
typestringRecord type after update
namestringRecord name after update
contentstringRecord value after update
ttlintegerTTL after update
proxiedbooleanProxy status after update
modifiedOnstringISO 8601 timestamp of the update

Error Port

On failure, the error port receives an object with code and message.

Sample Output

{
  "id": "372e67954025e0ba6aaa6d586b9e0b59",
  "type": "A",
  "name": "api.example.com",
  "content": "203.0.113.10",
  "ttl": 1,
  "proxied": true,
  "modifiedOn": "2026-05-26T14:00:00Z"
}

Expression Reference

ExpressionReturns
{{ $node.DnsUpdate.output.id }}Record UUID
{{ $node.DnsUpdate.output.content }}Updated record value
{{ $node.DnsUpdate.output.modifiedOn }}Timestamp of the update
{{ $node.DnsUpdate.output.proxied }}Proxy status after update

Node Policies & GuardRails

PolicyDetail
Always call dns/get before dns/updateCarry forward Type, Name, and any unchanged fields from dns/get to avoid unintentional resets
Store rollback snapshotPersist the dns/get output before calling dns/update — enables rollback by re-submitting the original values
Require DNS.Edit tokenUpdate requires write permission — a read-only token will fail
Store ApiToken in Credentials ManagerNever hardcode the token in configuration JSON
DNS changes propagate immediately via CloudflareRecursive resolvers cache based on TTL — reduce TTL before migration if fast propagation is needed

Examples

Example 1: Blue-Green IP Switch

After green environment is validated: (1) Call dns/get to read current A record. (2) Call dns/update with new IP in Content, carry forward Type and Name from dns/get. (3) Log the old IP and new IP to the deployment audit trail. On rollback, reverse the update using the saved dns/get snapshot.

Example 2: Pre-Migration TTL Reduction

24 hours before migration: (1) Call dns/get to read current TTL. (2) Call dns/update with Ttl: 60 but keep Content, Type, Name unchanged. This reduces resolver caching so the actual IP switch propagates in under a minute.

Example 3: Automated DKIM Key Rotation

Triggered by a scheduled workflow: (1) Generate new DKIM key pair. (2) dns/list to find the TXT record for selector._domainkey. (3) Call dns/update with the new DKIM public key value in Content. (4) Send a notification with the new key for any external systems that need updating.