PalestineX API v1 Back to home
API v1 · live documentation

Build with PalestineX

Buy Gmail, Hotmail, Outlook and Edu mailboxes in bulk, then read verification codes from them — through one small, well-documented REST API.

One endpoint on this page will break the rest if you try it live. POST /api/v1/user/api-key/rotate revokes the key that calls it, immediately and permanently. Every other example here is safe to copy and run.

# any order can be fetched as a real file
curl "https://palestinex.store/api/v1/order/<code>/download?format=xlsx" \
  -H "Authorization: Bearer $KEY" -o "order.xlsx"
01
Introduction

Overview

A small HTTPS REST API. Query strings on GET, JSON on the way back. Every response uses the same envelope, so your client only has to learn one shape.

https://palestinex.store /api/v1
A success response
200 OK Success
{
    "success": true,
    "code": 200,
    "data": {
        "balance": 5000,
        "currency": "BDT"
    },
    "message": "Request completed successfully.",
    "meta": {
        "request_id": "req_9f2c41ab77d0e5b1",
        "timestamp": "2026-09-26T09:00:00+06:00"
    }
}
An error response
409 Conflict Out of stock
{
    "success": false,
    "code": 409,
    "data": null,
    "message": "Insufficient stock available. Requested: 5, Available: 2",
    "error": {
        "code": "OUT_OF_STOCK",
        "message": "Insufficient stock available. Requested: 5, Available: 2",
        "details": null
    },
    "meta": {
        "request_id": "req_1b7d90ce44aa2f10",
        "timestamp": "2026-09-26T09:00:01+06:00"
    }
}
02
Get going

Quick start

Three requests, from zero to a verification code.

All three steps in cURL
cURL
curl -X GET "https://palestinex.store/api/v1/balance" \
  -H "Authorization: Bearer {KEY}" \
  -H "Accept: application/json"
curl -X POST "https://palestinex.store/api/v1/order/buy" \
  -H "Authorization: Bearer {KEY}" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-2026-09-26-0001" \
  -d '{"product_key":"hotmails_graph_oauth2","quantity":1}'
curl -X POST "https://palestinex.store/api/v1/code/fetch" \
  -H "Authorization: Bearer {KEY}" \
  -H "Content-Type: application/json" \
  -d '{"email":"user@outlook.com","type":"facebook"}'

Client libraries

One file per language. Both cover every endpoint below.

Python palestinex.py

Standard library only. No pip install, and it runs on any Python 3.8 or newer.

from palestinex import PalestineX

api = PalestineX(api_key="your-key-here")
print(api.balance())
print(api.products())

# Or keep the key out of your source entirely:
#   export PALESTINEX_API_KEY=your-key-here
api = PalestineX()
Download palestinex.py
PHP palestinex.php

cURL only — which every host already has. Drop it next to your code and require_once it.

<?php
require_once "palestinex.php";

$api = new PalestineX("your-key-here");
print_r($api->balance());
print_r($api->products());

// Or keep the key out of your source entirely:
//   $api = new PalestineX();   // reads PALESTINEX_API_KEY
Download palestinex.php
What the libraries do with errors

Every method returns the decoded JSON body, or raises. Authentication problems (a missing, wrong or rotated key) raise AuthenticationError in Python and PalestineXAuthError in PHP; rate limiting raises RateLimited / PalestineXRateLimited with retry_after telling you how many seconds to wait; everything else raises ApiError / PalestineXApiError. Each carries the API's own error code and HTTP status, so you do not have to read the message to decide what to do.

03
GET Products Public

List the products you can buy

Every active product with its live BDT price, its current stock count and the quantity range it accepts. This is the one call to make first: the `key` it returns is what every purchase endpoint wants. Needs no API key, so it can be called before you have one.

https://palestinex.store /api/v1/products
Request
cURL
curl -X GET "https://palestinex.store/api/v1/products"

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/products');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

