---
title: "Create a New VPC NAT Gateway"
method: POST
path: "/v2/vpc_nat_gateways"
tags: ["DigitalOcean-public.v2-new_[Public Preview] VPC NAT Gateways"]
---

# Create a New VPC NAT Gateway

`POST /v2/vpc_nat_gateways`

To create a new VPC NAT gateway, send a POST request to `/v2/vpc_nat_gateways` setting the required attributes.

The response body will contain a JSON object with a key called `vpc_nat_gateway` containing the standard attributes for the new VPC NAT gateway.

## Request body

- VpcNatGatewayCreate
  - `name` string, required — The human-readable name of the VPC NAT gateway.
  - `type` 'PUBLIC', required — The type of the VPC NAT gateway.
  - `region` 'nyc1' | 'nyc2' | 'nyc3' | 'ams2' | 'ams3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'lon1' | 'fra1' | 'tor1' | 'blr1' | 'syd1' | 'atl1', required — The region in which the VPC NAT gateway is created.
  - `size` integer, required — The size of the VPC NAT gateway.
  - `vpcs` object[], required — An array of VPCs associated with the VPC NAT gateway.
    - `vpc_uuid` string — The unique identifier of the VPC to which the NAT gateway is attached.
  - `udp_timeout_seconds` integer — The UDP timeout in seconds for the VPC NAT gateway.
  - `icmp_timeout_seconds` integer — The ICMP timeout in seconds for the VPC NAT gateway.
  - `tcp_timeout_seconds` integer — The TCP timeout in seconds for the VPC NAT gateway.

## Response `202`

The response will be a JSON object with a key called `vpc_nat_gateway`. This will be
set to a JSON object that contains the standard VPC NAT gateway attributes.

- object
  - `vpc_nat_gateway` VpcNatGatewayGet
    - `id` string — The unique identifier for the VPC NAT gateway. This is automatically generated upon creation.
    - `name` string — The human-readable name of the VPC NAT gateway.
    - `type` 'PUBLIC' — The type of the VPC NAT gateway.
    - `state` 'NEW' | 'PROVISIONING' | 'ACTIVE' | 'DELETING' | 'ERROR' | 'INVALID' — The current state of the VPC NAT gateway.
    - `region` 'nyc1' | 'nyc2' | 'nyc3' | 'ams2' | 'ams3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'lon1' | 'fra1' | 'tor1' | 'blr1' | 'syd1' | 'atl1' — The region in which the VPC NAT gateway is created.
    - `size` integer — The size of the VPC NAT gateway.
    - `vpcs` object[] — An array of VPCs associated with the VPC NAT gateway.
      - `vpc_uuid` string — The unique identifier of the VPC to which the NAT gateway is attached.
      - `gateway_ip` string — The gateway IP address of the VPC NAT gateway.
    - `egresses` object — An object containing egress information for the VPC NAT gateway.
      - `public_gateways` object[] — An array of public gateway IP addresses for the VPC NAT gateway.
        - `ipv4` string — IPv4 address of the public gateway.
    - `udp_timeout_seconds` integer — The UDP timeout in seconds for the VPC NAT gateway.
    - `icmp_timeout_seconds` integer — The ICMP timeout in seconds for the VPC NAT gateway.
    - `tcp_timeout_seconds` integer — The TCP timeout in seconds for the VPC NAT gateway.
    - `created_at` string, date-time — A time value given in ISO8601 combined date and time format that represents when the VPC NAT gateway was created.
    - `updated_at` string, date-time — A time value given in ISO8601 combined date and time format that represents when the VPC NAT gateway was last updated.

## Other responses

- `401` — Authentication failed due to invalid credentials.
- `429` — The API rate limit has been exceeded.
- `500` — There was a server error.
- `default` — There was an unexpected error.

---

[API](https://skmtc.net/digitalocean/apis/digitalocean-api.md) · [All operations](https://skmtc.net/digitalocean/apis/digitalocean-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalocean/digitalocean-api/versions/cb3bf9b21459/schema)
