Skip to main content

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

KeyValueDescription
API-KEYYOUR_API_KEYAuthentication key for the API
DOMAINYOUR_DOMAINDomain identifier for tenant isolation

Request Body

{
"enabled": true,
"url": "https://example.com/webhook",
"secret": "your_webhook_secret",
"headers": {
"X-Custom-Header": "custom-value"
}
}

Fields

FieldTypeRequiredDescription
enabledbooleanYesWhether webhook delivery is enabled
urlstringRequired when enabled is trueThe endpoint URL where Aistetic will send webhook events. Must be a valid URL.
secretstringNoA secret string used to compute an HMAC-SHA256 signature for each delivery. See Webhook Payload for verification details.
headersobjectNoCustom 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"
}