Webhooks
Integrate your custom webhooks with Translized and respond to all events occuring inside app.
Setup
In order to setup webohook only thing you need is Webhook URL.
Webhook URL is endpoint that Translized will ping when selected event occurs.
In order for your Webhook URL to verify that Translized is sending request, you will be provided with generated Webhook Secret which you should keep secretly inside your code.
If you feel that your Webhook Secret is compromised, you can always generate new one.
Events
Project
1. Imported - Trigger when you import translation file
Webhook Response:
{
"event": "project.imported",
"totalParsed": 150,
"totalAdded": 150,
"totalUpdated": 5,
"limitReached": false,
"projectId": "hQZDKhNhLf"
}
2. All translation translated - Trigger when when all keys are translated to every language
Webhook Response:
{
"event": "project.translatedAll"
}
3. All translations verified - Trigger when when all keys translations are verified
Webhook Response:
{
"event": "project.verifiedAll"
}
Language
1. Added - Trigger when new language is added to project
Webhook Response:
{
"event": "project.language.added",
"language": {
"code": "vi",
"label": "Vietnamese"
},
"projectId": "hQZDKhNhLf"
}
2. Removed - Trigger when language is deleted from the project
Webhook Response:
{
"event": "project.language.removed",
"language": {
"code": "es_MX"
},
"projectId": "hQZDKhNhLf"
}
Keys
1. Added - Trigger when new key is added from Translized app
Webhook Response:
{
"event": "project.key.added",
"key": {
"id": "2uJ5H8usMt",
"name": "NEW_TERM"
},
"projectId": "hQZDKhNhLf"
}
2. Modified - Trigger when key is modified (edited)
Webhook Response:
{
"event": "project.key.modified",
"key": {
"id": "2uJ5H8usMt",
"name": "NEW_TERM_EDITED",
"previousName": "NEW_TERM"
},
"projectId": "hQZDKhNhLf"
}
3. Deleted - Trigger when key is deleted
Webhook Response:
{
"event": "project.key.deleted",
"key": {
"name": "NEW_TERM"
},
"projectId": "hQZDKhNhLf"
}
4. Comment added - Trigger when new comment is added on term
Webhook Response:
{
"event": "project.key.comment.added",
"key": {
"id": "2uJ5H8usMt",
"name": "NEW_TERM"
},
"comment": "Hello World!",
"projectId": "hQZDKhNhLf"
}
Translation
1. Added - Trigger when new translation is added
Webhook Response:
{
"event": "project.translation.added",
"key": {
"id": "2uJ5H8usMt",
"name": "NEW_TERM"
},
"language": {
"code": "en"
},
"projectId": "hQZDKhNhLf"
}
2. Updated - Trigger when translation is updated
Webhook Response:
{
"event": "project.translation.updated",
"key": {
"id": "2uJ5H8usMt",
"name": "NEW_TERM"
},
"language": {
"code": "en"
},
"projectId": "hQZDKhNhLf"
}
Contributor
1. Added - Trigger when new contributor is added to the project
Webhook Response:
{
"event": "project.contributor.added",
"contributor": {
"email": "john.doe@email.com"
},
"projectId": "hQZDKhNhLf"
}
2. Deleted - Trigger when contributor is removed (deleted) from the project
Webhook Response:
{
"event": "project.contributor.deleted",
"contributor": {
"email": "john.doe@email.com"
},
"projectId": "hQZDKhNhLf"
}
Order
1. Created - Trigger when new translation order (Human Translation) is created
Webhook Response:
{
"event": "project.order.created",
"fromLanguageCode": "en",
"toLanguageCode": "es",
"projectId": "hQZDKhNhLf"
}
2. Completed - Trigger when translation order (Human Translation) is completed
Webhook Response:
{
"event": "project.order.completed",
"fromLanguageCode": "en",
"toLanguageCode": "es",
"projectId": "hQZDKhNhLf"
}
Support
Contact us through email: info@translized.com