Protected
Protected routes for inter-service communication (requires PRIVATE_ROUTE_SECRET)
Reserve user balance for data upload
PROTECTED ROUTE - Requires PRIVATE_ROUTE_SECRET authentication header.
Reserves Winston credits from a user's balance for an upcoming data upload. Called by the upload service before accepting a data item upload.
The reservation is temporary and will be:
- Finalized (deducted) when upload completes successfully
- Refunded if upload fails or is canceled
Authorization: x-auth-token header must match PRIVATE_ROUTE_SECRET environment variable.
Path Parameters
Currently unused (kept for backward compatibility)
User's wallet address
Query Parameters
Number of bytes being uploaded
Data item ID for the upload
Comma-separated list of addresses paying (delegated payment)
Payment directive (e.g., x402 payment ID)
The client's subnet bucket, forwarded by the upload service so the per-IP free-tier cap can be evaluated when committing a free grant.
Header Parameters
Must match PRIVATE_ROUTE_SECRET
Response Body
curl -X GET "https://turbo.ardrive.io/v1/reserve-balance/arweave/string?byteCount=0&dataItemId=string&paidBy=string&paymentDirective=string&ipBucket=string" \ -H "x-auth-token: string""1000000""Invalid parameters""Invalid authorization token""Insufficient balance""User not found""Error reserving balance"Refund previously reserved balance
PROTECTED ROUTE - Requires PRIVATE_ROUTE_SECRET authentication header.
Refunds Winston credits that were previously reserved for a data upload. Called by the upload service when an upload fails or is canceled.
Authorization: x-auth-token header must match PRIVATE_ROUTE_SECRET environment variable.
Path Parameters
Currently unused (kept for backward compatibility)
User's wallet address
Query Parameters
Winston amount to refund
Data item ID for the failed/canceled upload
Header Parameters
Must match PRIVATE_ROUTE_SECRET
Response Body
curl -X GET "https://turbo.ardrive.io/v1/refund-balance/arweave/string?winstonCredits=string&dataItemId=string" \ -H "x-auth-token: string""Balance refunded""Invalid parameters""Invalid authorization token""User not found""Error refunding balance"Check if user has sufficient balance
PROTECTED ROUTE - Requires PRIVATE_ROUTE_SECRET authentication header.
Checks whether a user has sufficient Winston credits for a given byte count upload. Called by the upload service before accepting a data upload.
Authorization: x-auth-token header must match PRIVATE_ROUTE_SECRET environment variable.
Path Parameters
Currently unused (kept for backward compatibility)
User's wallet address
Query Parameters
Number of bytes to check
Comma-separated list of addresses paying (delegated payment)
The client's subnet bucket, forwarded by the upload service so the per-IP free-tier cap can be evaluated.
Header Parameters
Must match PRIVATE_ROUTE_SECRET
Response Body
curl -X GET "https://turbo.ardrive.io/v1/check-balance/arweave/string?byteCount=0&paidBy=string&ipBucket=string" \ -H "x-auth-token: string"{
"userHasSufficientBalance": true,
"bytesCostInWinc": "1000000",
"userBalanceInWinc": "5000000",
"freeGrant": true,
"tier": "lifetime",
"adjustments": [
{
"name": "Adjustment",
"description": "Some great subsidy",
"operatorMagnitude": "0.6",
"operator": "multiply",
"adjustmentAmount": "-12300",
"promoCode": "SOME-GREAT-CODE"
}
]
}{
"userHasSufficientBalance": true,
"bytesCostInWinc": "1000000",
"userBalanceInWinc": "5000000",
"freeGrant": true,
"tier": "lifetime",
"adjustments": [
{
"name": "Adjustment",
"description": "Some great subsidy",
"operatorMagnitude": "0.6",
"operator": "multiply",
"adjustmentAmount": "-12300",
"promoCode": "SOME-GREAT-CODE"
}
]
}"Invalid authorization token"{
"userHasSufficientBalance": true,
"bytesCostInWinc": "1000000",
"userBalanceInWinc": "5000000",
"freeGrant": true,
"tier": "lifetime",
"adjustments": [
{
"name": "Adjustment",
"description": "Some great subsidy",
"operatorMagnitude": "0.6",
"operator": "multiply",
"adjustmentAmount": "-12300",
"promoCode": "SOME-GREAT-CODE"
}
]
}{
"userHasSufficientBalance": true,
"bytesCostInWinc": "1000000",
"userBalanceInWinc": "5000000",
"freeGrant": true,
"tier": "lifetime",
"adjustments": [
{
"name": "Adjustment",
"description": "Some great subsidy",
"operatorMagnitude": "0.6",
"operator": "multiply",
"adjustmentAmount": "-12300",
"promoCode": "SOME-GREAT-CODE"
}
]
}"Error checking balance"Create delegated payment approval
PROTECTED ROUTE - Requires PRIVATE_ROUTE_SECRET authentication header.
Creates an approval allowing another address to spend credits from the paying address's balance. This enables delegated payment scenarios where one user pays for another user's uploads.
Authorization: x-auth-token header must match PRIVATE_ROUTE_SECRET environment variable.
Query Parameters
Address that will pay
Address that is approved to spend
Winston amount approved
Data item ID for the approval
When the approval expires
date-timeHeader Parameters
Must match PRIVATE_ROUTE_SECRET
Response Body
curl -X GET "https://turbo.ardrive.io/v1/account/approvals/create?payingAddress=string&approvedAddress=string&approvedWincAmount=string&approvalDataItemId=string&expirationDate=2019-08-24T14%3A15%3A22Z" \ -H "x-auth-token: string"{}"Invalid parameters""Invalid authorization token""Insufficient balance""Error creating approval"Revoke delegated payment approvals
PROTECTED ROUTE - Requires PRIVATE_ROUTE_SECRET authentication header.
Revokes one or more delegated payment approvals, preventing the approved address from spending any more credits from the paying address.
Authorization: x-auth-token header must match PRIVATE_ROUTE_SECRET environment variable.
Query Parameters
Address that pays
Address whose approval is being revoked
Data item ID for the revocation
Header Parameters
Must match PRIVATE_ROUTE_SECRET
Response Body
curl -X GET "https://turbo.ardrive.io/v1/account/approvals/revoke?payingAddress=string&approvedAddress=string&revokeDataItemId=string" \ -H "x-auth-token: string"[
{}
]"Invalid parameters""Invalid authorization token""Error revoking approvals"How is this guide?