Residential proxies
Plans of residential traffic: buying and topping them up, generating their proxies and reading their usage.
/api/v1/residential/products List products
GET /api/v1/residential/productsThe products on sale, each with your price per GB at each volume. The final price, with discounts, tax and fees, comes from POST /quote.
Requires the api.residential.read scope.
limitinteger50.offsetinteger0.curl https://api.datafuel.ai/api/v1/residential/products \ --header 'Authorization: Bearer df_live_your_key_here'
OK.
{ "results": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "description": "string", "max_traffic_gb": 0, "tiers": [ { "min_gb": 0, "price_per_gb": 0 } ] } ], "count": 0, "limit": 0, "offset": 0 }
The request is malformed: message maps each invalid field to its problem, or is a sentence when the body cannot be read at all.
{ "error": "string", "message": "string", "meta": {} }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/products/{product} Get a product
GET /api/v1/residential/products/{product}The product with its prices and every country its proxies can exit in.
Requires the api.residential.read scope.
product REQUIREDstringcurl https://api.datafuel.ai/api/v1/residential/products/{product} \ --header 'Authorization: Bearer df_live_your_key_here'
OK.
{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "description": "string", "max_traffic_gb": 0, "tiers": [ { "min_gb": 0, "price_per_gb": 0 } ], "countries": [ { "country": "US", "continent": "NA" } ] }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/plans List your plans
GET /api/v1/residential/plansThe plans you hold, newest first, with the traffic left on each.
Requires the api.residential.read scope.
limitinteger50.offsetinteger0.statusstringcurl https://api.datafuel.ai/api/v1/residential/plans \ --header 'Authorization: Bearer df_live_your_key_here'
OK.
{ "results": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "status": "provisioning", "traffic": { "total_gb": 0, "used_gb": 0, "remaining_gb": 0, "updated_at": "2026-01-01T00:00:00Z" }, "subscription_id": "string", "expires_at": "2026-01-01T00:00:00Z", "created_at": "2026-01-01T00:00:00Z" } ], "count": 0, "limit": 0, "offset": 0 }
The request is malformed: message maps each invalid field to its problem, or is a sentence when the body cannot be read at all.
{ "error": "string", "message": "string", "meta": {} }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
The upstream provider refused the request; nothing was changed.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/plans/{plan} Get a plan
GET /api/v1/residential/plans/{plan}The plan with the countries POST /plans/{plan}/proxies accepts. Its username and password come from GET /plans/{plan}/credentials; the usernames and gateways to connect with differ per proxy, so they come from POST /plans/{plan}/proxies.
Requires the api.residential.read scope.
plan REQUIREDstringcurl https://api.datafuel.ai/api/v1/residential/plans/{plan} \ --header 'Authorization: Bearer df_live_your_key_here'
OK.
{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "status": "provisioning", "traffic": { "total_gb": 0, "used_gb": 0, "remaining_gb": 0, "updated_at": "2026-01-01T00:00:00Z" }, "subscription_id": "string", "expires_at": "2026-01-01T00:00:00Z", "created_at": "2026-01-01T00:00:00Z", "countries": [ { "country": "US", "continent": "NA" } ], "targeting": { "region": false, "city": false, "asn": false, "sticky": false, "session_minutes": false, "os": [ "string" ], "os_multiple": false } }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
The upstream provider refused the request; nothing was changed.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/plans/{plan}/locations List regions and cities
GET /api/v1/residential/plans/{plan}/locationsThe region and city codes in one of the plan's countries, for the region and city of POST /plans/{plan}/proxies; at most 200 of each. 409 product_withdrawn once the plan's product is no longer sold.
Requires the api.residential.read scope.
plan REQUIREDstringcountry REQUIREDstringregionstringregions.searchstringcurl https://api.datafuel.ai/api/v1/residential/plans/{plan}/locations \ --header 'Authorization: Bearer df_live_your_key_here'
OK.
{ "country": "US", "regions": [ { "code": "california", "name": "California" } ], "cities": [ { "code": "california", "name": "California" } ] }
The request is malformed: message maps each invalid field to its problem, or is a sentence when the body cannot be read at all.
{ "error": "string", "message": "string", "meta": {} }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
The request conflicts with the resource's current state; error names why.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
The upstream provider refused the request; nothing was changed.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/plans/{plan}/asns List ASNs
GET /api/v1/residential/plans/{plan}/asnsAutonomous systems for the asn of POST /plans/{plan}/proxies, at most 200. The provider's list is global, not per country: pick one that operates where your proxies exit. An exact number comes first. Empty when the plan's targeting.asn is false. 409 product_withdrawn once the plan's product is no longer sold.
Requires the api.residential.read scope.
plan REQUIREDstringsearchstringorange or 5617; an AS prefix is ignored. At most 64 characters.curl https://api.datafuel.ai/api/v1/residential/plans/{plan}/asns \ --header 'Authorization: Bearer df_live_your_key_here'
OK.
{ "asns": [ { "code": "california", "name": "California" } ] }
The request is malformed: message maps each invalid field to its problem, or is a sentence when the body cannot be read at all.
{ "error": "string", "message": "string", "meta": {} }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
The request conflicts with the resource's current state; error names why.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
The upstream provider refused the request; nothing was changed.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/plans/{plan}/usage Get a plan's usage
GET /api/v1/residential/plans/{plan}/usageThe requests and traffic the plan used between from and to, at most 400 days apart, as a series of points with their totals.
Requires the api.residential.read scope.
plan REQUIREDstringfrom REQUIREDstringto REQUIREDstringfrom.timezonestringEurope/Warsaw.curl https://api.datafuel.ai/api/v1/residential/plans/{plan}/usage \ --header 'Authorization: Bearer df_live_your_key_here'
OK.
{ "from": "2026-01-01T00:00:00Z", "to": "2026-01-01T00:00:00Z", "timezone": "Europe/Warsaw", "requests": 0, "traffic_gb": 0, "points": [ { "at": "2026-01-01T00:00:00Z", "requests": 0, "traffic_gb": 0 } ] }
The request is malformed: message maps each invalid field to its problem, or is a sentence when the body cannot be read at all.
{ "error": "string", "message": "string", "meta": {} }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
The upstream provider refused the request; nothing was changed.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/plans/{plan}/proxies Generate proxies
POST /api/v1/residential/plans/{plan}/proxiesBuilds quantity proxies on the plan, each with the gateway for its country, a username carrying its targeting and session, and the plan's password. Nothing is created or changed, but the answer carries the password, so it needs the manage level. Without country, each proxy exits in a random country of the plan. 409 product_withdrawn once the plan's product is no longer sold.
Requires the api.residential.manage scope.
plan REQUIREDstringcountrystringregionstringcitystringrotationstringsession_minutesintegerasnstringosarray<string>quantity REQUIREDintegerformatstringcurl https://api.datafuel.ai/api/v1/residential/plans/{plan}/proxies \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer df_live_your_key_here' \ --data '{ "country": "US", "region": "string", "city": "string", "rotation": "rotating", "session_minutes": 1, "asn": "7922", "os": [ "windows" ], "quantity": 1, "format": "json" }'
OK.
{ "proxies": [ { "host": "string", "port": 0, "username": "string", "password": "string", "country": "US" } ] }
The request is malformed: message maps each invalid field to its problem, or is a sentence when the body cannot be read at all.
{ "error": "string", "message": "string", "meta": {} }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
The request conflicts with the resource's current state; error names why.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
The upstream provider refused the request; nothing was changed.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/plans/{plan}/credentials Get the credentials
GET /api/v1/residential/plans/{plan}/credentialsThe plan's base proxy username and the password of every proxy of the plan. They are secrets, so reading them needs the manage level, and the answer is never cached.
Requires the api.residential.manage scope. Every call is recorded in the account's audit log.
plan REQUIREDstringcurl https://api.datafuel.ai/api/v1/residential/plans/{plan}/credentials \ --header 'Authorization: Bearer df_live_your_key_here'
OK.
{ "username": "string", "password": "string" }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
The upstream provider refused the request; nothing was changed.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/plans/{plan}/credentials/reset Reset the credentials
POST /api/v1/residential/plans/{plan}/credentials/resetIssues a new password for every proxy of the plan at once and answers the credentials with it; proxies using the old one stop working. The username does not change. The answer is never cached.
Requires the api.residential.manage scope. Every call is recorded in the account's audit log.
plan REQUIREDstringcurl https://api.datafuel.ai/api/v1/residential/plans/{plan}/credentials/reset \ --request POST \ --header 'Authorization: Bearer df_live_your_key_here'
OK.
{ "username": "string", "password": "string" }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
The upstream provider refused the request; nothing was changed.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
Something upstream did not answer in time and the change may still happen; read the resource (or the order) again before retrying.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/plans/{plan}/auto-top-up Get the auto top-up
GET /api/v1/residential/plans/{plan}/auto-top-upThe plan's auto top-up, null when it has none, and the limits a rule on the plan must respect.
Requires the api.residential.read scope.
plan REQUIREDstringcurl https://api.datafuel.ai/api/v1/residential/plans/{plan}/auto-top-up \ --header 'Authorization: Bearer df_live_your_key_here'
OK.
{ "rule": { "status": "armed", "reason": "string", "threshold_gb": 0, "amount_gb": 0, "max_per_day": 0, "max_per_month_gb": 0, "promo_code": "string", "payment": { "method": "balance", "card_id": "string" }, "last_fired_at": "2026-01-01T00:00:00Z", "created_at": "2026-01-01T00:00:00Z", "updated_at": "2026-01-01T00:00:00Z" }, "limits": { "enabled": false, "min_threshold_gb": 0, "min_amount_gb": 0, "max_amount_gb": 0, "max_per_day": 0, "max_per_month_gb": 0 } }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
The upstream provider refused the request; nothing was changed.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/plans/{plan}/auto-top-up Set the auto top-up
PUT /api/v1/residential/plans/{plan}/auto-top-upCreates the plan's auto top-up, armed, or replaces the settings of the one it has; paused pauses or re-arms it, and left out keeps its status. Whenever the plan's remaining traffic falls to threshold_gb, amount_gb more is bought and charged without asking to payment (the balance, a saved card from GET /api/v1/payment-methods, or the default card when card_id is left out); the charges do not count towards this key's monthly spending limit, which is why it needs the purchase level. A top-up the card refuses, or one charged to a card that was since removed, fails like one the balance cannot cover. Send every field each time; one left out is cleared, promo_code included, except paused and payment, which the rule keeps. 409 auto_top_up_disabled while auto top-ups are switched off for the service (limits.enabled), auto_top_up_blocked when support turned the rule off, product_withdrawn once the plan's product is no longer sold.
Requires the api.residential.purchase scope.
plan REQUIREDstringthreshold_gb REQUIREDintegeramount_gb REQUIREDintegermax_per_dayintegermax_per_month_gbintegerpromo_codestringpausedboolean | nullpaymentobject | nullcurl https://api.datafuel.ai/api/v1/residential/plans/{plan}/auto-top-up \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer df_live_your_key_here' \ --data '{ "threshold_gb": 1, "amount_gb": 1, "max_per_day": 0, "max_per_month_gb": 0, "promo_code": "string", "paused": false, "payment": { "method": "balance", "card_id": "string" } }'
OK.
{ "rule": { "status": "armed", "reason": "string", "threshold_gb": 0, "amount_gb": 0, "max_per_day": 0, "max_per_month_gb": 0, "promo_code": "string", "payment": { "method": "balance", "card_id": "string" }, "last_fired_at": "2026-01-01T00:00:00Z", "created_at": "2026-01-01T00:00:00Z", "updated_at": "2026-01-01T00:00:00Z" }, "limits": { "enabled": false, "min_threshold_gb": 0, "min_amount_gb": 0, "max_amount_gb": 0, "max_per_day": 0, "max_per_month_gb": 0 } }
The request is malformed: message maps each invalid field to its problem, or is a sentence when the body cannot be read at all.
{ "error": "string", "message": "string", "meta": {} }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
The request conflicts with the resource's current state; error names why.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
The upstream provider refused the request; nothing was changed.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/plans/{plan}/auto-top-up Remove the auto top-up
DELETE /api/v1/residential/plans/{plan}/auto-top-upStops topping the plan up automatically. 409 auto_top_up_blocked when support turned the rule off: it can only be removed by support.
Requires the api.residential.manage scope.
plan REQUIREDstringcurl https://api.datafuel.ai/api/v1/residential/plans/{plan}/auto-top-up \ --request DELETE \ --header 'Authorization: Bearer df_live_your_key_here'
Done.
(empty body)The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
The request conflicts with the resource's current state; error names why.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/quote Price traffic
POST /api/v1/residential/quoteWhat POST /orders with the same body would charge, including discounts, tax and the payment method's fee, or why it cannot be ordered. Nothing is reserved.
Requires the api.residential.read scope.
product_id REQUIREDstringtraffic_gb REQUIREDintegerpaymentobject | nullpromo_codestringcurl https://api.datafuel.ai/api/v1/residential/quote \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer df_live_your_key_here' \ --data '{ "product_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "traffic_gb": 1, "payment": { "method": "balance", "card_id": "string" }, "promo_code": "string" }'
OK.
{ "purchasable": false, "issues": [ { "code": "string", "message": "string", "field": "string", "limit": 0 } ], "net": 0, "discount": 0, "tax": 0, "fee": 0, "total": 0, "currency": "usd" }
The request is malformed: message maps each invalid field to its problem, or is a sentence when the body cannot be read at all.
{ "error": "string", "message": "string", "meta": {} }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
The request is well formed but cannot be carried out; error names why.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
Something upstream did not answer in time and the change may still happen; read the resource (or the order) again before retrying.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/residential/orders Buy traffic
POST /api/v1/residential/ordersBuys traffic_gb of traffic on a product, charged to the balance or a saved card straight away without asking the customer. You hold at most one plan per product and its id is the product's id: the traffic is added to that plan, or the plan is created by the first order. 201 answers the plan; 202 means it is paid and still being delivered, or the bank asked for 3-D Secure (order.action_url).
Requires the api.residential.purchase scope. Send a unique Idempotency-Key per order; repeating it with the same body answers the first order instead of charging again.
Idempotency-Key REQUIREDstringproduct_id REQUIREDstringtraffic_gb REQUIREDintegerpayment REQUIREDobjectpromo_codestringcurl https://api.datafuel.ai/api/v1/residential/orders \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer df_live_your_key_here' \ --header 'Idempotency-Key: your-idempotency-key' \ --data '{ "product_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "traffic_gb": 1, "payment": { "method": "balance", "card_id": "string" }, "promo_code": "string" }'
A repeated Idempotency-Key: the order it placed first, with replayed: true.
{ "order": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "pending", "service": "string", "product": "string", "action": "new", "total": 0, "currency": "usd", "payment": { "method": "balance", "card_id": "string" }, "plan_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "action_url": "https://example.com", "error": { "code": "insufficient_balance", "message": "string" }, "replayed": false, "created_at": "2026-01-01T00:00:00Z", "paid_at": "2026-01-01T00:00:00Z" }, "plan": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "status": "provisioning", "traffic": { "total_gb": 0, "used_gb": 0, "remaining_gb": 0, "updated_at": "2026-01-01T00:00:00Z" }, "subscription_id": "string", "expires_at": "2026-01-01T00:00:00Z", "created_at": "2026-01-01T00:00:00Z", "countries": [ { "country": "US", "continent": "NA" } ], "targeting": { "region": false, "city": false, "asn": false, "sticky": false, "session_minutes": false, "os": [ "string" ], "os_multiple": false } } }
Paid and delivered.
{ "order": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "pending", "service": "string", "product": "string", "action": "new", "total": 0, "currency": "usd", "payment": { "method": "balance", "card_id": "string" }, "plan_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "action_url": "https://example.com", "error": { "code": "insufficient_balance", "message": "string" }, "replayed": false, "created_at": "2026-01-01T00:00:00Z", "paid_at": "2026-01-01T00:00:00Z" }, "plan": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "status": "provisioning", "traffic": { "total_gb": 0, "used_gb": 0, "remaining_gb": 0, "updated_at": "2026-01-01T00:00:00Z" }, "subscription_id": "string", "expires_at": "2026-01-01T00:00:00Z", "created_at": "2026-01-01T00:00:00Z", "countries": [ { "country": "US", "continent": "NA" } ], "targeting": { "region": false, "city": false, "asn": false, "sticky": false, "session_minutes": false, "os": [ "string" ], "os_multiple": false } } }
Paid and still being delivered (poll GET /api/v1/orders/{id}), or waiting for 3-D Secure at order.action_url.
{ "order": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "pending", "service": "string", "product": "string", "action": "new", "total": 0, "currency": "usd", "payment": { "method": "balance", "card_id": "string" }, "plan_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "action_url": "https://example.com", "error": { "code": "insufficient_balance", "message": "string" }, "replayed": false, "created_at": "2026-01-01T00:00:00Z", "paid_at": "2026-01-01T00:00:00Z" }, "plan": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "status": "provisioning", "traffic": { "total_gb": 0, "used_gb": 0, "remaining_gb": 0, "updated_at": "2026-01-01T00:00:00Z" }, "subscription_id": "string", "expires_at": "2026-01-01T00:00:00Z", "created_at": "2026-01-01T00:00:00Z", "countries": [ { "country": "US", "continent": "NA" } ], "targeting": { "region": false, "city": false, "asn": false, "sticky": false, "session_minutes": false, "os": [ "string" ], "os_multiple": false } } }
The request is malformed: message maps each invalid field to its problem, or is a sentence when the body cannot be read at all.
{ "error": "string", "message": "string", "meta": {} }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The payment was declined; error names why and meta.order is the failed order.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required, is used from an IP it does not allow, the order would pass the key's monthly spending limit (spend_limit_exceeded), or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such product or plan, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
in_progress: another order of the account is still being placed, retry shortly with the same key; idempotency_conflict: the Idempotency-Key was already used for a different order; duplicate_request: the key was already used and its order is still being recorded, look it up instead of sending it again.
{ "error": "string", "message": "string", "meta": {} }
The order cannot be placed; error names why: not_purchasable (with meta.issues when the order itself is at fault, e.g. out of stock), promo_code_invalid, amount_too_small or payment_rejected.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
Temporarily unavailable; nothing was changed, try again shortly.
{ "error": "string", "message": "string", "meta": {} }
Something upstream did not answer in time and the change may still happen; read the resource (or the order) again before retrying.
{ "error": "string", "message": "string", "meta": {} }