curl --request DELETE \
--url 'https://api.noresponse.org/v1/workspaces/tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM/keys/01JA2ZE4K5M6N7P8Q9R0S1T2V3' \
--header "Authorization: Bearer $NORESPONSE_API_KEY"
import { NoResponse } from "@noresponse/node";
const noResponse = new NoResponse({
apiKey: process.env["NORESPONSE_API_KEY"] ?? "",
});
async function run() {
const result = await noResponse.keys.revoke({
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
keyId: "01JA2ZE4K5M6N7P8Q9R0S1T2V3",
});
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.keys.revoke(workspace_id="tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", key_id="01JA2ZE4K5M6N7P8Q9R0S1T2V3")
# Handle response
print(res)
package main
import(
"context"
"os"
noresponse "github.com/noresponsehq/go/v7"
"log"
)
func main() {
ctx := context.Background()
s := noresponse.New(
noresponse.WithSecurity(os.Getenv("NORESPONSE_API_KEY")),
)
res, err := s.Keys.Revoke(ctx, "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", "01JA2ZE4K5M6N7P8Q9R0S1T2V3")
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.RevokeKeyResponse;
public class Application {
public static void main(String[] args) throws Exception {
NoResponse sdk = NoResponse.builder()
.apiKey(System.getenv().getOrDefault("NORESPONSE_API_KEY", ""))
.build();
RevokeKeyResponse res = sdk.keys().revoke()
.workspaceId("tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM")
.keyId("01JA2ZE4K5M6N7P8Q9R0S1T2V3")
.call();
if (res.key().isPresent()) {
System.out.println(res.key().get());
}
}
}
using NoResponse;
using NoResponse.Models.Shared;
using System;
var sdk = new NoResponseClient(apiKey: Environment.GetEnvironmentVariable("NORESPONSE_API_KEY"));
var res = await sdk.Keys.RevokeAsync(
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
keyId: "01JA2ZE4K5M6N7P8Q9R0S1T2V3"
);
// handle response
<?php
declare(strict_types=1);
require 'vendor/autoload.php';
use NoResponse;
$sdk = NoResponse\NoResponseClient::builder()
->setSecurity(
getenv('NORESPONSE_API_KEY') ?: ''
)
->build();
$response = $sdk->keys->revoke(
workspaceId: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM',
keyId: '01JA2ZE4K5M6N7P8Q9R0S1T2V3'
);
if ($response->key !== null) {
// handle response
}
require 'noresponse'
Models = ::NoResponse::Models
s = ::NoResponse::NoResponseClient.new(
api_key: ENV.fetch('NORESPONSE_API_KEY', '')
)
res = s.keys.revoke(workspace_id: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM', key_id: '01JA2ZE4K5M6N7P8Q9R0S1T2V3')
unless res.nil?
# handle response
end
{
"id": "01JA2ZE4K5M6N7P8Q9R0S1T2V3",
"workspace_id": "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
"environment": "live",
"prefix": "nrk_live_01JA2ZE4K5M6N7P8Q9R0S1T2V3",
"scopes": [
"assess"
],
"status": "revoked",
"created_at": "2026-10-23T09:00:00.000Z",
"created_by": "user_2abc",
"revoked_at": "2026-10-23T10:00:00.000Z",
"revoked_by": "user_2abc"
}{
"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": "<string>",
"title": "<string>",
"status": 403,
"detail": "<string>",
"code": "workspace_forbidden",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"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": "<string>",
"title": "<string>",
"status": 409,
"detail": "<string>",
"code": "self_revocation",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 503,
"detail": "<string>",
"code": "service_unavailable",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}Revoke an API key
Revokes a key at once: its next request answers 401. revoked_by is the signing key’s prefix. Revoking a revoked key changes nothing and answers the key as it was revoked.
A key cannot revoke itself (409 self_revocation): rotate it with POST /v1/keys/rotate, or revoke it with another management key. So a revocation made with a key always leaves a management key in the environment. Requires the management scope, and acts only in the signing key’s own workspace and environment: another workspace and the other environment answer 404.
curl --request DELETE \
--url 'https://api.noresponse.org/v1/workspaces/tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM/keys/01JA2ZE4K5M6N7P8Q9R0S1T2V3' \
--header "Authorization: Bearer $NORESPONSE_API_KEY"
import { NoResponse } from "@noresponse/node";
const noResponse = new NoResponse({
apiKey: process.env["NORESPONSE_API_KEY"] ?? "",
});
async function run() {
const result = await noResponse.keys.revoke({
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
keyId: "01JA2ZE4K5M6N7P8Q9R0S1T2V3",
});
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.keys.revoke(workspace_id="tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", key_id="01JA2ZE4K5M6N7P8Q9R0S1T2V3")
# Handle response
print(res)
package main
import(
"context"
"os"
noresponse "github.com/noresponsehq/go/v7"
"log"
)
func main() {
ctx := context.Background()
s := noresponse.New(
noresponse.WithSecurity(os.Getenv("NORESPONSE_API_KEY")),
)
res, err := s.Keys.Revoke(ctx, "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", "01JA2ZE4K5M6N7P8Q9R0S1T2V3")
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.RevokeKeyResponse;
public class Application {
public static void main(String[] args) throws Exception {
NoResponse sdk = NoResponse.builder()
.apiKey(System.getenv().getOrDefault("NORESPONSE_API_KEY", ""))
.build();
RevokeKeyResponse res = sdk.keys().revoke()
.workspaceId("tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM")
.keyId("01JA2ZE4K5M6N7P8Q9R0S1T2V3")
.call();
if (res.key().isPresent()) {
System.out.println(res.key().get());
}
}
}
using NoResponse;
using NoResponse.Models.Shared;
using System;
var sdk = new NoResponseClient(apiKey: Environment.GetEnvironmentVariable("NORESPONSE_API_KEY"));
var res = await sdk.Keys.RevokeAsync(
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
keyId: "01JA2ZE4K5M6N7P8Q9R0S1T2V3"
);
// handle response
<?php
declare(strict_types=1);
require 'vendor/autoload.php';
use NoResponse;
$sdk = NoResponse\NoResponseClient::builder()
->setSecurity(
getenv('NORESPONSE_API_KEY') ?: ''
)
->build();
$response = $sdk->keys->revoke(
workspaceId: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM',
keyId: '01JA2ZE4K5M6N7P8Q9R0S1T2V3'
);
if ($response->key !== null) {
// handle response
}
require 'noresponse'
Models = ::NoResponse::Models
s = ::NoResponse::NoResponseClient.new(
api_key: ENV.fetch('NORESPONSE_API_KEY', '')
)
res = s.keys.revoke(workspace_id: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM', key_id: '01JA2ZE4K5M6N7P8Q9R0S1T2V3')
unless res.nil?
# handle response
end
{
"id": "01JA2ZE4K5M6N7P8Q9R0S1T2V3",
"workspace_id": "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
"environment": "live",
"prefix": "nrk_live_01JA2ZE4K5M6N7P8Q9R0S1T2V3",
"scopes": [
"assess"
],
"status": "revoked",
"created_at": "2026-10-23T09:00:00.000Z",
"created_by": "user_2abc",
"revoked_at": "2026-10-23T10:00:00.000Z",
"revoked_by": "user_2abc"
}{
"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": "<string>",
"title": "<string>",
"status": 403,
"detail": "<string>",
"code": "workspace_forbidden",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"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": "<string>",
"title": "<string>",
"status": 409,
"detail": "<string>",
"code": "self_revocation",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"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, the accounts whose risk changed and an account's history, records enforcements and erases an account; detailed adds the detailed view; webhooks registers, tests, rotates and deletes webhook endpoints; integrations registers and manages hosted provider integrations; management creates, lists and revokes the keys of its own environment and reads and changes that environment's settings. A missing, unknown, revoked or expired key answers 401. A valid key without the scope an operation needs answers 403.
Path Parameters
The workspace id. A workspace the acting user is not an active member of answers 404, as do another workspace than an API key's own, a malformed id and a test environment's id. The workspace id, which is also its live environment's workspace id; the test environment's is the same id with:test appended. A workspace created through the API is tnt_ and a 26-character ULID.
^[A-Za-z0-9][A-Za-z0-9_.-]{0,122}$The key's id. A key of another workspace answers 404, as does a key of the other environment to an API key. The key's public id, a 26-character ULID.
^[0-7][0-9A-HJKMNP-TV-Z]{25}$Response
The key, revoked. Its next request answers 401. Revoking a revoked key answers it as it was first revoked.
One API key of a workspace, as the console shows it. A key belongs to exactly one environment. Every other field is safe to show.
The key's public id, a 26-character ULID.
^[0-7][0-9A-HJKMNP-TV-Z]{25}$The workspace id, which is also its live environment's workspace id; the test environment's is the same id with:test appended. A workspace created through the API is tnt_ and a 26-character ULID.
^[A-Za-z0-9][A-Za-z0-9_.-]{0,122}$The environment the key belongs to. A live key assesses with live sources; a test key answers from the deterministic simulator.
live, test The public start of the credential, nrk__, which identifies the key in logs and secret stores without its secret.
^nrk_(live|test)_[0-7][0-9A-HJKMNP-TV-Z]{25}$The key's scopes, each at most once.
1 - 7 elementsassess, history, delete, webhooks, detailed, integrations, management active: the key authenticates. expired: a rotation's overlap window has ended (expires_at). revoked: the key was revoked (revoked_at) and answers 401.
active, expired, revoked The external user id of the member who created the key through the console, or the prefix (nrk__) of the management key that created it. Absent for a key NoResponse issued or a rotation made.
1 - 256^[!-~]{1,256}$When a rotated key stops authenticating (POST /v1/keys/rotate). Absent for a key with no end.
The external user id of the member who revoked the key through the console, or the prefix of the management key that revoked it. Absent when the key is not revoked or NoResponse revoked it.
1 - 256^[!-~]{1,256}$The credential, nrk_. Present only in the 201 answer that created the key.
^nrk_(live|test)_[0-7][0-9A-HJKMNP-TV-Z]{25}_[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$