Docs API reference
Webhooks & events
Get told when things happen.
Every state change becomes an event, delivered to your endpoint with an HMAC signature and retried on failure. See Webhooks for verification code and the full event catalog.
6 endpoints · base path /api/v1
List event types
AccessAdmin, or an API key with the read or write scope.
Returns every event name you can subscribe to.
Responses
Example response
[
"string"
]Errors
| Status | When |
|---|---|
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
Errors use RFC 9457 problem details.
curl -X GET "$LMS_URL/api/v1/event-types" \
-H "X-API-Key: $LMS_KEY"const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const res = await fetch(`${LMS_URL}/api/v1/event-types`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const res = await fetch(`${LMS_URL}/api/v1/event-types`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
res = requests.get(f"{LMS_URL}/api/v1/event-types", headers=HEADERS, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/event-types"))
.header("X-API-Key", lmsKey)
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
uri = URI("#{lms_url}/api/v1/event-types")
request = Net::HTTP::Get.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"))
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$ch = curl_init("$lmsUrl/api/v1/event-types");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY')],
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", os.Getenv("LMS_URL") + "/api/v1/event-types", nil)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}List webhook endpoints
AccessAdmin, or an API key with the read or write scope.
Lists your endpoints with their subscribed event types. The signing secret is never shown again.
Responses
Example response
[
{
"active": true,
"createdAt": "2026-11-25T14:03:11Z",
"eventTypes": [
"enrollment.completed"
],
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"url": "https://example.com/hooks/lms"
}
]Errors
| Status | When |
|---|---|
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
Errors use RFC 9457 problem details.
curl -X GET "$LMS_URL/api/v1/webhook-endpoints" \
-H "X-API-Key: $LMS_KEY"const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const res = await fetch(`${LMS_URL}/api/v1/webhook-endpoints`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const res = await fetch(`${LMS_URL}/api/v1/webhook-endpoints`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
res = requests.get(f"{LMS_URL}/api/v1/webhook-endpoints", headers=HEADERS, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/webhook-endpoints"))
.header("X-API-Key", lmsKey)
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
uri = URI("#{lms_url}/api/v1/webhook-endpoints")
request = Net::HTTP::Get.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"))
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$ch = curl_init("$lmsUrl/api/v1/webhook-endpoints");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY')],
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", os.Getenv("LMS_URL") + "/api/v1/webhook-endpoints", nil)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}Add a webhook endpoint
AccessAdmin, or an API key with the write scope.
Registers a URL to receive events. eventTypes is a list of event names (see GET /event-types) or ["*"] for all of them.
The URL must be https and must not resolve to a private, loopback or link-local address. The signing secret is returned once in secret; use it to verify the X-NoBS-Signature header. See Webhooks.
Request body application/json · CreateEndpoint
| Field | Type | Notes |
|---|---|---|
| eventTypesrequired | string[] | min 1 item |
| urlrequired | string | min length 1 |
Example request body
{
"url": "https://api.example.com/lms/events",
"eventTypes": [
"enrollment.completed",
"certificate.issued"
]
}Responses
Example response
{
"endpoint": {
"active": true,
"createdAt": "2026-11-25T14:03:11Z",
"eventTypes": [
"enrollment.completed"
],
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"url": "https://example.com/hooks/lms"
},
"secret": "whsec_…"
}Errors
| Status | When |
|---|---|
| 400 | Not https, a non-public address, or an unknown event type. |
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
Errors use RFC 9457 problem details.
curl -X POST "$LMS_URL/api/v1/webhook-endpoints" \
-H "X-API-Key: $LMS_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.example.com/lms/events",
"eventTypes": [
"enrollment.completed",
"certificate.issued"
]
}'const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const res = await fetch(`${LMS_URL}/api/v1/webhook-endpoints`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"url": "https://api.example.com/lms/events",
"eventTypes": [
"enrollment.completed",
"certificate.issued"
]
}),
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const res = await fetch(`${LMS_URL}/api/v1/webhook-endpoints`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"url": "https://api.example.com/lms/events",
"eventTypes": [
"enrollment.completed",
"certificate.issued"
]
}),
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
res = requests.post(f"{LMS_URL}/api/v1/webhook-endpoints", headers=HEADERS, json={
"url": "https://api.example.com/lms/events",
"eventTypes": [
"enrollment.completed",
"certificate.issued",
],
}, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String body = """
{
"url": "https://api.example.com/lms/events",
"eventTypes": [
"enrollment.completed",
"certificate.issued"
]
}
""";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/webhook-endpoints"))
.header("X-API-Key", lmsKey)
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
uri = URI("#{lms_url}/api/v1/webhook-endpoints")
request = Net::HTTP::Post.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"), "Content-Type" => "application/json")
request.body = {
"url" => "https://api.example.com/lms/events",
"eventTypes" => [
"enrollment.completed",
"certificate.issued",
],
}.to_json
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$ch = curl_init("$lmsUrl/api/v1/webhook-endpoints");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
"url" => "https://api.example.com/lms/events",
"eventTypes" => [
"enrollment.completed",
"certificate.issued",
],
]),
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"url": "https://api.example.com/lms/events",
"eventTypes": [
"enrollment.completed",
"certificate.issued"
]
}`)
req, _ := http.NewRequest("POST", os.Getenv("LMS_URL") + "/api/v1/webhook-endpoints", body)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}Delete a webhook endpoint
AccessAdmin, or an API key with the write scope.
Stops delivery and deletes the endpoint's delivery history.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | string (uuid) | The id from a previous response. |
Responses
Errors
| Status | When |
|---|---|
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
| 404 | It doesn't exist, or it belongs to another tenant (the two look the same on purpose). |
Errors use RFC 9457 problem details.
WEBHOOK_ENDPOINT_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X DELETE "$LMS_URL/api/v1/webhook-endpoints/$WEBHOOK_ENDPOINT_ID" \
-H "X-API-Key: $LMS_KEY"const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/webhook-endpoints/${webhookEndpointId}`, {
method: 'DELETE',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/webhook-endpoints/${webhookEndpointId}`, {
method: 'DELETE',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
webhook_endpoint_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
res = requests.delete(f"{LMS_URL}/api/v1/webhook-endpoints/{webhook_endpoint_id}", headers=HEADERS, timeout=10)
res.raise_for_status()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/webhook-endpoints/" + webhookEndpointId))
.header("X-API-Key", lmsKey)
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
webhook_endpoint_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
uri = URI("#{lms_url}/api/v1/webhook-endpoints/#{webhook_endpoint_id}")
request = Net::HTTP::Delete.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"))
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)<?php
$lmsUrl = getenv('LMS_URL');
$webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560";
$ch = curl_init("$lmsUrl/api/v1/webhook-endpoints/{$webhookEndpointId}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY')],
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
webhookEndpointId := "37386ae0-0ea5-44e0-a02e-161f807af560"
req, _ := http.NewRequest("DELETE", os.Getenv("LMS_URL") + "/api/v1/webhook-endpoints/" + webhookEndpointId, nil)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
_ = data
}Delivery history
AccessAdmin, or an API key with the read or write scope.
The most recent 100 deliveries to this endpoint with status (PENDING, DELIVERED, FAILED), attempts and the last error.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | string (uuid) | The id from a previous response. |
Responses
Example response
[
{
"attempts": 1,
"deliveredAt": "2026-11-25T14:03:11Z",
"eventId": "8f3712f2-7b06-4b52-a94f-571d8e0275ca",
"eventType": "enrollment.completed",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"lastError": "string",
"lastStatus": 1,
"nextAttemptAt": "2026-11-25T14:03:11Z",
"status": "ACTIVE"
}
]Errors
| Status | When |
|---|---|
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
| 404 | It doesn't exist, or it belongs to another tenant (the two look the same on purpose). |
Errors use RFC 9457 problem details.
WEBHOOK_ENDPOINT_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X GET "$LMS_URL/api/v1/webhook-endpoints/$WEBHOOK_ENDPOINT_ID/deliveries" \
-H "X-API-Key: $LMS_KEY"const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/webhook-endpoints/${webhookEndpointId}/deliveries`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/webhook-endpoints/${webhookEndpointId}/deliveries`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
webhook_endpoint_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
res = requests.get(f"{LMS_URL}/api/v1/webhook-endpoints/{webhook_endpoint_id}/deliveries", headers=HEADERS, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/webhook-endpoints/" + webhookEndpointId + "/deliveries"))
.header("X-API-Key", lmsKey)
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
webhook_endpoint_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
uri = URI("#{lms_url}/api/v1/webhook-endpoints/#{webhook_endpoint_id}/deliveries")
request = Net::HTTP::Get.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"))
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560";
$ch = curl_init("$lmsUrl/api/v1/webhook-endpoints/{$webhookEndpointId}/deliveries");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY')],
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
webhookEndpointId := "37386ae0-0ea5-44e0-a02e-161f807af560"
req, _ := http.NewRequest("GET", os.Getenv("LMS_URL") + "/api/v1/webhook-endpoints/" + webhookEndpointId + "/deliveries", nil)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}Send a test event
AccessAdmin, or an API key with the write scope.
Queues a webhook.ping event to this endpoint only, so you can check your receiver and signature verification. It is delivered within a few seconds.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | string (uuid) | The id from a previous response. |
Responses
Errors
| Status | When |
|---|---|
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
| 404 | It doesn't exist, or it belongs to another tenant (the two look the same on purpose). |
Errors use RFC 9457 problem details.
WEBHOOK_ENDPOINT_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X POST "$LMS_URL/api/v1/webhook-endpoints/$WEBHOOK_ENDPOINT_ID/ping" \
-H "X-API-Key: $LMS_KEY"const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/webhook-endpoints/${webhookEndpointId}/ping`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/webhook-endpoints/${webhookEndpointId}/ping`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
webhook_endpoint_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
res = requests.post(f"{LMS_URL}/api/v1/webhook-endpoints/{webhook_endpoint_id}/ping", headers=HEADERS, timeout=10)
res.raise_for_status()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/webhook-endpoints/" + webhookEndpointId + "/ping"))
.header("X-API-Key", lmsKey)
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
webhook_endpoint_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
uri = URI("#{lms_url}/api/v1/webhook-endpoints/#{webhook_endpoint_id}/ping")
request = Net::HTTP::Post.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"))
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)<?php
$lmsUrl = getenv('LMS_URL');
$webhookEndpointId = "37386ae0-0ea5-44e0-a02e-161f807af560";
$ch = curl_init("$lmsUrl/api/v1/webhook-endpoints/{$webhookEndpointId}/ping");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY')],
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
webhookEndpointId := "37386ae0-0ea5-44e0-a02e-161f807af560"
req, _ := http.NewRequest("POST", os.Getenv("LMS_URL") + "/api/v1/webhook-endpoints/" + webhookEndpointId + "/ping", nil)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
_ = data
}