Save Webhook
Used to create or update a webhook configuration for the auto-translation completion event in UILM. Once configured, Blocks Cloud will call the specified webhook URL when an auto-translation job finishes.
This is useful for integrating external systems that need to react when translation generation is complete.
API Endpoint
| Property | Value |
|---|---|
| Request Method | POST |
| Request URL | https://api.seliseblocks.com/uilm/v1/Config/SaveWebHook |
Request
Request Example
curl --location 'https://api.seliseblocks.com/uilm/v1/Config/SaveWebHook' \
--header 'Authorization: Bearer <your-token>' \
--header 'x-blocks-key: <your-project-key>' \
--header 'Content-Type: application/json' \
--data '{
"itemId": "<uuid>",
"createDate": "<iso_8601_timestamp>",
"lastUpdateDate": "<iso_8601_timestamp>",
"url": "<webhook_url>",
"contentType": "application/json",
"blocksWebhookSecret": {
"secret": "<webhook_secret>",
"headerKey": "<signature_header_name>"
},
"isDisabled": false,
"projectKey": "<project-key>"
}'
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token used to authorize the request. |
| x-blocks-key | string | Yes | Project key associated with the Blocks Cloud project. |
| Content-Type | string | Yes | Request content type. Must be application/json. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| itemId | string | No | Unique identifier of the webhook. If provided, the API updates the existing webhook with this ID or creates a new one using the provided ID. |
| createDate | string | No | Creation timestamp in ISO 8601 format. |
| lastUpdateDate | string | No | Last update timestamp in ISO 8601 format. |
| url | string | Yes | The destination URL that Blocks Cloud will call when auto-translation is complete. |
| contentType | string | Yes | Content type used when sending the webhook request. Currently supports application/json. |
| blocksWebhookSecret | object | No | Secret configuration used when sending the webhook request. |
| blocksWebhookSecret.secret | string | No | Secret value that will be included in the outgoing webhook header. |
| blocksWebhookSecret.headerKey | string | No | Name of the header in which the secret will be sent. |
| isDisabled | boolean | Yes | Indicates whether the webhook is disabled. Set to false to keep the webhook active. |
| projectKey | string | Yes | Unique identifier of the project for which the webhook is being configured. |
Response
Success Response
Returns a success object with HTTP status 200 OK.
{
"success": true,
"errorMessage": null,
"validationErrors": null
}
Response Fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the webhook was saved successfully. |
| errorMessage | string | null |
| validationErrors | object | null |
Usage Notes
- This endpoint is used to configure the webhook that is triggered when auto-translation completes.
- Auto-translation is initiated manually by users within Blocks Cloud.
- During auto-translation, Blocks Cloud processes translation keys and uses AI to fill in missing values for missing languages.
- Once the process is complete, the configured webhook URL is called.
- Only one webhook configuration is supported for this use case.
- If
itemIdis omitted, a new webhook configuration is created. - If
itemIdis provided, the API updates the existing webhook or creates one using that ID if it does not already exist. - The
blocksWebhookSecretcan be used to include a secret value in the outgoing webhook request headers for downstream verification. - Set
isDisabledtotrueif you want to keep the webhook configuration but temporarily stop webhook delivery.
Example Use Case
You can use this endpoint to notify an external system when translations are ready.
For example:
- trigger a deployment pipeline after new translations are generated
- notify another service to refresh cached localization files
- send a message to a monitoring or workflow system
Outgoing Webhook Behavior
Once auto-translation is complete, Blocks Cloud sends a request to the configured url.
If blocksWebhookSecret is configured, the outgoing request will include the secret in the header defined by headerKey.
Example:
X-Blocks-Webhook-Secret: your-secret-value
This allows your receiving service to verify that the webhook came from a trusted source.