Skip to content
Documentation
EN
English简体中文繁體中文
Workspace
GuidesAPI referenceAPI v1
Guide

Buy and renew static proxies

Choose a location, confirm a quote, and retrieve your fixed-IP connection.

Select an endpoint to edit a request and view its response.

Choose a location and term

Call GET/catalog with catalog:read. Choose the returned offer for the location and term you need. Copy its id into price_id.

Prices and availability follow your workspace. Choose a location offer returned by the catalogue. Month-based terms use calendar months.

Get a quote

Call POST/quotes with PRICE_ID set to the offer ID. Use the API base and key from getting started:

curl --fail-with-body "$MIGO_API_BASE/quotes" \
  -H "Authorization: Bearer $MIGO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d "{\"price_id\":\"$PRICE_ID\",\"quantity\":1,\"protocol\":\"http\",\"access_optimized\":false}"

Check the returned total_fen. Amounts are strings in CNY fen: "100" means CNY 1.00. The wallet charge occurs when you confirm the order.

Confirm the order

Call POST/orders with QUOTE_ID set to the returned quote ID. Create one request key and save it with this order:

ORDER_REQUEST_KEY=$(uuidgen)

curl --fail-with-body "$MIGO_API_BASE/orders" \
  -H "Authorization: Bearer $MIGO_API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $ORDER_REQUEST_KEY" \
  -d "{\"quote_id\":\"$QUOTE_ID\"}"

This step spends your wallet balance. It needs orders:write and wallet:spend. If the response is lost, repeat the same body with the saved key.

Wait for the connection

A 202 response means the order was accepted. Follow its operations with GET/operations/{id} or read GET/orders/{id}. Once ready, get credentials from GET/proxies/{id} and connect your proxy.

Renew or add optimization

For renewal, use the prices returned with the instance. Create POST/proxies/{id}/renewal-quotes, then confirm with POST/proxies/{id}/renewals and a saved idempotency key. This renewal flow supports active resources, so renew before expiry.

For several instances, use the batch-renewal endpoints. To add optimized access to an existing IP, request POST/proxies/{id}/optimization-quotes and confirm through POST/orders. See the API reference for the exact request fields.