API Reference
This document describes the public and API-key authenticated endpoints of the AzothPay API
Base URL
https://azothpay.com/api/Authentication
Endpoints marked with the ApiKey security scheme require an API key to be included in the request header:
X-API-Key: <your-api-key>API keys can be created via JWT-authenticated endpoints (excluded from this documentation).
Public Endpoints
Get API Information and Status
GET /
Returns general information about the API and status of smart contracts.
Response (200 OK)
{ "Message": "string", "Contracts": { } }
API-Key Authenticated Endpoints
All endpoints below require a valid API key in the X-API-Key header.
Contracts
Get List of Available Contracts
GET /api/v1/contracts
Returns a list of all available smart contracts.
Response (200 OK)
Subscriptions
Create a New Subscription
POST /api/v1/{contract}/subscriptions/
Creates a new subscription/payment stream to an author.
Path Parameters
contract(string, required)
Request Body
Response (200 OK)
List User’s Active Subscriptions
GET /api/v1/{contract}/subscriptions/{address}
Retrieves all active subscriptions for a given user address.
Path Parameters
contract(string, required)address(string, required)
Response (200 OK)
Cancel a Subscription
DELETE /api/v1/{contract}/subscriptions/{author}
Cancels an existing subscription to an author.
Path Parameters
contract(string, required)author(string, required)
Query Parameters (optional)
From(string)Sponsor(string)
Response (200 OK)
Payments
Make a One-Time Payment
POST /api/v1/{contract}/payments/
Creates a transaction to send a one-time payment.
Path Parameters
contract(string, required)
Request Body
Response (200 OK)
Deposit Funds
POST /api/v1/{contract}/payments/deposit
Deposits funds into a user's account.
Path Parameters
contract(string, required)
Request Body
Response (200 OK)
Withdraw Funds
POST /api/v1/{contract}/payments/withdraw
Withdraws funds from a user's account.
Path Parameters
contract(string, required)
Request Body
Response (200 OK)
Get Account Balance
GET /api/v1/{contract}/payments/balance/{address}
Retrieves the balance of a user's account.
Path Parameters
contract(string, required)address(string, required)
Response (200 OK)
Meta Transactions
Get Account Nonce
GET /api/v1/{contract}/meta/nonce/{account}
Retrieves the current nonce for a given account.
Path Parameters
contract(string, required)account(string, required)
Response (200 OK)
Execute Meta Transaction
POST /api/v1/{contract}/meta/execute
Executes a meta transaction signed by the user.
Path Parameters
contract(string, required)
Request Body
Response (200 OK)
Batch Operations
Create Multiple Subscriptions
POST /api/v1/{contract}/batch/subscriptions
Creates multiple subscriptions in a single sponsored call.
Path Parameters
contract(string, required)
Request Body
Response (200 OK)
Process Batch Payments
POST /api/v1/{contract}/batch/payments
Sends payments to multiple recipients in one transaction.
Path Parameters
contract(string, required)
Request Body
Response (200 OK)
Error Responses (Common)
All authenticated endpoints may return the following standard HTTP error codes:
400 Bad Request – Invalid input or missing required fields.
401 Unauthorized – Missing or invalid API key.
403 Forbidden – Access denied (should not occur with valid API key for these endpoints).
500 Internal Server Error – Unexpected server error.
Last updated