Manual
CLI
API
Log in Get started free

Webhooks

Call a URL of your own when keys or translations change in a project.

A webhook makes Continuous Translations send an HTTP POST request to an address of your choice when something happens in a project. Use it to trigger a build, post a message, or keep another system in sync.

Webhooks are managed under Project settings → Webhooks and need the manager role.

Add a webhook #

  1. Choose Add webhook.
  2. Enter the Payload URL, for example https://your-service.com/webhook. It must start with http:// or https://.
  3. Choose the Trigger events: All events, or one event.
  4. Choose Save webhook.

Each webhook in the list shows its URL, its events, when it last fired and the result of the last delivery. Choose Delete to remove it.

Events #

EventSent when
key.createdA key is added in the web app.
key.deletedA key is deleted.
translation.createdThe first translation (draft or submitted) of a key in a language is saved.
translation.approvedA translation is approved, either by a reviewer or by publishing when review is not required.
Note

The list in the app also shows translation.published. This event is not sent. Use translation.approved.

Keys that arrive through an import or a push from the CLI do not send key.created.

The request #

Continuous Translations sends a JSON body:

JSON
{
  "event": "translation.approved",
  "projectId": 12,
  "data": {
    "key": "checkout.title",
    "language": "nl",
    "value": "Afrekenen",
    "branch": "main"
  }
}

The data object depends on the event:

EventFields in data
key.created, key.deletedkey, branch
translation.createdkey, language
translation.approvedkey, language, value, branch

The request has these headers: Content-Type: application/json, User-Agent: ContinuousTranslations-Webhook and X-CT-Event with the name of the event.

Delivery status #

After each delivery the list shows the result:

StatusMeaning
200 OK (or another code)Your server answered. Codes from 200 to 299 count as success.
UnreachableThe request failed or did not answer in time.
BlockedThe address is not allowed, see below.
PendingNot triggered yet.

A delivery is attempted once, and waits at most 2 seconds for an answer. There are no retries, so answer quickly and do the work afterwards. Redirects are not followed. Requests are not signed.

For safety, addresses that point to private or local networks (such as localhost or 192.168.x.x) are blocked unless the installation allows them.

  1. A reviewer approves the last missing translation.
  2. Continuous Translations calls your webhook with translation.approved.
  3. Your service starts a pipeline that pulls the approved translations with the CLI or the API.

Authenticate that pipeline with a project key. See CI and CLI settings.