req = urllib.request.Request(
    "https://palestinex.store/api/v1/products",
    method="GET",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/products", {
  method: "GET",
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (200)
200 OK Request completed successfully.
{
    "success": true,
    "code": 200,
    "data": {
        "products": [
            {
                "id": 1,
                "key": "gmail",
                "title": "Gmail (Webmail / Live Inbox URL)",
                "category": "gmail",
                "category_name": "Gmail",
                "description": "High quality Google webmail account with a direct live inbox URL.",
                "price_bdt": 7,
                "currency": "BDT",
                "available_stock": 20,
                "in_stock": true,
                "min_quantity": 1,
                "max_quantity": 5000,
                "active": true
            }
        ],
        "count": 1,
        "category": "gmail"
    },
    "message": "Request completed successfully."
}
Try it with your own key

Sends one GET request with your key and shows the response. Nothing is changed and nothing is charged.

04
GET Products Public

Is the service up?

A health probe for uptime monitoring. Returns 200 while everything the API needs is working, and 503 when it is not - so a monitor can read the status code instead of parsing the body. Exposes no credentials, paths or host detail.

https://palestinex.store /api/v1/status
Request
cURL
curl -X GET "https://palestinex.store/api/v1/status"

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/status');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

req = urllib.request.Request(
    "https://palestinex.store/api/v1/status",
    method="GET",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/status", {
  method: "GET",
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (200)
200 OK All PalestineX API services are operational.
{
    "success": true,
    "code": 200,
    "data": {
        "api": "online",
        "version": "v1",
        "prefix": "/api/v1",
        "database": "connected",
        "services": {
            "products": "available",
            "purchases": "available",
            "code_fetch": "available"
        },
        "active_products": 8,
        "timestamp": "2026-09-26T09:00:00+06:00"
    },
    "message": "All PalestineX API services are operational."
}
Try it with your own key

Sends one GET request with your key and shows the response. Nothing is changed and nothing is charged.

05
GET Account API key

Check your balance

The BDT balance you can spend, and the state of the account the key belongs to. Read-only and safe to poll. Also answers at /api/v1/user/balance.

https://palestinex.store /api/v1/balance
Request
cURL
curl -X GET "https://palestinex.store/api/v1/balance"
  -H "Authorization: Bearer YOUR_API_KEY" \

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/balance');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer YOUR_API_KEY',
    ],
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

req = urllib.request.Request(
    "https://palestinex.store/api/v1/balance",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
    },
    method="GET",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/balance", {
  method: "GET",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
  },
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (200)
200 OK Request completed successfully.
{
    "success": true,
    "code": 200,
    "data": {
        "user_id": 11,
        "username": "apitester",
        "fullname": "API Tester",
        "email": "apitest@example.com",
        "balance": 5000,
        "currency": "BDT",
        "role": "user",
        "status": "active"
    },
    "message": "Request completed successfully."
}
Try it with your own key

Sends one GET request with your key and shows the response. Nothing is changed and nothing is charged.

Used for this request only. It is not stored, not logged, and not saved in your browser. Get one from Profile → Developer REST API.

06
POST Account API key

Rotate your API key

Issues a new key and invalidates the current one immediately, so deploy the new key before the old one stops working. This is the only response in the whole API that contains the plaintext secret. The full 64-character value is returned, unmasked - store it before you close the response, because it cannot be read again.

https://palestinex.store /api/v1/user/api-key/rotate
Request
cURL
curl -X POST "https://palestinex.store/api/v1/user/api-key/rotate"
  -H "Authorization: Bearer YOUR_API_KEY" \

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/user/api-key/rotate');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer YOUR_API_KEY',
    ],
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

req = urllib.request.Request(
    "https://palestinex.store/api/v1/user/api-key/rotate",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
    },
    method="POST",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/user/api-key/rotate", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
  },
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (200)
200 OK API key rotated successfully.
{
    "success": true,
    "code": 200,
    "data": {
        "api_key": "1689fd55c1a34e2b9d7f0a6b18e4c5d92a3b7f10c8e6d4a2b0c9e7f5d3b1a9e7c5d3",
        "last4": "7c5d",
        "previous_key_revoked": true,
        "revoked_key_count": 3,
        "note": "Store this key now. It is not shown again and cannot be recovered - only its last 4 characters are kept. The previous key stopped working the moment this response was produced."
    },
    "message": "API key rotated successfully."
}
Not testable from here

Rotating a key revokes the key you just used. A test run would break the integration you are writing, so this endpoint has no Test button.

07
POST Orders API key

Buy mail

Reserves stock, debits the balance and writes the order in one row-locked transaction, so two concurrent calls can never oversell or charge twice. The reply carries the delivered credentials in `order.items[]`, already rendered into your chosen file format. Returns 201. Also answers at POST /api/v1/order.

