WebhookApi
extends AbstractApi
in package
Webhooks allow you to collect information about events that happen in your Crowdin projects.
You can select the request type, content type, and add a custom payload, which allows you to create integrations with other systems on your own.
Table of Contents
Methods
- create() : Webhook|null
- Add Webhook
- delete() : mixed
- Delete Webhook
- get() : Webhook
- Get Webhook Info
- list() : ModelCollection
- List Webhooks
- update() : Webhook|null
- Edit Webhook
Methods
create()
Add Webhook
public
create(int $projectId, array<string|int, mixed> $data) : Webhook|null
Parameters
- $projectId : int
- $data : array<string|int, mixed>
-
string $data[name] required
string $data[url] required
array $data[events] required
string $data[requestType] required
boolean $data[isActive]
string $data[contentType]
array $data[headers]
array $data[payload]
Tags
Return values
Webhook|nulldelete()
Delete Webhook
public
delete(int $projectId, int $webhookId) : mixed
Parameters
- $projectId : int
- $webhookId : int
Tags
get()
Get Webhook Info
public
get(int $projectId, int $webhookId) : Webhook
Parameters
- $projectId : int
- $webhookId : int
Tags
Return values
Webhooklist()
List Webhooks
public
list(int $projectId[, array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $projectId : int
- $params : array<string|int, mixed> = []
Tags
Return values
ModelCollectionupdate()
Edit Webhook
public
update(Webhook $webhook) : Webhook|null
Parameters
- $webhook : Webhook