API Documentation

API Reference

Integrate AkuWorks verification into your applications with our REST API. Access verification data, manage settings, and receive real-time webhooks.

Quick Start

Get started with the AkuWorks API in minutes. Generate an API key and start integrating.

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header.

Request Headers

Authorization: Bearer your-api-key
Content-Type: application/json
User-Agent: YourApp/1.0

Security Notice

Keep your API keys secure. Never expose them in client-side code or public repositories.

Base URL & Versioning

Production API

https://api.akuworks.com/v1

Sandbox API

https://sandbox-api.akuworks.com/v1

• Current API version: v1

• All endpoints are versioned to ensure backward compatibility

• Use the sandbox environment for testing and development

API Endpoints

GET/api/v1/servers/{serverId}
Auth: Required
Rate: 100/hour

Get server configuration and statistics

POST/api/v1/servers/{serverId}/verify
Auth: Required
Rate: 1000/hour

Initiate verification for a user

GET/api/v1/servers/{serverId}/verifications
Auth: Required
Rate: 100/hour

List recent verifications

PUT/api/v1/servers/{serverId}/settings
Auth: Required
Rate: 10/hour

Update server verification settings

Code Examples

JavaScript/Node.js

// Initialize AkuWorks API client
const AkuWorks = require('@akuworks/api');
const client = new AkuWorks({
  apiKey: 'your-api-key',
  baseURL: 'https://api.akuworks.com/v1'
});

// Get server information
async function getServerInfo(serverId) {
  try {
    const server = await client.servers.get(serverId);
    console.log('Server:', server.name);
    console.log('Verifications today:', server.stats.verificationsToday);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

// Initiate verification
async function verifyUser(serverId, userId) {
  try {
    const verification = await client.servers.verify(serverId, {
      userId: userId,
      method: 'turnstile'
    });
    return verification.challengeUrl;
  } catch (error) {
    console.error('Verification failed:', error.message);
  }
}

Python

import akuworks

# Initialize client
client = akuworks.Client(api_key='your-api-key')

# Get server information
def get_server_info(server_id):
    try:
        server = client.servers.get(server_id)
        print(f"Server: {server.name}")
        print(f"Verifications today: {server.stats.verifications_today}")
    except akuworks.APIError as e:
        print(f"Error: {e.message}")

# Initiate verification
def verify_user(server_id, user_id):
    try:
        verification = client.servers.verify(server_id, {
            'user_id': user_id,
            'method': 'turnstile'
        })
        return verification.challenge_url
    except akuworks.APIError as e:
        print(f"Verification failed: {e.message}")

Webhooks

Receive real-time notifications about verification events in your server.

Available Events

verification.completed

User successfully completed verification

Payload: User ID, server ID, timestamp, verification method

verification.failed

User failed verification attempt

Payload: User ID, server ID, timestamp, failure reason

verification.timeout

Verification attempt timed out

Payload: User ID, server ID, timestamp, timeout duration

server.settings.updated

Server verification settings changed

Payload: Server ID, updated settings, admin user ID

Rate Limits

Standard Limits

General API calls1000/hour
Verification requests5000/hour
Settings updates100/hour

Response Headers

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200

Error Handling

The API uses conventional HTTP response codes to indicate success or failure.

Success Codes

200OK
201Created

Error Codes

400Bad Request
401Unauthorized
429Rate Limited
500Server Error

API Support

Need help with the API? Our developer support team is here to assist you.