https://palestinex.store /api/v1/order/buy
Request
cURL
curl -X POST "https://palestinex.store/api/v1/order/buy"
  -H "Idempotency-Key: order-2026-09-26-0001" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_key":"hotmails_graph_oauth2","quantity":1}'

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/order/buy');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_POSTFIELDS     => json_encode(array (
      'product_key' => 'hotmails_graph_oauth2',
      'quantity' => 1,
    )),
    CURLOPT_HTTPHEADER     => [
        'Idempotency-Key: order-2026-09-26-0001',
        'Authorization: Bearer YOUR_API_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

payload = json.dumps({"product_key":"hotmails_graph_oauth2","quantity":1}).encode()

req = urllib.request.Request(
    "https://palestinex.store/api/v1/order/buy",
    data=payload,
    headers={
        "Idempotency-Key": "order-2026-09-26-0001",
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    method="POST",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/order/buy", {
  method: "POST",
  headers: {
    "Idempotency-Key": "order-2026-09-26-0001",
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"product_key":"hotmails_graph_oauth2","quantity":1}),
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (201)
201 OK Order ORD-2DA7DC421657 completed successfully.
{
    "success": true,
    "code": 201,
    "data": {
        "order": {
            "order_code": "ORD-2DA7DC421657",
            "product_id": 4,
            "product_key": "hotmails_graph_oauth2",
            "product_title": "Hotmail (Graph API / OAuth2)",
            "quantity": 1,
            "unit_price": 1,
            "total_cost": 1,
            "currency": "BDT",
            "status": "completed",
            "format": "txt",
            "items": [
                {
                    "email": "apitest123+1@hotmail.com",
                    "details_line": "apitest123+1@hotmail.com|ApiTest!1|rt-…|cid-…"
                }
            ],
            "delivery": {
                "format": "txt",
                "filename": "PalestineX_ORD-2DA7DC421657.txt",
                "mime_type": "text/plain; charset=utf-8",
                "download_url": "https://palestinex.store/api/v1/order/ORD-2DA7DC421657/download?format=txt",
                "line_count": 1,
                "data": "apitest123+1@hotmail.com|ApiTest!1|rt-…|cid-…\n"
            }
        }
    },
    "message": "Order ORD-2DA7DC421657 completed successfully."
}
Try it with your own key

This is a POST request and it changes something: "Buy mail". It runs against your own account, and it can spend balance or consume stock. Tick the box to run it for real.

Used for this request only. It is not stored, not logged, and not saved in your browser. Get one from Profile → Developer REST API.

08
POST Orders API key

Buy mail in bulk

Several products in one call, up to 25 lines, inside a single transaction. All or nothing: if any line fails the whole batch is rolled back and nothing is charged, so a caller never ends up with half an order and no record of which half. Each line may name its own `format`. Returns 201.

https://palestinex.store /api/v1/order/bulk
Request
cURL
curl -X POST "https://palestinex.store/api/v1/order/bulk"
  -H "Idempotency-Key: batch-2026-09-26-0001" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"orders":[{"product_key":"outlooks_imap","quantity":2,"format":"csv"},{"product_key":"gmail","quantity":1}]}'

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/order/bulk');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_POSTFIELDS     => json_encode(array (
      'orders' => 
      array (
        0 => 
        array (
          'product_key' => 'outlooks_imap',
          'quantity' => 2,
          'format' => 'csv',
        ),
        1 => 
        array (
          'product_key' => 'gmail',
          'quantity' => 1,
        ),
      ),
    )),
    CURLOPT_HTTPHEADER     => [
        'Idempotency-Key: batch-2026-09-26-0001',
        'Authorization: Bearer YOUR_API_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

payload = json.dumps({"orders":[{"product_key":"outlooks_imap","quantity":2,"format":"csv"},{"product_key":"gmail","quantity":1}]}).encode()

req = urllib.request.Request(
    "https://palestinex.store/api/v1/order/bulk",
    data=payload,
    headers={
        "Idempotency-Key": "batch-2026-09-26-0001",
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    method="POST",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/order/bulk", {
  method: "POST",
  headers: {
    "Idempotency-Key": "batch-2026-09-26-0001",
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"orders":[{"product_key":"outlooks_imap","quantity":2,"format":"csv"},{"product_key":"gmail","quantity":1}]}),
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (201)
201 OK Bulk purchase completed successfully.
{
    "success": true,
    "code": 201,
    "data": {
        "orders": [
            {
                "order_code": "ORD-1C0669A818BF",
                "product_key": "outlooks_imap",
                "quantity": 2,
                "unit_price": 1,
                "total_cost": 2,
                "format": "csv",
                "items": [
                    {
                        "email": "apitest+1@outlook.com",
                        "details_line": "…"
                    }
                ],
                "delivery": {
                    "format": "csv",
                    "line_count": 2,
                    "download_url": "…"
                }
            }
        ],
        "order_count": 2,
        "total_cost": 9,
        "currency": "BDT"
    },
    "message": "Bulk purchase completed successfully."
}
Try it with your own key

This is a POST request and it changes something: "Buy mail in bulk". It runs against your own account, and it can spend balance or consume stock. Tick the box to run it for real.

Used for this request only. It is not stored, not logged, and not saved in your browser. Get one from Profile → Developer REST API.

09
GET Orders API key

List your orders

Your own orders, newest first, with the order code and a download link for each. This is where the `order_code` for the download endpoint below comes from. Only your orders are ever returned. Also answers at /api/v1/orders/recent.

https://palestinex.store /api/v1/order/history
Request
cURL
curl -X GET "https://palestinex.store/api/v1/order/history"
  -H "Authorization: Bearer YOUR_API_KEY" \

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/order/history');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer YOUR_API_KEY',
    ],
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

req = urllib.request.Request(
    "https://palestinex.store/api/v1/order/history",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
    },
    method="GET",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/order/history", {
  method: "GET",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
  },
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (200)
200 OK Request completed successfully.
{
    "success": true,
    "code": 200,
    "data": {
        "orders": [
            {
                "order_code": "ORD-2DA7DC421657",
                "product_id": 4,
                "quantity": 1,
                "unit_price": 1,
                "total_cost": 1,
                "status": "completed",
                "created_at": "2026-09-26 09:05:53",
                "format": "txt",
                "download_url": "https://palestinex.store/api/v1/order/ORD-2DA7DC421657/download?format=txt"
            }
        ],
        "pagination": {
            "current_page": 1,
            "per_page": 20,
            "total_records": 1,
            "total_pages": 1
        }
    },
    "message": "Request completed successfully."
}
Try it with your own key

