Skip to main content
This section explains the supported ways to receive analysis results from the Resistant Documents API. There are three options:
  1. Polling the result endpoints (default)
  2. Event notifications via Amazon SQS (optional add-on)
  3. Webhooks via Svix (optional add-on)
SQS event notifications and Svix webhooks are available subject to prior agreement and may involve an additional fee.

Option 1 — Polling (default)

By default, customers fetch results by polling the relevant result endpoints (e.g., fraud/quality/classification/decision) until processing completes. Recommended polling strategy
  • Implement exponential backoff
  • Cap the polling interval at 45 seconds
  • Stop polling after 15 minutes (hard analysis timeout)
Best for
  • Most integrations
  • Teams who want the simplest implementation with no additional infrastructure
➡️ Next: Polling for results

Option 2 — Amazon SQS event notifications

Instead of polling, you can subscribe to events delivered to your Amazon SQS queue. This allows your application to react to results asynchronously and scale via event-driven processing. How it works (high level)
  • Events are delivered to your SQS queue.
  • Resistant AI assumes a role in your AWS account using STS; the tenant_id is used as the ExternalId.
  • Each event includes a result_url you can use to fetch full results via the API.
Supported event types
  • documents.analysis.fraud.finished
  • documents.analysis.quality.finished
  • documents.analysis.classification.finished
Notable limitations
  • One event destination per tenant.
  • Publishing does not specify a KMS key in the API call; your SQS queue policy must support your encryption setup.
Best for
  • AWS-native customers
  • High-throughput integrations where polling load is undesirable
➡️ Next: Amazon SQS event notifications

Option 3 — Webhooks via Svix

Webhooks are another alternative to polling. Resistant AI can send HTTPS webhook requests to your endpoint using Svix as the delivery provider. How it works (high level)
  • You provide a callback URL.
  • Svix delivers events to your endpoint.
  • Webhooks include signature headers for verification.
  • On delivery failures, Svix retries using exponential backoff.
Event types include
  • documents.analysis.fraud.finished
  • documents.adaptive_decision.finished
  • documents.quality.finished
  • documents.classification.finished
Best for
  • Customers who prefer HTTP callbacks over AWS SQS
  • Integrations that already operate webhook receivers
➡️ Next: Webhooks (Svix)

Choosing the right option

FeaturePollingSQSWebhooks
Infrastructure neededNoneAWS accountHTTPS endpoint
LatencyVariable (depends on poll frequency)Near real-timeNear real-time
ReliabilityDepends on clientHigh (SQS durability)High (Svix retries)
AWS-nativeNoYesNo
Setup complexityLowMediumLow–Medium