Skip to main content

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

PropertyValue
Request MethodPOST
Request URLhttps://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

FieldTypeRequiredDescription
AuthorizationstringYesBearer token used to authorize the request.
x-blocks-keystringYesProject key associated with the Blocks Cloud project.
Content-TypestringYesRequest content type. Must be application/json.

Request Body

FieldTypeRequiredDescription
itemIdstringNoUnique identifier of the webhook. If provided, the API updates the existing webhook with this ID or creates a new one using the provided ID.
createDatestringNoCreation timestamp in ISO 8601 format.
lastUpdateDatestringNoLast update timestamp in ISO 8601 format.
urlstringYesThe destination URL that Blocks Cloud will call when auto-translation is complete.
contentTypestringYesContent type used when sending the webhook request. Currently supports application/json.
blocksWebhookSecretobjectNoSecret configuration used when sending the webhook request.
blocksWebhookSecret.secretstringNoSecret value that will be included in the outgoing webhook header.
blocksWebhookSecret.headerKeystringNoName of the header in which the secret will be sent.
isDisabledbooleanYesIndicates whether the webhook is disabled. Set to false to keep the webhook active.
projectKeystringYesUnique 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

FieldTypeDescription
successbooleanIndicates whether the webhook was saved successfully.
errorMessagestringnull
validationErrorsobjectnull

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 itemId is omitted, a new webhook configuration is created.
  • If itemId is provided, the API updates the existing webhook or creates one using that ID if it does not already exist.
  • The blocksWebhookSecret can be used to include a secret value in the outgoing webhook request headers for downstream verification.
  • Set isDisabled to true if 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.