Skip to main content

Overview

LoopOS AI services support webhooks for asynchronous processing. When a callback_url is provided, the service will send the response to that URL instead of returning it directly.

Usage

Include callback_url in your request:
{
  "language": "PT-PT",
  "prompt": "What condition?",
  "options": ["Excellent", "Good", "Fair", "Poor"],
  "item_context": "iPhone 12 with scratches",
  "callback_url": "https://your-app.com/webhooks/ai-response"
}

Webhook Payload

The webhook will receive a POST request with the service response:
{
  "decision": "Good",
  "reasoning": "Based on the description..."
}

Security

Validate requests: Always validate webhook requests to ensure they come from LoopOS AI.
Use HTTPS: Always use HTTPS for webhook URLs.