Skip to main content
ErynoaGroup is designed to fit into your existing workflows. This guide covers the main integration patterns: using the REST API directly, receiving real-time events via webhooks, and integrating with popular third-party tools.

REST API integration

The most straightforward integration is calling the ErynoaGroup REST API directly from your backend. All endpoints accept JSON and return JSON. Example: Create a resource
curl -X POST https://api.erynoa.group/v1/resources \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Integration Resource",
    "type": "standard",
    "metadata": {
      "source": "my-app",
      "environment": "production"
    }
  }'
Response:
{
  "data": {
    "id": "res_01HX4K9Z2QBZJMFR5T6VWYP8D",
    "type": "resource",
    "status": "active",
    "name": "My Integration Resource",
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Webhook integration

Use webhooks to receive real-time notifications when events occur in ErynoaGroup, instead of polling the API.
1

Create a webhook endpoint

In your application, set up an HTTP endpoint that accepts POST requests. This endpoint must be publicly accessible and respond with 200 OK within 10 seconds.
2

Register the endpoint in ErynoaGroup

In your dashboard, go to Webhooks → Create Webhook. Enter your endpoint URL and select the events you want to receive (e.g., resource.created, resource.updated, resource.deleted).
3

Verify webhook signatures

ErynoaGroup signs every webhook payload with your webhook secret using HMAC-SHA256. Verify the signature before processing the event:
import hmac
import hashlib

def verify_webhook(payload_body: bytes, signature_header: str, secret: str) -> bool:
    expected = hmac.new(
        secret.encode(),
        payload_body,
        hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(expected, signature_header)
The signature is sent in the X-Erynoa-Signature header.
4

Handle the event

Parse the JSON payload and process the event. Return 200 OK immediately and handle any slow processing asynchronously.
from flask import Flask, request, jsonify

app = Flask(__name__)

@app.route("/webhook", methods=["POST"])
def handle_webhook():
    payload = request.get_json()
    event_type = payload["event"]["type"]

    # Process asynchronously
    if event_type == "resource.created":
        queue.enqueue(process_resource_created, payload)

    return jsonify({"received": True}), 200

Error handling best practices

Retry with backoff

On 5xx errors or network timeouts, retry with exponential backoff: wait 1s, then 2s, then 4s, up to 3 retries.

Idempotency keys

Include an Idempotency-Key header on POST requests to safely retry without creating duplicate resources.

Log request IDs

Every response includes a X-Request-ID header. Log this value to correlate your logs with ErynoaGroup support if needed.

Graceful degradation

Design your application to function (in a degraded mode) when ErynoaGroup is temporarily unavailable.