# Organization API: Customer Portal: Ips

> The 13 Organization API operations for ips.

Source: https://docs.coritan.com/api/reference/organizations/customer-portal/ips/

Part of [Customer Portal](/api/reference/organizations/customer-portal/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/portal/ips`](#op-get-api-v1-orgs-org-slug-portal-ips) | List my IPs |
| GET | [`/api/v1/orgs/{org_slug}/portal/ips/attach-targets`](#op-get-api-v1-orgs-org-slug-portal-ips-attach-targets) | List attach targets |
| POST | [`/api/v1/orgs/{org_slug}/portal/ips/order`](#op-post-api-v1-orgs-org-slug-portal-ips-order) | Order a floating IP / subnet via the org storefront path |
| GET | [`/api/v1/orgs/{org_slug}/portal/ips/orders`](#op-get-api-v1-orgs-org-slug-portal-ips-orders) | Open IP order intents, so unpaid or in-flight orders resume after login or in a new tab |
| GET | [`/api/v1/orgs/{org_slug}/portal/ips/orders/{idempotency_key}`](#op-get-api-v1-orgs-org-slug-portal-ips-orders-idempotency-key) | Get my IP order |
| POST | [`/api/v1/orgs/{org_slug}/portal/ips/orders/{idempotency_key}/cancel`](#op-post-api-v1-orgs-org-slug-portal-ips-orders-idempotency-key-cancel) | Cancel my IP order |
| GET | [`/api/v1/orgs/{org_slug}/portal/ips/pools`](#op-get-api-v1-orgs-org-slug-portal-ips-pools) | List sellable pools |
| GET | [`/api/v1/orgs/{org_slug}/portal/ips/{service_id}`](#op-get-api-v1-orgs-org-slug-portal-ips-service-id) | Get my IP |
| POST | [`/api/v1/orgs/{org_slug}/portal/ips/{service_id}/attach`](#op-post-api-v1-orgs-org-slug-portal-ips-service-id-attach) | Attach IP |
| POST | [`/api/v1/orgs/{org_slug}/portal/ips/{service_id}/detach`](#op-post-api-v1-orgs-org-slug-portal-ips-service-id-detach) | Detach IP |
| GET | [`/api/v1/orgs/{org_slug}/portal/ips/{service_id}/hosts`](#op-get-api-v1-orgs-org-slug-portal-ips-service-id-hosts) | List my IP hosts |
| GET | [`/api/v1/orgs/{org_slug}/portal/ips/{service_id}/ptr`](#op-get-api-v1-orgs-org-slug-portal-ips-service-id-ptr) | Get PTR |
| PATCH | [`/api/v1/orgs/{org_slug}/portal/ips/{service_id}/ptr`](#op-patch-api-v1-orgs-org-slug-portal-ips-service-id-ptr) | Set PTR |

### List my IPs {#op-get-api-v1-orgs-org-slug-portal-ips}

`GET /api/v1/orgs/{org_slug}/portal/ips`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### List attach targets {#op-get-api-v1-orgs-org-slug-portal-ips-attach-targets}

`GET /api/v1/orgs/{org_slug}/portal/ips/attach-targets`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Order a floating IP / subnet via the org storefront path {#op-post-api-v1-orgs-org-slug-portal-ips-order}

`POST /api/v1/orgs/{org_slug}/portal/ips/order`

Order a floating IP / subnet via the org storefront path.

Reserves inventory in the same transaction as the invoice. Replays of the
same ``idempotency_key`` return the original invoice instead of a second order.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `org_product_id` | integer | yes |  |
| `org_pricing_id` | integer | yes |  |
| `pool_id` | integer | yes |  |
| `prefix_len` | integer | no |  |
| `version` | string | no |  |
| `hostname` | string or null | no |  |
| `idempotency_key` | string | yes | Client-generated key so double-submit / multi-tab retries replay the same order |
| `attach_to_org_service_id` | integer or null | no | One of your Minecraft servers (org service id). The address is attached to it as soon as it is provisioned; single IPv4 only. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Open IP order intents, so unpaid or in-flight orders resume after login or in a new tab {#op-get-api-v1-orgs-org-slug-portal-ips-orders}

`GET /api/v1/orgs/{org_slug}/portal/ips/orders`

Open IP order intents, so unpaid or in-flight orders resume after login or in a new tab.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Get my IP order {#op-get-api-v1-orgs-org-slug-portal-ips-orders-idempotency-key}

`GET /api/v1/orgs/{org_slug}/portal/ips/orders/{idempotency_key}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `idempotency_key` | path | string | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Cancel my IP order {#op-post-api-v1-orgs-org-slug-portal-ips-orders-idempotency-key-cancel}

`POST /api/v1/orgs/{org_slug}/portal/ips/orders/{idempotency_key}/cancel`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `idempotency_key` | path | string | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### List sellable pools {#op-get-api-v1-orgs-org-slug-portal-ips-pools}

`GET /api/v1/orgs/{org_slug}/portal/ips/pools`

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org_slug` | path | string | yes |  |
| `version` | query | string | no | Default: `ipv4`. |
| `prefix_len` | query | integer or null | no |  |
| `region` | query | string or null | no |  |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Get my IP {#op-get-api-v1-orgs-org-slug-portal-ips-service-id}

`GET /api/v1/orgs/{org_slug}/portal/ips/{service_id}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `service_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Attach IP {#op-post-api-v1-orgs-org-slug-portal-ips-service-id-attach}

`POST /api/v1/orgs/{org_slug}/portal/ips/{service_id}/attach`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `service_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `target_type` | string | yes | vps \| container |
| `target_service_id` | integer | yes | Platform service id of the compute target |
| `host_address` | string or null | no | Host IP within a rented subnet; omit to attach first free host |
| `host_inventory_id` | integer or null | no | Alternative to host_address: inventory id of the host row |
| `is_primary` | boolean or null | no | For VPS multi-IP: set as primary (ipconfig0). Default: primary if none yet. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Detach IP {#op-post-api-v1-orgs-org-slug-portal-ips-service-id-detach}

`POST /api/v1/orgs/{org_slug}/portal/ips/{service_id}/detach`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `service_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json`

| Field | Type | Required |
| --- | --- | --- |
| `host_address` | string or null | no |
| `host_inventory_id` | integer or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### List my IP hosts {#op-get-api-v1-orgs-org-slug-portal-ips-service-id-hosts}

`GET /api/v1/orgs/{org_slug}/portal/ips/{service_id}/hosts`

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `service_id` | path | integer | yes |  |
| `org_slug` | path | string | yes |  |
| `include_reserved` | query | boolean | no | Default: `True`. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Get PTR {#op-get-api-v1-orgs-org-slug-portal-ips-service-id-ptr}

`GET /api/v1/orgs/{org_slug}/portal/ips/{service_id}/ptr`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `service_id` | path | integer | yes |
| `org_slug` | path | string | yes |
| `host_address` | query | string or null | no |
| `host_inventory_id` | query | integer or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Set PTR {#op-patch-api-v1-orgs-org-slug-portal-ips-service-id-ptr}

`PATCH /api/v1/orgs/{org_slug}/portal/ips/{service_id}/ptr`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `service_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `hostname` | string | yes |
| `host_address` | string or null | no |
| `host_inventory_id` | integer or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
