curl --request PATCH \
--url https://api.uselora.com/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Sync to the intranet",
"enabled": true,
"events": [
"shortcut.created"
],
"url": "https://example.com/hooks/lora"
}
'import requests
url = "https://api.uselora.com/v1/webhooks/{id}"
payload = {
"description": "Sync to the intranet",
"enabled": True,
"events": ["shortcut.created"],
"url": "https://example.com/hooks/lora"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Sync to the intranet',
enabled: true,
events: ['shortcut.created'],
url: 'https://example.com/hooks/lora'
})
};
fetch('https://api.uselora.com/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uselora.com/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Sync to the intranet',
'enabled' => true,
'events' => [
'shortcut.created'
],
'url' => 'https://example.com/hooks/lora'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.uselora.com/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"description\": \"Sync to the intranet\",\n \"enabled\": true,\n \"events\": [\n \"shortcut.created\"\n ],\n \"url\": \"https://example.com/hooks/lora\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.uselora.com/v1/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Sync to the intranet\",\n \"enabled\": true,\n \"events\": [\n \"shortcut.created\"\n ],\n \"url\": \"https://example.com/hooks/lora\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uselora.com/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Sync to the intranet\",\n \"enabled\": true,\n \"events\": [\n \"shortcut.created\"\n ],\n \"url\": \"https://example.com/hooks/lora\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"disabledReason": "manual",
"enabled": true,
"events": [
"shortcut.created"
],
"id": "wh_0198f2a4-7c1b-7d3e-9a52-3f6b1c2d4e5f",
"previousSecretExpiresAt": "2023-11-07T05:31:56Z",
"source": "api",
"updatedAt": "2023-11-07T05:31:56Z",
"url": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"fieldErrors": {},
"traceId": "<string>",
"reason": "not_a_url"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "plan_requires_upgrade",
"requestId": "<string>",
"traceId": "<string>",
"current_plan": "<string>",
"required_capability": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"traceId": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "payload_too_large",
"requestId": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "internal_error",
"requestId": "<string>",
"traceId": "<string>"
}Update a webhook endpoint
Changes the URL, the label, the events or the on/off state of one of the workspace’s own endpoints. An endpoint made by an integration (source: subscription) is not found here: the integration changes it.
Turning an endpoint off needs only API access (Basic and above). Every other change needs the Business plan or above.
A new URL must meet the same rules as at creation. Changing it clears the endpoint’s failure history and cancels the deliveries still waiting for the old address: nothing queued for the old URL is sent to the new one. Removing an event cancels its waiting deliveries; adding one delivers only events created from then on. Turning an endpoint back on replays nothing.
curl --request PATCH \
--url https://api.uselora.com/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Sync to the intranet",
"enabled": true,
"events": [
"shortcut.created"
],
"url": "https://example.com/hooks/lora"
}
'import requests
url = "https://api.uselora.com/v1/webhooks/{id}"
payload = {
"description": "Sync to the intranet",
"enabled": True,
"events": ["shortcut.created"],
"url": "https://example.com/hooks/lora"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Sync to the intranet',
enabled: true,
events: ['shortcut.created'],
url: 'https://example.com/hooks/lora'
})
};
fetch('https://api.uselora.com/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uselora.com/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Sync to the intranet',
'enabled' => true,
'events' => [
'shortcut.created'
],
'url' => 'https://example.com/hooks/lora'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.uselora.com/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"description\": \"Sync to the intranet\",\n \"enabled\": true,\n \"events\": [\n \"shortcut.created\"\n ],\n \"url\": \"https://example.com/hooks/lora\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.uselora.com/v1/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Sync to the intranet\",\n \"enabled\": true,\n \"events\": [\n \"shortcut.created\"\n ],\n \"url\": \"https://example.com/hooks/lora\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uselora.com/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Sync to the intranet\",\n \"enabled\": true,\n \"events\": [\n \"shortcut.created\"\n ],\n \"url\": \"https://example.com/hooks/lora\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"disabledReason": "manual",
"enabled": true,
"events": [
"shortcut.created"
],
"id": "wh_0198f2a4-7c1b-7d3e-9a52-3f6b1c2d4e5f",
"previousSecretExpiresAt": "2023-11-07T05:31:56Z",
"source": "api",
"updatedAt": "2023-11-07T05:31:56Z",
"url": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"fieldErrors": {},
"traceId": "<string>",
"reason": "not_a_url"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "plan_requires_upgrade",
"requestId": "<string>",
"traceId": "<string>",
"current_plan": "<string>",
"required_capability": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"traceId": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "payload_too_large",
"requestId": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "internal_error",
"requestId": "<string>",
"traceId": "<string>"
}Authorizations
Workspace API key (lora_sk_…) sent as Authorization: Bearer <api_key>. Each scoped operation names the scope it requires in its security requirement, for example shortcuts.write; a key without it receives 403 with code: insufficient_scope. GET /v1/qr also accepts anonymous requests and requires no scope.
Path Parameters
The endpoint's unique ID, wh_ and a UUID.
^wh_[0-9a-f-]{36}$"wh_0198f2a4-7c1b-7d3e-9a52-3f6b1c2d4e5f"
Body
Fields to change on a webhook endpoint.
A label for the endpoint, up to 200 characters. It appears in the emails Lora sends about the endpoint.
200"Sync to the intranet"
Turn the endpoint on or off. Turning it on needs the Business plan; it replays nothing that happened while it was off.
The events the endpoint receives. An endpoint gets only events created after it was created, or after the event was added to this list: nothing is sent for the past.
1 - 3 elementsAn event type. shortcut.created: a visible shortcut was inserted, or a shortcut became visible to the workspace. shortcut.updated: a shortcut was updated. shortcut.deleted: a shortcut was removed, or left workspace visibility (made private or unlisted).
shortcut.created, shortcut.updated, shortcut.deleted A new URL, held to the same rules as at creation. Changing it clears the failure counters and cancels the deliveries still waiting for the old address: nothing queued for the old URL is sent to the new one.
1 - 2048"https://example.com/hooks/lora"
Response
The endpoint after the change.
A webhook endpoint. Its signing secret is never part of it: it is returned once, when the endpoint is created or its secret rotated.
ISO 8601 creation time.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$The endpoint's label, or null when it has none.
Why the endpoint is off, or null while it is on. manual: someone turned it off. gone: the receiver answered 410 Gone. failing: for five days no delivery succeeded, and at least five deliveries ran out of retries.
manual, gone, failing, null Whether events are delivered. Turning an endpoint off cancels the deliveries still waiting for it.
The events the endpoint receives.
An event type. shortcut.created: a visible shortcut was inserted, or a shortcut became visible to the workspace. shortcut.updated: a shortcut was updated. shortcut.deleted: a shortcut was removed, or left workspace visibility (made private or unlisted).
shortcut.created, shortcut.updated, shortcut.deleted The endpoint's unique ID.
^wh_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"wh_0198f2a4-7c1b-7d3e-9a52-3f6b1c2d4e5f"
While a rotated secret still signs next to the new one, when it stops, ISO 8601; otherwise null.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$api: created with an API key. subscription: made by an integration such as Zapier, which owns it. You can read it here; only the integration changes or deletes it.
api, subscription ISO 8601 time of the last change.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$The URL that receives events. For an endpoint an integration made (source: subscription), only the host is shown.
Was this page helpful?