Skip to main content

API Integration Showcase

Explore powerful API documentation and integration tools for your developer documentation.

๐Ÿ“˜ OpenAPI/Swagger Documentationโ€‹

API Endpoint Documentationโ€‹

POST /api/v1/contracts/deploy

Deploy Smart Contract

Deploys a new smart contract to the specified blockchain network.

Request Body application/json

{
"network": "ethereum",
"contractType": "ERC20",
"parameters": {
"name": "Proper Token",
"symbol": "PROP",
"totalSupply": 1000000,
"decimals": 18
},
"gasOptions": {
"maxFeePerGas": "30000000000",
"maxPriorityFeePerGas": "2000000000"
}
}

Response 200 OK

{
"success": true,
"contractAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7",
"transactionHash": "0x9fc76417374aa880d4449a1f7f31ec597f00b2f3",
"blockNumber": 15435234,
"gasUsed": "2458963"
}

Multiple API Methodsโ€‹

GET/api/v1/contracts/{address}Get contract details

POST /api/v1/transactions/send Send transaction

PUT/api/v1/contracts/{address}/updateUpdate contract metadata
DELETE/api/v1/contracts/{address}/removeRemove contract from index

๐Ÿ”ท GraphQL Explorerโ€‹

https://api.proper-labs.io/graphql

Query

query GetUserContracts($userId: ID!) {
user(id: $userId) {
id
address
contracts {
id
address
type
deployedAt
transactions {
hash
value
status
}
}
}
}

Variables

{
"userId": "usr_123456789"
}

Response

{
"data": {
"user": {
"id": "usr_123456789",
"address": "0x742d35Cc...",
"contracts": [
{
"id": "con_abc123",
"address": "0x123...",
"type": "ERC20",
"deployedAt": "2024-01-15T10:30:00Z",
"transactions": [
{
"hash": "0xabc...",
"value": "1000000000000000000",
"status": "SUCCESS"
}
]
}
]
}
}
}

GraphQL Schema Documentationโ€‹

type User {
id: ID!
address: String!
contracts: [Contract!]!
transactions: [Transaction!]!
createdAt: DateTime!
}

type Contract {
id: ID!
address: String!
type: ContractType!
owner: User!
deployedAt: DateTime!
transactions: [Transaction!]!
metadata: ContractMetadata
}

type Transaction {
hash: String!
from: String!
to: String!
value: String!
gasUsed: String!
status: TransactionStatus!
timestamp: DateTime!
}

enum ContractType {
ERC20
ERC721
ERC1155
CUSTOM
}

enum TransactionStatus {
PENDING
SUCCESS
FAILED
}

๐Ÿ› ๏ธ SDK Code Generationโ€‹

TypeScript SDK Exampleโ€‹

generated/types.ts
// Auto-generated TypeScript types from OpenAPI spec

export interface Contract {
id: string;
address: string;
type: 'ERC20' | 'ERC721' | 'ERC1155' | 'CUSTOM';
owner: string;
deployedAt: string;
metadata?: ContractMetadata;
}

export interface Transaction {
hash: string;
from: string;
to: string;
value: string;
gasUsed: string;
status: 'PENDING' | 'SUCCESS' | 'FAILED';
timestamp: string;
}

export interface DeployContractRequest {
network: string;
contractType: string;
parameters: Record<string, any>;
gasOptions?: GasOptions;
}

export interface DeployContractResponse {
success: boolean;
contractAddress: string;
transactionHash: string;
blockNumber: number;
gasUsed: string;
}

๐Ÿงช API Testing Interfaceโ€‹

Try It Outโ€‹

Response
{
"success": true,
"message": "Test response - API playground demo"
}

๐Ÿ“Š API Analytics Dashboardโ€‹

API Usage Statisticsโ€‹

1.2M
Total API Calls
99.9%
Uptime
45ms
Avg Response Time
5.2K
Active Developers
EndpointCalls/DayAvg ResponseSuccess Rate
/contracts/deploy15.2K125ms98.5%
/transactions/send48.3K45ms99.2%
/user/balance125.6K12ms99.9%
/contracts/query67.8K23ms99.7%

๐Ÿ” Authentication Examplesโ€‹

curl -X POST https://api.proper-labs.io/api/v1/contracts/deploy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"network": "ethereum",
"contractType": "ERC20"
}'

๐ŸŒ Webhook Configurationโ€‹

Event Subscriptionsโ€‹

Webhook Payload Exampleโ€‹

{
"event": "contract.deployed",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"contractAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7",
"transactionHash": "0x9fc76417374aa880d4449a1f7f31ec597f00b2f3",
"network": "ethereum",
"gasUsed": "2458963"
},
"metadata": {
"userId": "usr_123456789",
"projectId": "prj_987654321"
}
}

๐Ÿ“ฆ Rate Limitingโ€‹

API Rate Limits

TierRequests/HourRequests/DayBurst Rate
Free1001,00010/min
Starter1,00010,00050/min
Pro10,000100,000200/min
EnterpriseUnlimitedUnlimitedCustom

Rate Limit Headers

HTTP/1.1 200 OK
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1642329600

API Integration Best Practices
  • Document all endpoints with clear examples
  • Provide interactive testing interfaces
  • Generate SDK code for multiple languages
  • Include authentication examples
  • Show rate limiting information
  • Document webhooks and events
  • Provide error handling examples
  • Include versioning strategies