curl --request POST \
--url 'https://api.noresponse.org/v1/webhooks/whe_01JA2ZD0E1F2G3H4J5K6M7N8P9/deliveries/evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2/replay' \
--header "Authorization: Bearer $NORESPONSE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{}'
import { NoResponse } from "@noresponse/node";
const noResponse = new NoResponse({
apiKey: process.env["NORESPONSE_API_KEY"] ?? "",
});
async function run() {
const result = await noResponse.webhookEndpoints.replayDelivery({
endpointId: "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9",
eventId: "evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2",
body: {},
});
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.replay_delivery(endpoint_id="whe_01JA2ZD0E1F2G3H4J5K6M7N8P9", event_id="evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2", body={})
# 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.ReplayDelivery(ctx, "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9", "evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2", components.WebhookReplayRequest{})
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.ReplayWebhookDeliveryResponse;
import org.noresponse.models.shared.WebhookReplayRequest;
public class Application {
public static void main(String[] args) throws Exception {
NoResponse sdk = NoResponse.builder()
.apiKey(System.getenv().getOrDefault("NORESPONSE_API_KEY", ""))
.build();
ReplayWebhookDeliveryResponse res = sdk.webhookEndpoints().replayDelivery()
.endpointId("whe_01JA2ZD0E1F2G3H4J5K6M7N8P9")
.eventId("evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2")
.body(WebhookReplayRequest.builder()
.build())
.call();
if (res.webhookReplay().isPresent()) {
System.out.println(res.webhookReplay().get());
}
}
}
using NoResponse;
using NoResponse.Models.Shared;
using System;
var sdk = new NoResponseClient(apiKey: Environment.GetEnvironmentVariable("NORESPONSE_API_KEY"));
var res = await sdk.WebhookEndpoints.ReplayDeliveryAsync(
endpointId: "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9",
eventId: "evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2",
body: new WebhookReplayRequest() {}
);
// 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\WebhookReplayRequest();
$response = $sdk->webhookEndpoints->replayDelivery(
endpointId: 'whe_01JA2ZD0E1F2G3H4J5K6M7N8P9',
eventId: 'evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2',
body: $body
);
if ($response->webhookReplay !== null) {
// handle response
}
require 'noresponse'
Models = ::NoResponse::Models
s = ::NoResponse::NoResponseClient.new(
api_key: ENV.fetch('NORESPONSE_API_KEY', '')
)
res = s.webhook_endpoints.replay_delivery(endpoint_id: 'whe_01JA2ZD0E1F2G3H4J5K6M7N8P9', event_id: 'evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2', body: Models::Shared::WebhookReplayRequest.new)
unless res.nil?
# handle response
end
{
"endpoint_id": "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9",
"event_id": "evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2",
"event_type": "assessment.updated"
}{
"type": "<string>",
"title": "<string>",
"status": 400,
"detail": "<string>",
"code": "invalid_request",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 401,
"detail": "<string>",
"code": "unauthorized",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "https://docs.noresponse.org/problems/workspace-forbidden",
"title": "Forbidden",
"status": 403,
"detail": "The API key does not carry a scope this operation accepts.",
"code": "workspace_forbidden",
"request_id": "0123456789abcdef0123456789abcdef"
}{
"type": "<string>",
"title": "<string>",
"status": 404,
"detail": "<string>",
"code": "not_found",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "https://docs.noresponse.org/problems/webhook-endpoint-unverified",
"title": "Webhook endpoint unverified",
"status": 409,
"detail": "The endpoint is not verified; send endpoint.verification first.",
"code": "webhook_endpoint_unverified",
"request_id": "0123456789abcdef0123456789abcdef"
}{
"type": "<string>",
"title": "<string>",
"status": 413,
"detail": "<string>",
"code": "payload_too_large",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 415,
"detail": "<string>",
"code": "unsupported_media_type",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "https://docs.noresponse.org/problems/rate-limited",
"title": "Rate limited",
"status": 429,
"detail": "The tenant's assessment rate is exhausted; retry after the Retry-After interval.",
"code": "rate_limited",
"request_id": "0123456789abcdef0123456789abcdef"
}{
"type": "<string>",
"title": "<string>",
"status": 503,
"detail": "<string>",
"code": "service_unavailable",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}Replay a delivery
Queues the event for the endpoint again: the same event_id and the same body it received, with a new NR-Webhook-Timestamp and a signature from the endpoint’s current signing key. It is retried like any other delivery, and its attempts are listed with "replay": true.
Your receiver deduplicates on the event id, so replaying an event it already processed changes nothing. The endpoint must be verified (409 webhook_endpoint_unverified otherwise), and an event that is not in the endpoint’s log answers 404. Each call sends the event again. Requires the webhooks scope.
curl --request POST \
--url 'https://api.noresponse.org/v1/webhooks/whe_01JA2ZD0E1F2G3H4J5K6M7N8P9/deliveries/evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2/replay' \
--header "Authorization: Bearer $NORESPONSE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{}'
import { NoResponse } from "@noresponse/node";
const noResponse = new NoResponse({
apiKey: process.env["NORESPONSE_API_KEY"] ?? "",
});
async function run() {
const result = await noResponse.webhookEndpoints.replayDelivery({
endpointId: "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9",
eventId: "evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2",
body: {},
});
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.replay_delivery(endpoint_id="whe_01JA2ZD0E1F2G3H4J5K6M7N8P9", event_id="evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2", body={})
# 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.ReplayDelivery(ctx, "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9", "evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2", components.WebhookReplayRequest{})
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.ReplayWebhookDeliveryResponse;
import org.noresponse.models.shared.WebhookReplayRequest;
public class Application {
public static void main(String[] args) throws Exception {
NoResponse sdk = NoResponse.builder()
.apiKey(System.getenv().getOrDefault("NORESPONSE_API_KEY", ""))
.build();
ReplayWebhookDeliveryResponse res = sdk.webhookEndpoints().replayDelivery()
.endpointId("whe_01JA2ZD0E1F2G3H4J5K6M7N8P9")
.eventId("evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2")
.body(WebhookReplayRequest.builder()
.build())
.call();
if (res.webhookReplay().isPresent()) {
System.out.println(res.webhookReplay().get());
}
}
}
using NoResponse;
using NoResponse.Models.Shared;
using System;
var sdk = new NoResponseClient(apiKey: Environment.GetEnvironmentVariable("NORESPONSE_API_KEY"));
var res = await sdk.WebhookEndpoints.ReplayDeliveryAsync(
endpointId: "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9",
eventId: "evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2",
body: new WebhookReplayRequest() {}
);
// 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\WebhookReplayRequest();
$response = $sdk->webhookEndpoints->replayDelivery(
endpointId: 'whe_01JA2ZD0E1F2G3H4J5K6M7N8P9',
eventId: 'evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2',
body: $body
);
if ($response->webhookReplay !== null) {
// handle response
}
require 'noresponse'
Models = ::NoResponse::Models
s = ::NoResponse::NoResponseClient.new(
api_key: ENV.fetch('NORESPONSE_API_KEY', '')
)
res = s.webhook_endpoints.replay_delivery(endpoint_id: 'whe_01JA2ZD0E1F2G3H4J5K6M7N8P9', event_id: 'evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2', body: Models::Shared::WebhookReplayRequest.new)
unless res.nil?
# handle response
end
{
"endpoint_id": "whe_01JA2ZD0E1F2G3H4J5K6M7N8P9",
"event_id": "evt_01JA2ZD3K4M5N6P7Q8R9S0T1V2",
"event_type": "assessment.updated"
}{
"type": "<string>",
"title": "<string>",
"status": 400,
"detail": "<string>",
"code": "invalid_request",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 401,
"detail": "<string>",
"code": "unauthorized",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "https://docs.noresponse.org/problems/workspace-forbidden",
"title": "Forbidden",
"status": 403,
"detail": "The API key does not carry a scope this operation accepts.",
"code": "workspace_forbidden",
"request_id": "0123456789abcdef0123456789abcdef"
}{
"type": "<string>",
"title": "<string>",
"status": 404,
"detail": "<string>",
"code": "not_found",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "https://docs.noresponse.org/problems/webhook-endpoint-unverified",
"title": "Webhook endpoint unverified",
"status": 409,
"detail": "The endpoint is not verified; send endpoint.verification first.",
"code": "webhook_endpoint_unverified",
"request_id": "0123456789abcdef0123456789abcdef"
}{
"type": "<string>",
"title": "<string>",
"status": 413,
"detail": "<string>",
"code": "payload_too_large",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 415,
"detail": "<string>",
"code": "unsupported_media_type",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "https://docs.noresponse.org/problems/rate-limited",
"title": "Rate limited",
"status": 429,
"detail": "The tenant's assessment rate is exhausted; retry after the Retry-After interval.",
"code": "rate_limited",
"request_id": "0123456789abcdef0123456789abcdef"
}{
"type": "<string>",
"title": "<string>",
"status": 503,
"detail": "<string>",
"code": "service_unavailable",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}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}$The evt_ id of a delivery the endpoint's log holds, as GET /v1/webhooks/{endpoint_id}/deliveries lists it. An id that is malformed, not sent to this endpoint, past the log's retention or another workspace's answers 404. Opaque, workspace-scoped webhook event id. A redelivery of the same event carries the same event_id, so consumers deduplicate on it.
^evt_[0-9A-HJKMNP-TV-Z]{26}$Body
POST /v1/webhooks/{endpoint_id}/deliveries/{event_id}/replay body: an empty object.
Response
The event is queued to be sent again.
The 202 answer of POST /v1/webhooks/{endpoint_id}/deliveries/{event_id}/replay: the event queued to be sent again.
Opaque id of the endpoint registration.
^whe_[0-9A-HJKMNP-TV-Z]{26}$The replayed event's id. The receiver sees the same id and body as the first time, with a new NR-Webhook-Timestamp and signature.
^evt_[0-9A-HJKMNP-TV-Z]{26}$The event's type, as its body's type: assessment.updated, account.deleted or account.risk_changed.
^[a-z]+(\.[a-z_]+)+$