Вебхуки повідомляють і допомагають вам отримувати інформацію про ключові події, що відбуваються у вашому проекті Crowdin, такі як: виконані переклади або затвердження. After you configure a webhook for the project, Crowdin will start sending POST or GET requests with data to the webhook URL via HTTP.
Only owners and project managers can register a webhook.
You can add webhooks to build integrations with the services or with your backend. Наприклад:
You can configure webhooks for the following types of events:
Файл повністю перекладено
Файл повністю перекладено
File added
File updated
File reverted
File deleted
Project fully translated – all files are translated into one of the target languages
Project fully reviewed – translations in all files for one of the target languages are approved
Exported translation updated – final translation of a string is updated
Source string added
Source string updated
Source string deleted
Suggested translation added – a string in the project is translated
Suggested translation updated – a translation for a string in the project is updated
Suggested translation deleted – one of the translations is deleted
Suggested translation approved – a translation for a string is approved
Suggested translation disapproved – approval for a previously added translation is removed
Task added
Task status changed
Task deleted
{
"events": [
{
"event": "file.translated",
"project": "impact",
"project_id": "778899",
"language": "uk",
"file_id": "1",
"file": "example.txt"
}
] }
{
"events": [
{
"event": "file.approved",
"project": "impact",
"project_id": "778899",
"language": "uk",
"file_id": "1",
"file": "example.txt"
}
] }
{
"events": [
{
"event": "file.added",
"project": "impact",
"project_id": "778899",
"file_id": "1",
"file": "example.txt",
"user_id": "1",
"user": "john_doe",
"revision": "1"
}
] }
{
"events": [
{
"event": "file.updated",
"project": "impact",
"project_id": "778899",
"file_id": "1",
"file": "example.txt",
"user_id": "1",
"user": "john_doe",
"revision": "1"
}
] }
{
"events": [
{
"event": "file.reverted",
"project": "impact",
"project_id": "778899",
"file_id": "1",
"file": "example.txt",
"user_id": "1",
"user": "john_doe",
"revision": "1"
}
] }
{
"events": [
{
"event": "file.deleted",
"project": "impact",
"project_id": "778899",
"file_id": "1",
"file": "example.txt",
"user_id": "1",
"user": "john_doe"
}
] }
{
"events": [
{
"event": "project.translated",
"project": "impact",
"project_id": "778899",
"language": "uk"
}
] }
{
"events": [
{
"event": "project.approved",
"project": "impact",
"project_id": "778899",
"language": "uk"
}
] }
{
"events": [
{
"event": "translation.updated",
"project": "impact",
"project_id": "778899",
"language": "uk",
"source_string_id": "1",
"old_translation_id": "1",
"new_translation_id": "1",
"user": "john_doe",
"user_id": "1",
"file_id": "1",
"file": "example.txt"
}
] }
{
"events": [
{
"event": "string.added",
"project": "impact",
"project_id": "778899",
"string_id": "1",
"user": "john_doe",
"user_id": "1",
"file_id": "1",
"file": "example.txt"
}
] }
{
"events": [
{
"event": "string.updated",
"project": "impact",
"project_id": "778899",
"string_id": "1",
"user": "john_doe",
"user_id": "1",
"file_id": "1",
"file": "example.txt"
}
] }
{
"events": [
{
"event": "string.deleted",
"project": "impact",
"project_id": "778899",
"string_id": "1",
"user": "john_doe",
"user_id": "1",
"file_id": "1",
"file": "example.txt"
}
] }
{
"events": [
{
"event": "suggestion.added",
"project": "impact",
"project_id": "778899",
"language": "uk",
"source_string_id": "1",
"translation_id": "1",
"user": "john_doe",
"user_id": "1",
"file_id": "1",
"file": "example.txt"
}
] }
{
"events": [
{
"event": "suggestion.updated",
"project": "impact",
"project_id": "778899",
"language": "uk",
"source_string_id": "1",
"translation_id": "1",
"user": "john_doe",
"user_id": "1",
"file_id": "1",
"file": "example.txt"
}
] }
{
"events": [
{
"event": "suggestion.deleted",
"project": "impact",
"project_id": "778899",
"language": "uk",
"source_string_id": "1",
"translation_id": "1",
"user": "john_doe",
"user_id": "1",
"file_id": "1",
"file": "example.txt"
}
] }
{
"events": [
{
"event": "suggestion.approved",
"project": "impact",
"project_id": "778899",
"language": "uk",
"source_string_id": "1",
"translation_id": "1",
"user": "john_doe",
"user_id": "1",
"file_id": "1",
"file": "example.txt"
}
] }
{
"events": [
{
"event": "suggestion.disapproved",
"project": "impact",
"project_id": "778899",
"language": "uk",
"source_string_id": "1",
"translation_id": "1",
"user": "john_doe",
"user_id": "1",
"file_id": "1",
"file": "example.txt"
}
] }
{ "events": [
{ "event": "task.added", "project": "impact", "project_id": "778899", "language": "uk", "task_id": "", "user": "john_doe", "user_id": "1" } ] }
{ "events": [
{ "event": "task.statusChanged", "project": "impact", "project_id": "778899", "language": "uk", "task_id": "", "old_status": "", "new_status": "", "user": "john_doe", "user_id": "1" } ] }
{ "events": [
{ "event": "task.deleted", "project": "impact", "project_id": "778899", "language": "uk", "task_id": "", "user": "john_doe", "user_id": "1" } ] }
To configure webhooks in Crowdin, open your project and go to Integrations > Webhooks. Click Add Webhook to start configuring your new webhook.
You will need to provide the following information to register a webhook:
When adding a webhook, click Test to see how your application will react to that call.
Depending on your approach to webhooks management, you might need to add dedicated Crowdin IP addresses to your firewall to allow Crowdin to open the pre-configured webhook URLs.
Read more about IP Addresses.
You can access the list of all existing webhooks within a specific project. You will be able to edit or delete webhooks right from the list of webhooks displayed.
In the Calls History section you can see the list of calls of all webhooks that were added in the project. Use the filter to view all or only unsuccessful webhook notifications.
Need help working with Webhooks or have any questions? Зв’язатись з командою підтримки.