cURL
curl -X PATCH "https://api.myworklayer.com/v1/subscriptions/0f8e2b7c-5a1d-4c3e-9b6f-2d7a8c1e4f90" \
-H "Authorization: Bearer $WORKLAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [
"room.response",
"worker.status"
]
}'const response = await fetch('https://api.myworklayer.com/v1/subscriptions/0f8e2b7c-5a1d-4c3e-9b6f-2d7a8c1e4f90', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"events": [
"room.response",
"worker.status"
]
}),
});
const data = await response.json();
console.log(data);{
"id": "0f8e2b7c-5a1d-4c3e-9b6f-2d7a8c1e4f90",
"name": "Support backend",
"url": "https://hooks.example.com/worklayer",
"enabled": true,
"createdAt": "2026-11-20T15:02:44.120Z",
"updatedAt": "2026-11-20T15:20:03.511Z",
"events": [
"room.response",
"worker.status"
]
}{
"statusCode": 400,
"message": "Invalid webhook request",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "Not Found"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}Subscriptions
Update a subscription
Updates a Subscription’s name, destination URL, or subscribed event topics. Changing the URL cancels any pending retry deliveries. Enabling or disabling a Subscription is managed in the web app.
PATCH
/
v1
/
subscriptions
/
{id}
cURL
curl -X PATCH "https://api.myworklayer.com/v1/subscriptions/0f8e2b7c-5a1d-4c3e-9b6f-2d7a8c1e4f90" \
-H "Authorization: Bearer $WORKLAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [
"room.response",
"worker.status"
]
}'const response = await fetch('https://api.myworklayer.com/v1/subscriptions/0f8e2b7c-5a1d-4c3e-9b6f-2d7a8c1e4f90', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"events": [
"room.response",
"worker.status"
]
}),
});
const data = await response.json();
console.log(data);{
"id": "0f8e2b7c-5a1d-4c3e-9b6f-2d7a8c1e4f90",
"name": "Support backend",
"url": "https://hooks.example.com/worklayer",
"enabled": true,
"createdAt": "2026-11-20T15:02:44.120Z",
"updatedAt": "2026-11-20T15:20:03.511Z",
"events": [
"room.response",
"worker.status"
]
}{
"statusCode": 400,
"message": "Invalid webhook request",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "Not Found"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}Authorizations
Your factory's Worklayer API key (wrk-...). See Get an API key and Authentication. Requests sent from the playground execute live against your factory.
Body
application/json
Send at least one field. events replaces the full list.
Response
The changed subscription.