Adds a URL that receives a POST request when something happens in the project.
HTTP
POST /projects/{projectId}/webhooksAccess: Session token only. API keys get 403 with insufficient_scope.
Role: Project manager (organisation owners and admins are managers of every project).
Path parameters #
| Parameter | Description |
|---|---|
projectId | The id of the project. |
Request body #
JSON.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | An http:// or https:// address. At most 500 characters. |
events | string | no | All events (default), translation.created, translation.approved, translation.published, key.created, key.deleted, tag.created or tag.deleted. |
JSON
{ "url": "https://example.com/hooks/translations", "events": "translation.published" }Response 201 #
The webhooks of the project, as in List webhooks.
Errors #
| Status | error | When |
|---|---|---|
| 401 | unauthenticated | The token is missing or not valid. |
| 404 | not_found | The project does not exist in your organisation, you have no access to it, or projectId is not a UUID. |
| 403 | forbidden | You are a member of the project, but not a manager. |
| 422 | invalid_request | url is not an http or https address, or events is not one of the allowed values. |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.