netlify.dns.create_record ​
Create a DNS record in a Netlify DNS zone
Create a DNS record in a Netlify-managed DNS zone.
Inputs:
- zone_id: Netlify DNS zone ID (required).
- record_type: A | AAAA | CNAME | MX | TXT | NS | SPF (required).
- hostname: Record hostname, e.g. api.example.com (required).
- value: Record value (required).
- ttl: TTL in seconds (optional, default: 3600).
Outputs (terminal state_data):
- record_id: str — Netlify DNS record ID
Plugin required: context.get_plugin("netlify") must expose .api_token.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-netlify |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
zone_id | string | Yes | — | Netlify DNS zone ID |
record_type | string | Yes | — | DNS record type: A, CNAME, TXT, etc. |
hostname | string | Yes | — | Record hostname, e.g. api.example.com |
value | string | Yes | — | Record value |
ttl | integer | No | — | TTL in seconds (default: 3600) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
zone_id | string | No | — | — |
record_type | string | No | — | — |
hostname | string | No | — | — |
value | string | No | — | — |
ttl | integer | No | — | — |
record_id | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "netlify.dns.create_record",
"initial_data": {
"zone_id": "value",
"record_type": "value",
"hostname": "value",
"value": "value"
}
}