Skip to main content
GET
/
ping
Ping
curl --request GET \
  --url https://kyc.sbx.moduluslabs.io/ping
Pong!

Overview

The Ping endpoint is a simple health check that allows you to:
  • Test connectivity to Modulus Labs webhook servers
  • Verify API availability and response time
  • Confirm your network can reach the webhook API endpoints
This endpoint does not require authentication, making it perfect for quick connectivity tests and uptime monitoring.

Test Connectivity

Verify your application can reach Modulus Labs webhook servers

Check API Availability

Confirm the Webhook API is online and responding

Endpoint

GET https://webhooks.sbx.moduluslabs.io/ping
This endpoint does not require authentication. It’s a public health check endpoint that anyone can access to verify Webhook API connectivity.

Request

Headers

HeaderValueRequired
accept*/*No

Parameters

This endpoint does not accept any parameters.

Request Body

This endpoint does not require a request body.

Response

Success Response

Status Code: 200 OK Headers:
Content-Type: text/html; charset=utf-8
Body:
Pong!
If you receive Pong!, the Webhook API is available and your network connectivity is working!
Pong!

Error Responses

Status Code: 500Cause: Unexpected server errorSolution:
  • Retry the request
  • If the issue persists, contact Modulus Labs support
  • Report the time of occurrence for troubleshooting
Status Code: 503Cause: Webhook API temporarily unavailable (maintenance, overload, etc.)Solution:
  • Wait and retry the request
  • Check Modulus Labs status page for scheduled maintenance
  • Implement exponential backoff for retries

Code Examples

curl https://webhooks.sbx.moduluslabs.io/ping

# Successful response:
# Pong!

Use Cases

Integration Testing

Verify webhook API connectivity during development and testing

Health Monitoring

Include in your application’s health check endpoints

CI/CD Pipeline

Test API availability in automated deployment workflows

Credential Validation

Confirm secret key is valid before registering webhooks

Testing Checklist

Use this checklist to verify your Webhook API setup:
1

Test Basic Connectivity

curl https://webhooks.sbx.moduluslabs.io/ping
Expected: Pong! with 200 OK status
2

Test Response Time

curl -w "\nTime: %{time_total}s\n" \
  https://webhooks.sbx.moduluslabs.io/ping
Expected: Pong! with response time displayed
3

Test from Your Application

Run the ping function from your application codeExpected: Successfully receives Pong!

Monitoring & Health Checks

Include the Ping endpoint in your monitoring strategy:
Monitoring Example
const HEALTH_CHECK_INTERVAL = 60000; // 1 minute

async function checkWebhookAPIHealth() {
  try {
    const response = await axios.get(
      'https://webhooks.sbx.moduluslabs.io/ping',
      {
        timeout: 5000 // 5 second timeout
      }
    );

    if (response.data === 'Pong!') {
      console.log(' Webhook API is healthy');
      // Update your monitoring dashboard
      metrics.webhookAPIStatus = 'healthy';
    }
  } catch (error) {
    console.error('  Webhook API health check failed');
    metrics.webhookAPIStatus = 'unhealthy';

    // Alert your team
    await alertOncall('Webhook API unreachable', {
      error: error.message,
      timestamp: new Date()
    });
  }
}

setInterval(checkWebhookAPIHealth, HEALTH_CHECK_INTERVAL);

Best Practices

Test connectivity before creating or updating webhooks:
async function registerWebhook(webhookUrl, actions) {
  // Test API connectivity first
  try {
    await ping();
  } catch (error) {
    console.error('Webhook API unavailable, skipping registration');
    return null;
  }

  // Proceed with webhook registration
  return await createWebhook(webhookUrl, actions);
}
Always set appropriate timeouts to avoid hanging:
axios.get('https://webhooks.sbx.moduluslabs.io/ping', {
  timeout: 5000 // 5 seconds
});
Keep track of health check outcomes for debugging:
const healthCheckLog = {
  timestamp: new Date(),
  status: response.status,
  responseTime: duration,
  success: response.data === 'Pong!'
};

await db.healthChecks.insert(healthCheckLog);
Verify Webhook API connectivity when your application starts:
async function startupChecks() {
  console.log('Checking Webhook API connectivity...');

  try {
    await ping();
    console.log(' Webhook API connection verified');
  } catch (error) {
    console.error(' Cannot reach Webhook API');
    console.error('Application may not receive webhook notifications');
    // Decide whether to proceed or abort startup
  }
}

app.listen(3000, async () => {
  await startupChecks();
  console.log('Server running on port 3000');
});

Troubleshooting

Symptom: Request times out without responsePossible Causes:
  • Firewall blocking HTTPS requests
  • DNS resolution problems
  • Network connectivity issues
Solutions:
  • Check firewall rules allow HTTPS (port 443)
  • Test DNS resolution: nslookup webhooks.sbx.moduluslabs.io
  • Try from a different network
  • Increase timeout duration
Symptom: SSL/TLS certificate validation failsPossible Causes:
  • System time incorrect
  • Missing CA certificates
  • Corporate proxy intercepting SSL
Solutions:
  • Verify system time is correct
  • Update SSL certificates on your system
  • Configure proxy settings if applicable

Next Steps

Response

API is available and responding

The response is of type string.

Example:

"Pong!"