---
title: "Create an Elastic IP"
method: POST
path: "/elastic-ip"
tags: ["elastic-ip"]
---

# Create an Elastic IP

`POST /elastic-ip`

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/elastic-ip`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/elastic-ip/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- object
  - `addressfamily` 'inet4' | 'inet6': Elastic IP address family (default: :inet4)
  - `description` string: Elastic IP description
  - `healthcheck` ElasticIpHealthcheck: Elastic IP address healthcheck
    - `strikes-ok` integer: Number of attempts before considering the target healthy (default: 2)
    - `tls-skip-verify` boolean: Skip TLS verification
    - `tls-sni` string: An optional domain or subdomain to check TLS against
    - `strikes-fail` integer: Number of attempts before considering the target unhealthy (default: 3)
    - `mode` 'tcp' | 'http' | 'https', required: Health check mode
    - `port` integer, required: Health check port
    - `uri` string: An endpoint to use for the health check, for example '/status'
    - `interval` integer: Interval between the checks in seconds (default: 10)
    - `timeout` integer: Health check timeout value in seconds (default: 2)
  - `labels` Labels

## Response `200`

200

- Operation: Operation
  - `id` string, uuid: Operation ID
  - `reason` 'incorrect' | 'unknown' | 'unavailable' | 'forbidden' | 'busy' | 'fault' | 'partial' | 'not-found' | 'interrupted' | 'unsupported' | 'conflict': Operation failure reason
  - `reference` object: Related resource reference
    - `id` string, uuid: Reference ID
    - `link` string: Link to the referenced resource
    - `command` string: Command name
  - `message` string: Operation message
  - `state` 'failure' | 'pending' | 'success' | 'timeout': Operation status

## Changes

- **2023-02-03** `6e9809fd1444`: 2 breaking, 3 warning, 2 info
  - the `healthcheck/tls-sni` request property's minLength was increased from `0` to `1`
  - the `healthcheck/uri` request property's minLength was increased from `0` to `1`
  - the `description` request property's maxLength was set to `255`
  - the `healthcheck/tls-sni` request property's maxLength was set to `255`
  - …3 more

[Operation history](https://skmtc.dev/exoscale/apis/exoscale-api/changes/elastic-ip/post.md)

---

[API](https://skmtc.dev/exoscale/apis/exoscale-api.md) - [All operations](https://skmtc.dev/exoscale/apis/exoscale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/exoscale/apis/exoscale-api/revisions/63da6f74c845?raw)
