reference
Webhooks
1 endpoint
POST/api/v3/webhook
Create Webhook
Roles: SYSADMIN ADMIN ACCOUNT_ADMIN
Creates a webhook that sends one event type to url, as a POST with a JSON body.
- Right after it is created, wxrks sends a
WEBHOOK_VALIDATIONrequest to the URL. The webhook becomes active when the URL answers it with a2xxstatus within 3 seconds; until then it receives no events. - With a
secret, every request is signed.X-BWX-Timestampis the Unix time in seconds it was signed at, andX-BWX-Signatureisv1=followed by the lowercase hex HMAC-SHA256 of{X-BWX-Timestamp}.{raw body}, keyed with the secret (UTF-8). Accept a request only when the signature matches, compared in constant time, and the timestamp is less than 5 minutes old. Retries are signed again with a new timestamp. - Receivers written before signatures can still read the secret itself in
X-BWX-Webhook-Secret; check the signature instead.
The Webhooks guide lists the payload of each event type and has a verification example.
Request body
active |
booleanIgnored. A webhook starts inactive and becomes active once its URL answers the validation request. |
secret |
stringOptional, and recommended: the key wxrks signs every request with, an HMAC-SHA256 sent in X-BWX-Signature. It is stored encrypted, never returned, and cannot be changed; to rotate it, create a new webhook. |
type |
stringNEW_PROJECT NEW_EMPTY_PROJECT PROJECT_STATUS_CHANGE PROJECT_UPDATE PROJECT_INGESTION_COMPLETED PROJECT_TRANSLATION_FINISHED TASK_ASSIGNED TASK_STATUS_CHANGE TASK_UPDATE WORK_UNIT_STATUS_CHANGE WORK_UNIT_TRANSLATION_FILE_READY WORK_UNIT_IMPORT_FINISHED TRANSLATION_KIT_JOB_FINISHED NEW_ORG_UNIT ORG_UNIT_UPDATE NEW_ORG ORG_UPDATE NEW_USER USER_UPDATEThe one event type this webhook receives. Create one webhook per event type; several can share a URL. |
url |
stringWhere wxrks sends the events, each as a POST with a JSON body. It must use https://. |
Responses
200 OK
account |
string (uuid) |
active |
boolean |
createdAt |
integer (int64) |
events |
string[] |
url |
string |
uuid |
string (uuid) |
Request
curl -X POST 'https://app.wxrks.com/api/v3/webhook' \
-H "X-AUTH-TOKEN: $WXRKS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"active": false,
"secret": "string",
"type": "NEW_PROJECT",
"url": "string"
}'
Response 200
{
"account": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"active": false,
"createdAt": 0,
"events": [
"string"
],
"url": "string",
"uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}