{
 "openapi": "3.1.0",
 "info": {
  "title": "Proxyhaul static proxy API",
  "version": "2026-11-23",
  "description": "List the static ISP and datacenter IPs rented by a Proxyhaul account and ask for the replacement of one IP. The 16-digit account number is the only credential: send it in the JSON body, never in a URL. Orders, payments and renewals happen at the checkout, not through this API. No CORS headers: call it from a server.",
  "contact": {
   "email": "support@proxyhaul.com",
   "url": "https://proxyhaul.com/static-proxy-api/"
  }
 },
 "servers": [
  {
   "url": "https://proxyhaul.com/api/v1"
  }
 ],
 "paths": {
  "/static/list": {
   "post": {
    "summary": "List the rentals of an account with their IPs and logins",
    "description": "Rate limits: 120 calls per hour per calling address (list and replace together) and 30 list calls per hour per account. An unknown account gets the same answer as an account with no rental.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "accountNumber"
        ],
        "properties": {
         "accountNumber": {
          "type": "string",
          "description": "16 digits, spaces or dashes allowed",
          "example": "1234 5678 9012 3456"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Rentals of the account",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "allocations": {
           "type": "array",
           "items": {
            "type": "object",
            "description": "One rental (order reference ORD-XXXXXXXX, product, country, IP count, status, end date, IPs with port, username and password, renewals)"
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Invalid JSON body"
     },
     "413": {
      "description": "Body too large"
     },
     "422": {
      "description": "validation_failed: accountNumber invalid"
     },
     "429": {
      "description": "rate_limited; see the Retry-After header"
     }
    }
   }
  },
  "/static/replace": {
   "post": {
    "summary": "Ask for the replacement of one IP of an active rental",
    "description": "The request is reviewed by the Proxyhaul team; it is not an instant swap. Rate limit: 10 requests per hour per account. A second request for the same IP while one is open returns the same reference with duplicate: true.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "accountNumber",
         "orderRef",
         "ip"
        ],
        "properties": {
         "accountNumber": {
          "type": "string",
          "example": "1234 5678 9012 3456"
         },
         "orderRef": {
          "type": "string",
          "pattern": "^ORD-[0-9A-Z]{8}$",
          "example": "ORD-7K2Q9WXA"
         },
         "ip": {
          "type": "string",
          "example": "203.0.113.7"
         },
         "reason": {
          "type": "string",
          "maxLength": 300
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "A request is already open for this IP (duplicate: true)"
     },
     "202": {
      "description": "Request recorded",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "requestRef": {
           "type": "string",
           "example": "REQ-4M8T2B6C"
          },
          "status": {
           "type": "string",
           "enum": [
            "requested",
            "done",
            "refused"
           ]
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Invalid JSON body"
     },
     "404": {
      "description": "not_found: this IP is not part of the account's rental"
     },
     "409": {
      "description": "conflict: only an active IP of an active rental can be replaced"
     },
     "413": {
      "description": "Body too large"
     },
     "422": {
      "description": "validation_failed"
     },
     "429": {
      "description": "rate_limited; see the Retry-After header"
     }
    }
   }
  }
 }
}