Update Config
Create or update the webhook configuration for your tenant. When enabled, Aistetic will send an HTTP POST to your configured URL whenever garment tagging completes, instead of requiring you to poll the Query endpoint.
Request
PUT /garment-tagging/webhook/config
Headers
| Key | Value | Description |
|---|---|---|
| API-KEY | YOUR_API_KEY | Authentication key for the API |
| DOMAIN | YOUR_DOMAIN | Domain identifier for tenant isolation |
Request Body
{
"enabled": true,
"url": "https://example.com/webhook",
"secret": "your_webhook_secret",
"headers": {
"X-Custom-Header": "custom-value"
}
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | Whether webhook delivery is enabled |
url | string | Required when enabled is true | The endpoint URL where Aistetic will send webhook events. Must be a valid URL. |
secret | string | No | A secret string used to compute an HMAC-SHA256 signature for each delivery. See Webhook Payload for verification details. |
headers | object | No | Custom HTTP headers to include with each webhook delivery. Specified as key-value pairs. |
Responses
200 OK
{
"status": true,
"data": {
"enabled": true,
"url": "https://example.com/webhook",
"secret": "your_webhook_secret",
"headers": {
"X-Custom-Header": "custom-value"
}
},
"error": [],
"message": "success!"
}
400 Bad Request
{
"status": false,
"data": {},
"error": ["URL is required when webhook is enabled"],
"message": "Invalid webhook configuration"
}