# requestDomainDnsChange

Queue one DNS record edit (CREATE, UPDATE or DELETE by `recordId`), live within a minute. LOCKED records are refused; a MAIL record's `warning` says what a wrong value breaks. Org admins, on the person's yes.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "requestDomainDnsChange", "variables": {...} }`
- Scope: `ADMIN`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `input`: `RequestCustomerDnsChangeInput!` (required)
  - `domain`: `String!` (required)
  - `action`: `CustomerDnsChangeAction!` (required, one of `CREATE`, `UPDATE`, `DELETE`)
  - `recordId`: `String`. The record to UPDATE or DELETE, by id. Omitted for a CREATE.
  - `record`: `CustomerDnsRecordInput`. What to write. Required for CREATE and UPDATE; omitted for a DELETE.
    - `type`: `String!` (required)
    - `name`: `String!` (required). The full hostname, on the domain being edited.
    - `content`: `String!` (required)
    - `ttl`: `Int!` (required). Seconds; 1 is automatic.
    - `proxied`: `Boolean!` (required)
    - `priority`: `Int`. MX and SRV only.

## Response (data, an example)

```json
{
  "customerDnsMutation": {
    "requestChange": {
      "outcome": "QUEUED",
      "reason": "…",
      "warning": "…"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "requestDomainDnsChange",
    "variables": {
      "input": {
        "domain": "<String>",
        "action": "CREATE"
      }
    }
  }'
```
