Skip to main content
Receive task results via HTTP callbacks instead of polling.

Overview

When using callback mode, APIXO sends a POST request to your specified URL when a task completes. This eliminates polling overhead and provides immediate notifications — ideal for high-volume production applications.

Setup

1

Create a webhook endpoint

Your endpoint must accept POST requests, respond with HTTP 200 within 30 seconds, and be publicly accessible via HTTPS.
If your endpoint does not respond with HTTP 200 within 30 seconds, APIXO will retry delivery up to 3 times with increasing delays.
2

Submit a task with callback

Include request_type: "callback" and your callback_url in the request:

Webhook Payload

Success

Failure

Payload Fields

string
Unique task identifier.
string
Final task state: success or failed.
string
JSON string containing resultUrls array. Only present on success.
integer
Processing time in milliseconds.
string
Error code. Only present on failure.
string
Human-readable error message. Only present on failure.

Retry Policy

If your webhook endpoint fails to respond with HTTP 200: After 3 failed attempts, the webhook is abandoned. You can still query task status via the Status Task endpoint.

Security Recommendations

Implement Idempotency

Webhooks may be delivered more than once. Use taskId to deduplicate and prevent processing the same result twice.

Use HTTPS Only

Always use HTTPS for your webhook endpoint to ensure data is encrypted in transit.

Testing Webhooks

Use ngrok to expose your local server during development:
You can still query task status via the API even when using callback mode, which is useful for debugging.