# update_dns_record

Source: https://modulify.ai/docs/mcp/bought-domains/update-dns-record

Replaces one DNS record of a domain the workspace bought, chosen by its Id from list_dns_records.

- Title: Change a DNS record of a bought domain
- Scope: `domains:write`
- Access: Destructive

Every field is replaced, the type included, so pass the record as it should be afterwards and copy the fields that stay the same, `ttl` too, from `list_dns_records`. The new record follows the same rules as one added with `create_dns_record`, and a record with `Locked` true cannot be changed: the refusal names the site or email domain that holds it.

Sites, email or services that rely on the old record can stop working, so the tool tells the client to confirm the change with you first. It is refused when the record no longer exists. The answer is the saved record, and the change usually reaches every DNS server within a few minutes. It needs the **Manage domains** permission, and the domain must be `active` or `expiring`. The workspace can make 30 domain changes a minute, shared with the **Domains** page and covering DNS records, nameservers, the registrant, the transfer lock, auto-renew and transfer codes, and a refusal says how long to wait. See [Edit or delete a record](https://modulify.ai/docs/publish/manage-dns#edit-or-delete-a-record).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | string | Yes | The workspace that owns the domain. |
| `domainId` | string | Yes | The `_id` of the bought domain, from `list_bought_domains`. |
| `recordId` | integer | Yes | The `Id` of the record, from `list_dns_records`. |
| `type` | string | Yes | The record type: `A`, `AAAA`, `ANAME`, `CNAME`, `MX`, `NS`, `SRV` or `TXT`. |
| `host` | string | Yes | The name relative to the domain, `@` for the domain itself or a part such as `www`. Up to 253 characters. |
| `value` | string | Yes | What the record answers: an address, a hostname or the text, depending on the type. For SRV, the target hostname. Up to 4,096 characters as sent. |
| `priority` | integer | No | Required for MX and SRV, ignored for other types. From 0 to 65535, lower is tried first. |
| `weight` | integer | No | Required for SRV, ignored for other types. From 0 to 65535. |
| `port` | integer | No | Required for SRV, ignored for other types. From 1 to 65535. |
| `ttl` | integer | Yes | Seconds DNS servers keep the record, from 300 to 604800. Pass the current `Ttl` to keep it. |