Usage
Getting started with the Dual Platform API for tokenized object management and blockchain interactions.
Getting Started
The Dual Platform API uses REST principles with JSON request and response bodies. All API endpoints are accessed via https://api-testnet.dual.network and require proper authentication.
Authentication
Most endpoints require authentication using API keys or JWT tokens. Include your credentials in the request headers:
bash
curl -X GET "https://api-testnet.dual.network/api/v1/organizations" \-H "Accept: application/json" \-H "Authorization: Bearer YOUR_JWT_TOKEN"
Base URL
All API requests should be made to:
Code
https://api-testnet.dual.network
Response Format
API responses are returned in JSON format:
json
{"success": true,"data": {// Response data here},"meta": {"timestamp": "2024-01-15T10:30:00Z"}}
Rate Limiting
The API implements rate limiting to ensure fair usage. Check the response headers for current limits:
X-RateLimit-Limit: Maximum requests per windowX-RateLimit-Remaining: Remaining requests in current windowX-RateLimit-Reset: Unix timestamp when the window resets
Error Handling
Errors are returned with appropriate HTTP status codes and descriptive messages:
json
{"success": false,"error": {"code": "VALIDATION_ERROR","message": "Invalid request parameters","details": ["Organization ID is required"]}}
Common Use Cases
Organization Management
- Create and manage organizations
- Handle member invitations and roles
- Monitor organization balances
Object Operations
- Create and configure tokenized objects
- Manage object lifecycle and state changes
- Handle face rendering and interactions
Wallet Integration
- User authentication and wallet connections
- Transaction management
- Balance and asset tracking