POSToken

About
API Reference

POST Token API v1.2

Complete API documentation for integrating with POST Token. Includes Transaction-Linked Conversion, Vesting API, and comprehensive error codes.

Base URL: https://api.post.network
Version 1.2.0

Overview

Base configuration and request format

Base URLs

Productionhttps://api.post.network
Staginghttps://api.staging.post.network
Developmenthttp://localhost:8787

Request Headers

HTTP

Content-Type: application/json
Accept: application/json
Accept-Language: en

Response Format

Success Response

JSON

{
"success": true,
"data": { ... },
"meta": {
"total": 100,
"page": 1,
"pageSize": 10
}
}

Error Response

JSON

{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human readable message",
"details": { ... }
}
}

Authentication

Turnstile and Operator token authentication

Turnstile (Public)

For public endpoints like contact forms. Include the Turnstile token in the request body.

JSON

{
"turnstileToken": "0.xxxxx..."
}

Operator Token

For operator endpoints (vesting, transactions). Include in headers.

HTTP

Authorization: Bearer <operator_token>
X-Operator-Code: <country_code>

Token Generation

HTTP

1POST /api/auth/token
2Content-Type: application/json
3
4{
5 "operator_code": "USPS",
6 "api_key": "sk_live_xxxxx",
7 "grant_type": "client_credentials"
8}
9
10// Response
11{
12 "access_token": "eyJhbGciOiJIUzI1NiIs...",
13 "token_type": "Bearer",
14 "expires_in": 3600,
15 "scope": "gateway:swap vesting:read transactions:write"
16}

Rate Limiting

API and vesting rate limits

API Rate Limits

EndpointLimitWindow
GET /*10001 hour
POST /api/gateway/swap1001 hour
POST /api/vesting/sell101 hour
POST /api/contact/*51 hour

Vesting Rate Limits

Limit TypePer CountryNetwork
Daily10,000 POST5,000,000 POST
Weekly50,000 POST25,000,000 POST
Monthly200,000 POST100,000,000 POST
Annual2,500,000 POST500,000,000 POST

Gateway API v1.2

POST ↔ PSDR token conversion

GET

/api/gateway/rate

Get Exchange Rate

Get the current POST/PSDR exchange rate and SDR pricing.

No parameters required for this endpoint.

POST

/api/gateway/swap

Swap POST to PSDR

Convert POST tokens to PSDR. Requires a valid transaction_id from the Transaction API.

Auth:

Operator Token

Parameters

NameTypeRequiredDescription
postAmount

number

Required

Amount of POST to swap

transactionId

string

Required

Transaction ID from /api/transactions/create (e.g., TRF-2026-01-14-ABC123)

transactionType

string

Required

Type of transaction

minPsdrReceive

number

Optional

Minimum PSDR to receive (slippage protection)

POST

/api/gateway/swap-out

Swap PSDR to POST

Convert PSDR back to POST. No transaction_id required (unrestricted cash-out flow).

Auth:

Operator Token

Parameters

NameTypeRequiredDescription
psdrAmount

number

Required

Amount of PSDR to swap

minPostReceive

number

Optional

Minimum POST to receive

Vesting API

Country airdrop allocations and controlled release

GET

/api/vesting/country/{countryCode}

Get Country Allocation

Query vesting status for a specific country including allocation details and rate limits.

Auth:

Operator Token

Parameters

NameTypeRequiredDescription
countryCode

string

Required

ISO 3166-1 alpha-2 country code (e.g., TV)

POST

/api/vesting/sell

Execute Airdrop Sale

Sell POST from country airdrop allocation. Subject to rate limits.

Auth:

Operator Token

Rate Limit:

10 requests/hour

Parameters

NameTypeRequiredDescription
countryCode

string

Required

Country code

amount

number

Required

Amount of POST to sell

Transaction API

Create and manage transactions for Transaction-Linked Conversion

Transaction Lifecycle

TEXT

Transaction Lifecycle:
CREATE FUND COMPLETE
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ PENDING │───▶│ FUNDED │───▶│ COMPLETED │
│ FUNDING │ │ │ │ │
└─────────────┘ └─────────────┘ └─────────────┘
│ (24h timeout)
┌─────────────┐
│ EXPIRED │
└─────────────┘
POST

/api/transactions/create

Create Transaction

Create a new transaction. Required before POST → PSDR conversion.

Auth:

Operator Token

Parameters

NameTypeRequiredDescription
transactionType

string

Required

Type: MoneyTransfer, PostalShipment, MerchantPayment, etc.

amount

number

Required

Transaction amount

currency

string

Required

Currency code (USD, EUR, etc.)

GET

/api/transactions/{transactionId}

Get Transaction

Query transaction status and details.

Auth:

Operator Token

Parameters

NameTypeRequiredDescription
transactionId

string

Required

Transaction ID

Error Codes

Complete error code reference

CodeStatusMessageResolution
E001
400
Invalid transaction ID

Provide valid transaction_id

E002
400
Transaction not pending

Transaction must be PENDING_FUNDING

E003
400
Transaction type mismatch

Type must match request

E006
400
Slippage exceeded

Minimum receive not met

E007
400
Transaction expired

Create new transaction

E008
400
Insufficient balance

Add more POST tokens

E009
500
Pool imbalance

Try again later