Manual
CLI
API
Log in Get started free

Add a webhook

Adds a URL that receives a `POST` request when something happens in the project.

Adds a URL that receives a POST request when something happens in the project.

HTTP
POST /projects/{projectId}/webhooks

Access: Session token only. API keys get 403 with insufficient_scope.

Role: Project manager (organisation owners and admins are managers of every project).

Path parameters #

ParameterDescription
projectIdThe id of the project.

Request body #

JSON.

FieldTypeRequiredDescription
urlstringyesAn http:// or https:// address. At most 500 characters.
eventsstringnoAll 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 #

StatuserrorWhen
401unauthenticatedThe token is missing or not valid.
404not_foundThe project does not exist in your organisation, you have no access to it, or projectId is not a UUID.
403forbiddenYou are a member of the project, but not a manager.
422invalid_requesturl is not an http or https address, or events is not one of the allowed values.
429rate_limitedToo many requests, see Rate limiting.

See Errors for the error format.