Creating a Webhook
To register a webhook endpoint for your organization:- Navigate to the Webhooks section in your Ayna API Platform sidebar
- Click Create New Webhook to register your endpoint
- Enter your webhook URL that will receive the event notifications
- Save your webhook configuration
Each organization can register only one webhook endpoint at a time.
Webhook Triggers
Webhooks are automatically triggered when try-on jobs reach a terminal state:- Successful completion - When a try-on job completes successfully
- Failed execution - When a try-on job fails to complete
Webhook Request Payload
When a webhook is triggered, your endpoint will receive a JSON payload with the following structure:Success Request
Failure Request
model
- The AI model version used for the try-on job (e.g., “ayna-1.0”)status
- Job completion status:"completed"
for success,"failed"
for errorsoutput
- Contains the generated output dataimage
- Direct URL to the generated try-on image (success) ornull
(failure)
error
- Error object explaining the failure reason (failure only). Contains:code
(string) - Error code identifiermessage
(string) - Human-readable error message