Sends one GET request with your key and shows the response. Nothing is changed and nothing is charged.

Used for this request only. It is not stored, not logged, and not saved in your browser. Get one from Profile → Developer REST API.

10
GET Orders API key

Download a delivered order

The accounts from one of your orders as a file, one credential per line, in the format the order was bought in. Content-Disposition is set, so a browser saves it. This is the only endpoint that does not answer with the JSON envelope - every other route returns JSON, and a client that assumes JSON everywhere will fail to parse this one. Scoped to you: another account's order code returns 404, never its contents.

https://palestinex.store /api/v1/order/{code}/download
Request
cURL
curl -X GET "https://palestinex.store/api/v1/order/{code}/download"
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code":"ORD-2DA7DC421657"}'

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/order/{code}/download');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS     => json_encode(array (
      'code' => 'ORD-2DA7DC421657',
    )),
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer YOUR_API_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

payload = json.dumps({"code":"ORD-2DA7DC421657"}).encode()

req = urllib.request.Request(
    "https://palestinex.store/api/v1/order/{code}/download",
    data=payload,
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    method="GET",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/order/{code}/download", {
  method: "GET",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"code":"ORD-2DA7DC421657"}),
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (a file, not JSON)
200 OK text/plain — save the body, do not parse it
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename="PalestineX_ORD-2DA7DC421657.txt"

apitest123+1@hotmail.com|ApiTest!1|rt-eyJ...|cid-abc123
apitest123+2@hotmail.com|ApiTest!2|rt-eyJ...|cid-def456
Try it with your own key

Sends one GET request with your key and shows the response. Nothing is changed and nothing is charged.

Used for this request only. It is not stored, not logged, and not saved in your browser. Get one from Profile → Developer REST API.

11
POST Code fetch API key

Fetch the latest code for a mailbox

Reads a mailbox you have already bought and returns the newest verification code in it. You do not need to send credentials: the address alone is enough, because the refresh token or inbox URL is looked up from your own purchase history. Gmail pools are read through the stored live inbox URL; Hotmail, Outlook and Student pools are read over OAuth2. The same call works as a plain GET, so it can be typed into a browser or a webhook URL: GET /api/v1/code?email=you@outlook.com&type=facebook

https://palestinex.store /api/v1/code/fetch
Request
cURL
curl -X POST "https://palestinex.store/api/v1/code/fetch"
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"user@outlook.com","type":"facebook"}'

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/code/fetch');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_POSTFIELDS     => json_encode(array (
      'email' => 'user@outlook.com',
      'type' => 'facebook',
    )),
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer YOUR_API_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

