curl --request POST \
--url 'https://api.noresponse.org/v1/webhooks/whe_01JA2ZD0E1F2G3H4J5K6M7N8P9/test' \
--header "Authorization: Bearer $NORESPONSE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"event": "endpoint.verification"
}'
import { NoResponse } from "@noresponse/node";
const noResponse = new NoResponse({
apiKey: process.env["NORESPONSE_API_KEY"] ?? "",
});
async function run() {
const result = await noResponse.webhookEndpoints.sendTestEvent({
endpointId: "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9",
body: {
event: "endpoint.verification",
},
});
console.log(result);
}
run();
from noresponse import NoResponse
import os
with NoResponse(
api_key=os.getenv("NORESPONSE_API_KEY", ""),
) as no_response:
res = no_response.webhook_endpoints.send_test_event(endpoint_id="whe_01JA2ZD0E1F2G3H4J5K6M7N8P9", event="endpoint.verification")
# Handle response
print(res)
package main
import(
"context"
"os"
noresponse "github.com/noresponsehq/go/v5"
"github.com/noresponsehq/go/v5/models/components"
"log"
)
func main() {
ctx := context.Background()
s := noresponse.New(
noresponse.WithSecurity(os.Getenv("NORESPONSE_API_KEY")),
)
res, err := s.WebhookEndpoints.SendTestEvent(ctx, "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9", components.WebhookTestRequest{
Event: components.WebhookTestRequestEventEndpointVerification,
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
package hello.world;
import java.lang.Exception;
import org.noresponse.NoResponse;
import org.noresponse.models.errors.AuthenticationException;
import org.noresponse.models.errors.BadRequestException;
import org.noresponse.models.errors.ConflictException;
import org.noresponse.models.errors.NotFoundException;
import org.noresponse.models.errors.PermissionDeniedException;
import org.noresponse.models.errors.RateLimitException;
import org.noresponse.models.operations.SendWebhookTestEventResponse;
import org.noresponse.models.shared.WebhookTestRequest;
import org.noresponse.models.shared.WebhookTestRequestEvent;
public class Application {
public static void main(String[] args) throws Exception {
NoResponse sdk = NoResponse.builder()
.apiKey(System.getenv().getOrDefault("NORESPONSE_API_KEY", ""))
.build();
SendWebhookTestEventResponse res = sdk.webhookEndpoints().sendTestEvent()
.endpointId("whe_01JA2ZD0E1F2G3H4J5K6M7N8P9")
.body(WebhookTestRequest.builder()
.event(WebhookTestRequestEvent.ENDPOINT_VERIFICATION)
.build())
.call();
if (res.webhookTest().isPresent()) {
System.out.println(res.webhookTest().get());
}
}
}
using NoResponse;
using NoResponse.Models.Shared;
using System;
var sdk = new NoResponseClient(apiKey: Environment.GetEnvironmentVariable("NORESPONSE_API_KEY"));
var res = await sdk.WebhookEndpoints.SendTestEventAsync(
endpointId: "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9",
body: new WebhookTestRequest() {
Event = WebhookTestRequestEvent.EndpointVerification,
}
);
// handle response
<?php
declare(strict_types=1);
require 'vendor/autoload.php';
use NoResponse;
use NoResponse\Models\Shared;
$sdk = NoResponse\NoResponseClient::builder()
->setSecurity(
getenv('NORESPONSE_API_KEY') ?: ''
)
->build();
$body = new Shared\WebhookTestRequest(
event: Shared\WebhookTestRequestEvent::EndpointVerification,
);
$response = $sdk->webhookEndpoints->sendTestEvent(
endpointId: 'whe_01JA2ZD0E1F2G3H4J5K6M7N8P9',
body: $body
);
if ($response->webhookTest !== null) {
// handle response
}
require 'noresponse'
Models = ::NoResponse::Models
s = ::NoResponse::NoResponseClient.new(
api_key: ENV.fetch('NORESPONSE_API_KEY', '')
)
res = s.webhook_endpoints.send_test_event(endpoint_id: 'whe_01JA2ZD0E1F2G3H4J5K6M7N8P9', body: Models::Shared::WebhookTestRequest.new(
event: Models::Shared::WebhookTestRequestEvent::ENDPOINT_VERIFICATION
))
unless res.nil?
# handle response
end
Send a test event
endpoint.verification sends a signed challenge now and answers whether the endpoint echoed it within 5 seconds. An echo verifies the endpoint, including one that was disabled.
assessment.updated queues one signed event with "test": true and a fixed example assessment in the endpoint’s response mode. It is delivered and retried like any other event, and needs a verified endpoint.
Both are signed with the endpoint’s current key. Requires the webhooks scope.
curl --request POST \
--url 'https://api.noresponse.org/v1/webhooks/whe_01JA2ZD0E1F2G3H4J5K6M7N8P9/test' \
--header "Authorization: Bearer $NORESPONSE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"event": "endpoint.verification"
}'
import { NoResponse } from "@noresponse/node";
const noResponse = new NoResponse({
apiKey: process.env["NORESPONSE_API_KEY"] ?? "",
});
async function run() {
const result = await noResponse.webhookEndpoints.sendTestEvent({
endpointId: "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9",
body: {
event: "endpoint.verification",
},
});
console.log(result);
}
run();
from noresponse import NoResponse
import os
with NoResponse(
api_key=os.getenv("NORESPONSE_API_KEY", ""),
) as no_response:
res = no_response.webhook_endpoints.send_test_event(endpoint_id="whe_01JA2ZD0E1F2G3H4J5K6M7N8P9", event="endpoint.verification")
# Handle response
print(res)
package main
import(
"context"
"os"
noresponse "github.com/noresponsehq/go/v5"
"github.com/noresponsehq/go/v5/models/components"
"log"
)
func main() {
ctx := context.Background()
s := noresponse.New(
noresponse.WithSecurity(os.Getenv("NORESPONSE_API_KEY")),
)
res, err := s.WebhookEndpoints.SendTestEvent(ctx, "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9", components.WebhookTestRequest{
Event: components.WebhookTestRequestEventEndpointVerification,
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
package hello.world;
import java.lang.Exception;
import org.noresponse.NoResponse;
import org.noresponse.models.errors.AuthenticationException;
import org.noresponse.models.errors.BadRequestException;
import org.noresponse.models.errors.ConflictException;
import org.noresponse.models.errors.NotFoundException;
import org.noresponse.models.errors.PermissionDeniedException;
import org.noresponse.models.errors.RateLimitException;
import org.noresponse.models.operations.SendWebhookTestEventResponse;
import org.noresponse.models.shared.WebhookTestRequest;
import org.noresponse.models.shared.WebhookTestRequestEvent;
public class Application {
public static void main(String[] args) throws Exception {
NoResponse sdk = NoResponse.builder()
.apiKey(System.getenv().getOrDefault("NORESPONSE_API_KEY", ""))
.build();
SendWebhookTestEventResponse res = sdk.webhookEndpoints().sendTestEvent()
.endpointId("whe_01JA2ZD0E1F2G3H4J5K6M7N8P9")
.body(WebhookTestRequest.builder()
.event(WebhookTestRequestEvent.ENDPOINT_VERIFICATION)
.build())
.call();
if (res.webhookTest().isPresent()) {
System.out.println(res.webhookTest().get());
}
}
}
using NoResponse;
using NoResponse.Models.Shared;
using System;
var sdk = new NoResponseClient(apiKey: Environment.GetEnvironmentVariable("NORESPONSE_API_KEY"));
var res = await sdk.WebhookEndpoints.SendTestEventAsync(
endpointId: "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9",
body: new WebhookTestRequest() {
Event = WebhookTestRequestEvent.EndpointVerification,
}
);
// handle response
<?php
declare(strict_types=1);
require 'vendor/autoload.php';
use NoResponse;
use NoResponse\Models\Shared;
$sdk = NoResponse\NoResponseClient::builder()
->setSecurity(
getenv('NORESPONSE_API_KEY') ?: ''
)
->build();
$body = new Shared\WebhookTestRequest(
event: Shared\WebhookTestRequestEvent::EndpointVerification,
);
$response = $sdk->webhookEndpoints->sendTestEvent(
endpointId: 'whe_01JA2ZD0E1F2G3H4J5K6M7N8P9',
body: $body
);
if ($response->webhookTest !== null) {
// handle response
}
require 'noresponse'
Models = ::NoResponse::Models
s = ::NoResponse::NoResponseClient.new(
api_key: ENV.fetch('NORESPONSE_API_KEY', '')
)
res = s.webhook_endpoints.send_test_event(endpoint_id: 'whe_01JA2ZD0E1F2G3H4J5K6M7N8P9', body: Models::Shared::WebhookTestRequest.new(
event: Models::Shared::WebhookTestRequestEvent::ENDPOINT_VERIFICATION
))
unless res.nil?
# handle response
end
Authorizations
Your API key, sent as Authorization: Bearer <key>. A key is nrk_live_ or nrk_test_, a 26-character key id, _ and a 43-character secret. A key sees only its own environment's data.
Each key has one or more scopes: assess creates and reads assessments, records outcomes and reports key usage; history reads assessments, an account's current risk and an account's history, and erases an account; detailed adds the detailed view; webhooks registers, tests, rotates and deletes webhook endpoints; integrations registers and manages hosted provider integrations. A missing, unknown, revoked or expired key answers 401. A valid key without the scope an operation needs answers 403.
Path Parameters
The endpoint's whe_ id. An id that is unknown, malformed or another workspace's answers 404. Opaque id of the endpoint registration.
^whe_[0-9A-HJKMNP-TV-Z]{26}$Body
POST /v1/webhooks/{endpoint_id}/test body: which event to send.
endpoint.verification sends a fresh challenge now, in this call, and the endpoint is verified if it echoes it. assessment.updated queues an event whose data is a fixed example assessment, with test true, delivered and retried like any other; the endpoint must be verified.
endpoint.verification, assessment.updated Response
The test event: sent, for endpoint.verification, or queued for delivery, for assessment.updated.
The 202 answer of POST /v1/webhooks/{endpoint_id}/test: the event that was sent or queued.
The event id the receiver sees as NR-Webhook-Id and as the body's id.
^evt_[0-9A-HJKMNP-TV-Z]{26}$Opaque id of the endpoint registration.
^whe_[0-9A-HJKMNP-TV-Z]{26}$endpoint.verification, assessment.updated The endpoint's state after this call.
unverified, verified, disabled endpoint.verification only: true when the endpoint echoed the challenge within 5 seconds. A false answer leaves the endpoint's state as it was.