https://app.lokalise.com/api2docs/curl/#transition-list-all-webhooks-get
$response = $client->webhooks->list(
$projectId,
[
'limit' => 20,
'page' => 1,
]
);
$response = $client->webhooks->fetchAll(
$projectId
);
https://app.lokalise.com/api2docs/curl/#transition-create-a-webhook-post
$response = $client->webhooks->create(
$projectId,
[
'url' => 'https://my.domain.com/webhook',
'events' => [
'project.translation.proofread',
'project.translation.updated',
],
'event_lang_map' => [
[
'event' => 'project.translation.updated',
'lang_iso_codes' => [
'en_GB',
],
],
],
]
);
https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-webhook-get
$response = $client->webhooks->retrieve($projectId, $webhookId);
https://app.lokalise.com/api2docs/curl/#transition-update-a-webhook-put
$response = $client->webhooks->update(
$projectId,
$webhookId,
[
'events' => [
'project.translation.proofread',
'project.translation.updated',
'project.imported',
],
'event_lang_map' => [
[
'event' => 'project.translation.proofread',
'lang_iso_codes' => [
'en_GB',
],
],
[
'event' => 'project.translation.updated',
'lang_iso_codes' => [
'en_GB'
],
],
],
]
);
https://app.lokalise.com/api2docs/curl/#transition-delete-a-webhook-delete
$response = $client->webhooks->delete($projectId, $webhookId);
https://app.lokalise.com/api2docs/curl/#transition-regenerate-a-webhook-secret-patch
$response = $client->webhooks->regenerateSecret($projectId, $webhookId);