payload = json.dumps({"email":"user@outlook.com","type":"facebook"}).encode()

req = urllib.request.Request(
    "https://palestinex.store/api/v1/code/fetch",
    data=payload,
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    method="POST",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/code/fetch", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"email":"user@outlook.com","type":"facebook"}),
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (200)
200 OK Request completed successfully.
{
    "success": true,
    "code": 200,
    "data": {
        "email": "user@outlook.com",
        "provider": "outlook",
        "type": "facebook",
        "code": "849210",
        "message": "Code retrieved from the mailbox.",
        "fetched_at": "2026-09-26T09:07:00+06:00"
    },
    "message": "Request completed successfully."
}
Try it with your own key

This is a POST request and it changes something: "Fetch the latest code for a mailbox". It runs against your own account, and it can spend balance or consume stock. Tick the box to run it for real.

Used for this request only. It is not stored, not logged, and not saved in your browser. Get one from Profile → Developer REST API.

12
GET Proxy Public

Proxy prices and limits

The price table, the smallest and largest amount you can buy, and whether the service is currently on. Needs no API key, so it is the cheapest way to find out what a proxy costs before you have one. Every figure is read from the same table the purchase is priced from, so the documented price is the charged price.

https://palestinex.store /api/v1/proxy/plans
Request
cURL
curl -X GET "https://palestinex.store/api/v1/proxy/plans"

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/proxy/plans');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

req = urllib.request.Request(
    "https://palestinex.store/api/v1/proxy/plans",
    method="GET",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/proxy/plans", {
  method: "GET",
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (200)
200 OK
{
    "success": true,
    "code": 200,
    "data": {
        "available": true,
        "currency": "BDT",
        "unit": "gb",
        "country": "Peru",
        "min_gb": 0.1000000000000000055511151231257827021181583404541015625,
        "max_gb": 100,
        "per_gb_rate": 135,
        "from_bdt": 15,
        "plans": [
            {
                "label": "0.1 GB",
                "amount_mb": 100,
                "amount_gb": 0.1000000000000000055511151231257827021181583404541015625,
                "price_bdt": 15,
                "price_per_gb": 150
            },
            {
                "label": "1 GB",
                "amount_mb": 1000,
                "amount_gb": 1,
                "price_bdt": 135,
                "price_per_gb": 135
            },
            {
                "label": "3 GB",
                "amount_mb": 3000,
                "amount_gb": 3,
                "price_bdt": 399,
                "price_per_gb": 133
            }
        ],
        "on_demand": true
    },
    "message": null
}
Try it with your own key

Sends one GET request with your key and shows the response. Nothing is changed and nothing is charged.

13
POST Proxy API key

Buy a residential proxy

Creates the proxy at the supplier and debits your BDT balance. The response carries everything needed to connect - host, port, username, password - plus the price actually charged and your balance afterwards, so a caller can reconcile its own ledger without a second request. The password in the response is the proxy's own password, not your account password. If the supplier call fails after the debit, the money is refunded automatically.

https://palestinex.store /api/v1/proxy
Request
cURL
curl -X POST "https://palestinex.store/api/v1/proxy"
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username":"myproject01","gb":1}'

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/proxy');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_POSTFIELDS     => json_encode(array (
      'username' => 'myproject01',
      'gb' => 1,
    )),
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer YOUR_API_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

payload = json.dumps({"username":"myproject01","gb":1}).encode()

