> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudblast.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Reserve IPs

> Reserves addresses from a subnet at a location. Reserved IPs are never handed out to anyone else. Your balance has to cover the first hour. **Warning:** reserved IPs are billed hourly while no server uses them.



## OpenAPI

````yaml POST /reserved-ips
openapi: 3.0.3
info:
  title: CloudBlast API
  description: >-
    The CloudBlast V2 API provides a modern RESTful interface for managing your
    cloud infrastructure programmatically. All responses follow a consistent `{
    "data": ... }` or `{ "error": ... }` format.
  version: 2.0.0
servers:
  - url: https://console.cloudblast.io/api/v2
    description: Production
security:
  - bearerAuth: []
paths:
  /reserved-ips:
    post:
      tags:
        - Reserved IPs
      summary: Reserve IPs
      description: >-
        Reserves addresses from a subnet at a location. Reserved IPs are never
        handed out to anyone else. Your balance has to cover the first hour.
        **Warning:** reserved IPs are billed hourly while no server uses them.
      operationId: reserveIps
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - location_id
                - subnet_id
              properties:
                location_id:
                  type: integer
                  description: Location ID from `GET /reserved-ips/subnets`
                  example: 1
                subnet_id:
                  type: string
                  description: Subnet ID from `GET /reserved-ips/subnets`
                  example: d618ecc9-a614-4bb5-9dd2-67bef1b596ae
                quantity:
                  type: integer
                  minimum: 1
                  default: 1
                  description: Number of addresses to reserve
                  example: 2
      responses:
        '201':
          description: The addresses you now hold
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservedIpList'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '422':
          description: >-
            Refused. Codes: `RESERVED_IP_LIMIT_REACHED` (account IP limit,
            shared with every server address), `INSUFFICIENT_BALANCE`,
            `SUBNET_EXHAUSTED`, or `VALIDATION_ERROR`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: RESERVED_IP_LIMIT_REACHED
                  message: >-
                    You can hold up to 5 reserved IPs. You have 4, so you can
                    reserve 1 more.
components:
  schemas:
    ReservedIpList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ReservedIp'
        meta:
          type: object
          properties:
            count:
              type: integer
              description: Reserved IPs you hold
              example: 2
            limit:
              type: integer
              description: >-
                Your account IP limit (set by your account level), shared by
                every server address and reserved IPs
              example: 8
            used:
              type: integer
              description: >-
                Addresses counting against that limit: extra addresses on your
                servers plus reserved IPs no server uses
              example: 2
            hourly_price:
              type: number
              description: Price per hour of a reserved IP no server is using
              example: 0.00347
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code
            message:
              type: string
              description: Human-readable error message
          required:
            - code
            - message
    ReservedIp:
      type: object
      properties:
        address:
          type: string
          example: 203.0.113.50
        type:
          type: string
          enum:
            - ipv4
            - ipv6
          example: ipv4
        gateway:
          type: string
          example: 203.0.113.1
        cidr:
          type: integer
          example: 24
        rdns:
          type: string
          nullable: true
          example: null
        subnet:
          type: string
          nullable: true
          description: The subnet the address belongs to
          example: 203.0.113.0/24
        location:
          type: object
          nullable: true
          properties:
            id:
              type: integer
              example: 1
            short_code:
              type: string
              example: nl
            description:
              type: string
              nullable: true
              example: Amsterdam, NL
        server:
          type: object
          nullable: true
          description: The server using this address right now, or null when unused
          properties:
            uuid:
              type: string
              format: uuid
            uuid_short:
              type: string
              example: a1b2c3d4
            hostname:
              type: string
              example: web-01
        reserved_at:
          type: string
          format: date-time
          nullable: true
  responses:
    Unauthenticated:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHENTICATED
              message: >-
                Missing or invalid Authorization header. Use: Authorization:
                Bearer <token>
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token from your CloudBlast account settings. Pass as `Authorization:
        Bearer <token>`.

````