Lokalise APIv2 Node SDK

Node interface for the Lokalise APIv2.

View the Project on GitHub lokalise/node-lokalise-api




Webhooks

Webhook attributes

Fetch webhooks

API doc

const webhooks = await lokaliseApi.webhooks().list({
  project_id: project_id,
  page: 2,
  limit: 1,
});

webhooks.items[0].url;

Fetch a single webhook

API doc

const webhook = await lokaliseApi.webhooks().get(webhook_id, {project_id: project_id});

webhook.secret;

Create webhook

API doc

const webhook = await lokaliseApi.webhooks().create(
  {url: 'https://example.com', events: ['project.exported']},
  {project_id: project_id}
);

webhook.url;

Update webhook

API doc

const webhook = await lokaliseApi.webhooks().update(
  webhook_id,
  {url: 'http://example.com', events: ['project.snapshot']},
  {project_id: project_id}
);

webhook.events[0];

Delete webhook

API doc

const response = await lokaliseApi.webhooks().delete(
  webhook_id,
  {project_id: project_id}
);

response.webhook_deleted;

Regenerate webhook secret

API doc

const response = await lokaliseApi.webhooks().regenerate_secret(
  webhook_id,
  {project_id: project_id}
);

response.secret;