req = urllib.request.Request(
    "https://palestinex.store/api/v1/proxy",
    data=payload,
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    method="POST",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/proxy", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"username":"myproject01","gb":1}),
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (200)
200 OK Proxy created successfully.
{
    "success": true,
    "code": 200,
    "data": {
        "username": "myproject01",
        "proxy_host": "gate.provider.net",
        "proxy_port": 8000,
        "proxy_username": "user-myproject01",
        "proxy_password": "a1b2c3d4e5f6",
        "proxy_type": "http",
        "country": "Peru",
        "amount_gb": 1,
        "price_charged_bdt": 135,
        "balance_after_bdt": 865,
        "provider": {
            "gateway_list": [
                "gate.provider.net:8000"
            ]
        },
        "how_to_use": {
            "curl": "curl -x http://user-myproject01:a1b2c3d4e5f6@gate.provider.net:8000 https://api.ipify.org",
            "note": "The password above is the proxy password, not your account password. Do not log it."
        }
    },
    "message": "Proxy created successfully."
}
Try it with your own key

This is a POST request and it changes something: "Buy a residential proxy". It runs against your own account, and it can spend balance or consume stock. Tick the box to run it for real.

Used for this request only. It is not stored, not logged, and not saved in your browser. Get one from Profile → Developer REST API.

14
GET Proxy API key

Check a proxy you bought

Live usage for one of your own proxies: how much data is left of the cap, how much has been used, and the credentials to connect with. Use it to recover a proxy whose create response was lost instead of buying a second one. Only proxies this account bought are readable. Someone else's username returns 404 - the same answer as a username that does not exist, so this cannot be used to find out which usernames are real.

https://palestinex.store /api/v1/proxy/{username}
Request
cURL
curl -X GET "https://palestinex.store/api/v1/proxy/{username}"
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username":"myproject01"}'

# Response is JSON: { success, code, data, message, meta }
PHP
$ch = curl_init('https://palestinex.store/api/v1/proxy/{username}');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS     => json_encode(array (
      'username' => 'myproject01',
    )),
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer YOUR_API_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_TIMEOUT        => 30,
]);

$raw  = curl_exec($ch);
$json = json_decode((string)$raw, true);
curl_close($ch);

if (empty($json['success'])) {
    // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
    exit('Error: ' . ($json['error']['code'] ?? 'UNKNOWN'));
}

print_r($json['data']);
Python
import json, urllib.request

payload = json.dumps({"username":"myproject01"}).encode()

req = urllib.request.Request(
    "https://palestinex.store/api/v1/proxy/{username}",
    data=payload,
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    method="GET",
)

with urllib.request.urlopen(req, timeout=30) as r:
    data = json.load(r)

if not data["success"]:
    raise RuntimeError(data["error"]["code"] + ": " + data["message"])

print(json.dumps(data["data"], indent=2))
JavaScript
const res = await fetch("https://palestinex.store/api/v1/proxy/{username}", {
  method: "GET",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"username":"myproject01"}),
});

const json = await res.json();

if (!json.success) {
  // error.code is a stable machine-readable string, e.g. OUT_OF_STOCK
  throw new Error(json.error.code + ": " + json.message);
}

console.log(json.data);
Response (200)
200 OK
{
    "success": true,
    "code": 200,
    "data": {
        "username": "myproject01",
        "host": "gate.provider.net",
        "port": "8000",
        "proxy_username": "user-myproject01",
        "proxy_password": "a1b2c3d4e5f6",
        "one_line": "gate.provider.net:8000:user-myproject01:a1b2c3d4e5f6",
        "usage_cap_mb": 1000,
        "usage_cap_gb": 1,
        "country": "Peru"
    },
    "message": null
}
Try it with your own key

Sends one GET request with your key and shows the response. Nothing is changed and nothing is charged.

Used for this request only. It is not stored, not logged, and not saved in your browser. Get one from Profile → Developer REST API.

15
Reference

Errors & status codes

Branch on error.code, not on the message text. Every code below is stable.

Handling errors safely
JavaScript
const res = await fetch('https://palestinex.store/api/v1/order/buy', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
    // Retrying with the same key returns the ORIGINAL order instead of
    // charging you twice.
    'Idempotency-Key': 'order-2026-09-26-0001',
  },
  body: JSON.stringify({ product_key: 'hotmails_graph_oauth2', quantity: 1 }),
});

const json = await res.json();

if (!json.success) {
  switch (json.error.code) {
    case 'OUT_OF_STOCK':
      // Nothing was charged. Back off and try a smaller quantity.
      break;
    case 'INSUFFICIENT_BALANCE':
      // Top up at /deposit, then retry with the same Idempotency-Key.
      break;
    case 'RATE_LIMITED':
      // error.details.window_seconds tells you how long to wait.
      await new Promise(r => setTimeout(r, json.error.details.window_seconds * 1000));
      break;
    default:
      // meta.request_id is safe to quote in a support request.
      console.error(json.error.code, json.message, json.meta.request_id);
  }
}
Key handling
  • Stored hashed

    Only a SHA-256 hash of your key is kept server-side. PalestineX cannot show it back to you.

  • Shown once

    The plaintext appears exactly once, at rotation. After that only the last 4 characters remain.

  • Rotate any time

    POST /api/v1/user/api-key/rotate issues a new key and immediately invalidates the old one.

  • Suspended accounts

    A blocked account gets 403 ACCOUNT_NOT_ACTIVE on every call.