curl --request PATCH \
--url 'https://api.noresponse.org/v1/workspaces/tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM/keys/01JA2ZE4K5M6N7P8Q9R0S1T2V3' \
--header "Authorization: Bearer $NORESPONSE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"denied_actions": [
"policy.publish"
]
}'
import { NoResponse } from "@noresponse/node";
const noResponse = new NoResponse({
apiKey: process.env["NORESPONSE_API_KEY"] ?? "",
});
async function run() {
const result = await noResponse.keys.updateAccess({
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
keyId: "01JA2ZE4K5M6N7P8Q9R0S1T2V3",
body: {
deniedActions: [
"policy.publish",
],
},
});
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.update_access(workspace_id="tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", key_id="01JA2ZE4K5M6N7P8Q9R0S1T2V3", denied_actions=[
"policy.publish",
])
# Handle response
print(res)
package main
import(
"context"
"os"
noresponse "github.com/noresponsehq/go/v14"
"github.com/noresponsehq/go/v14/models/components"
"log"
)
func main() {
ctx := context.Background()
s := noresponse.New(
noresponse.WithSecurity(os.Getenv("NORESPONSE_API_KEY")),
)
res, err := s.Keys.UpdateAccess(ctx, "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", "01JA2ZE4K5M6N7P8Q9R0S1T2V3", components.KeyAccessRequest{
DeniedActions: []components.KeyAccessRequestDeniedAction{
components.KeyAccessRequestDeniedActionPolicyPublish,
},
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
package hello.world;
import java.lang.Exception;
import java.util.List;
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.UpdateKeyAccessResponse;
import org.noresponse.models.shared.KeyAccessRequest;
import org.noresponse.models.shared.KeyAccessRequestDeniedAction;
public class Application {
public static void main(String[] args) throws Exception {
NoResponse sdk = NoResponse.builder()
.apiKey(System.getenv().getOrDefault("NORESPONSE_API_KEY", ""))
.build();
UpdateKeyAccessResponse res = sdk.keys().updateAccess()
.workspaceId("tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM")
.keyId("01JA2ZE4K5M6N7P8Q9R0S1T2V3")
.body(KeyAccessRequest.builder()
.deniedActions(List.of(
KeyAccessRequestDeniedAction.POLICY_PUBLISH))
.build())
.call();
if (res.key().isPresent()) {
System.out.println(res.key().get());
}
}
}
using NoResponse;
using NoResponse.Models.Shared;
using System;
using System.Collections.Generic;
var sdk = new NoResponseClient(apiKey: Environment.GetEnvironmentVariable("NORESPONSE_API_KEY"));
var res = await sdk.Keys.UpdateAccessAsync(
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
keyId: "01JA2ZE4K5M6N7P8Q9R0S1T2V3",
body: new KeyAccessRequest() {
DeniedActions = new List<KeyAccessRequestDeniedAction>() {
KeyAccessRequestDeniedAction.PolicyPublish,
},
}
);
// 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\KeyAccessRequest(
deniedActions: [
Shared\KeyAccessRequestDeniedAction::PolicyPublish,
],
);
$response = $sdk->keys->updateAccess(
workspaceId: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM',
keyId: '01JA2ZE4K5M6N7P8Q9R0S1T2V3',
body: $body
);
$result = $response->result;
// handle response
require 'noresponse'
Models = ::NoResponse::Models
s = ::NoResponse::NoResponseClient.new(
api_key: ENV.fetch('NORESPONSE_API_KEY', '')
)
res = s.keys.update_access(workspace_id: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM', key_id: '01JA2ZE4K5M6N7P8Q9R0S1T2V3', body: Models::Shared::KeyAccessRequest.new(
denied_actions: [
Models::Shared::KeyAccessRequestDeniedAction::POLICY_PUBLISH,
]
))
unless res.nil?
# handle response
end
{
"id": "<string>",
"workspace_id": "<string>",
"environment": "live",
"prefix": "<string>",
"scopes": [
"assess"
],
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"revoked_by": "<string>",
"key": "<string>",
"name": "<string>",
"purpose": "<string>",
"kind": "service",
"owner_user_id": "<string>",
"rotated_to": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"denied_actions": [
"evidence.read"
]
}{
"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": 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": "<string>",
"title": "<string>",
"status": 503,
"detail": "<string>",
"code": "service_unavailable",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}Restrict an API key.
Replaces the explicit restrictions on an active key. Restrictions take effect on its next request and survive rotation. The issuer must be able to grant the resulting access in the key environment. A restricted caller cannot remove its own restrictions or grant unrestricted access to another key. Changes are audited without recording the secret.
curl --request PATCH \
--url 'https://api.noresponse.org/v1/workspaces/tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM/keys/01JA2ZE4K5M6N7P8Q9R0S1T2V3' \
--header "Authorization: Bearer $NORESPONSE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"denied_actions": [
"policy.publish"
]
}'
import { NoResponse } from "@noresponse/node";
const noResponse = new NoResponse({
apiKey: process.env["NORESPONSE_API_KEY"] ?? "",
});
async function run() {
const result = await noResponse.keys.updateAccess({
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
keyId: "01JA2ZE4K5M6N7P8Q9R0S1T2V3",
body: {
deniedActions: [
"policy.publish",
],
},
});
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.update_access(workspace_id="tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", key_id="01JA2ZE4K5M6N7P8Q9R0S1T2V3", denied_actions=[
"policy.publish",
])
# Handle response
print(res)
package main
import(
"context"
"os"
noresponse "github.com/noresponsehq/go/v14"
"github.com/noresponsehq/go/v14/models/components"
"log"
)
func main() {
ctx := context.Background()
s := noresponse.New(
noresponse.WithSecurity(os.Getenv("NORESPONSE_API_KEY")),
)
res, err := s.Keys.UpdateAccess(ctx, "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", "01JA2ZE4K5M6N7P8Q9R0S1T2V3", components.KeyAccessRequest{
DeniedActions: []components.KeyAccessRequestDeniedAction{
components.KeyAccessRequestDeniedActionPolicyPublish,
},
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
package hello.world;
import java.lang.Exception;
import java.util.List;
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.UpdateKeyAccessResponse;
import org.noresponse.models.shared.KeyAccessRequest;
import org.noresponse.models.shared.KeyAccessRequestDeniedAction;
public class Application {
public static void main(String[] args) throws Exception {
NoResponse sdk = NoResponse.builder()
.apiKey(System.getenv().getOrDefault("NORESPONSE_API_KEY", ""))
.build();
UpdateKeyAccessResponse res = sdk.keys().updateAccess()
.workspaceId("tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM")
.keyId("01JA2ZE4K5M6N7P8Q9R0S1T2V3")
.body(KeyAccessRequest.builder()
.deniedActions(List.of(
KeyAccessRequestDeniedAction.POLICY_PUBLISH))
.build())
.call();
if (res.key().isPresent()) {
System.out.println(res.key().get());
}
}
}
using NoResponse;
using NoResponse.Models.Shared;
using System;
using System.Collections.Generic;
var sdk = new NoResponseClient(apiKey: Environment.GetEnvironmentVariable("NORESPONSE_API_KEY"));
var res = await sdk.Keys.UpdateAccessAsync(
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
keyId: "01JA2ZE4K5M6N7P8Q9R0S1T2V3",
body: new KeyAccessRequest() {
DeniedActions = new List<KeyAccessRequestDeniedAction>() {
KeyAccessRequestDeniedAction.PolicyPublish,
},
}
);
// 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\KeyAccessRequest(
deniedActions: [
Shared\KeyAccessRequestDeniedAction::PolicyPublish,
],
);
$response = $sdk->keys->updateAccess(
workspaceId: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM',
keyId: '01JA2ZE4K5M6N7P8Q9R0S1T2V3',
body: $body
);
$result = $response->result;
// handle response
require 'noresponse'
Models = ::NoResponse::Models
s = ::NoResponse::NoResponseClient.new(
api_key: ENV.fetch('NORESPONSE_API_KEY', '')
)
res = s.keys.update_access(workspace_id: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM', key_id: '01JA2ZE4K5M6N7P8Q9R0S1T2V3', body: Models::Shared::KeyAccessRequest.new(
denied_actions: [
Models::Shared::KeyAccessRequestDeniedAction::POLICY_PUBLISH,
]
))
unless res.nil?
# handle response
end
{
"id": "<string>",
"workspace_id": "<string>",
"environment": "live",
"prefix": "<string>",
"scopes": [
"assess"
],
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"revoked_by": "<string>",
"key": "<string>",
"name": "<string>",
"purpose": "<string>",
"kind": "service",
"owner_user_id": "<string>",
"rotated_to": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"denied_actions": [
"evidence.read"
]
}{
"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": 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": "<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. Account, audit and usage data stay within the key's environment. Dedicated team scopes apply across the workspace.
assess creates and reads assessments, records outcomes and reports key usage. investigate reads accounts, assessment history and request diagnostics without export or enforcement access. The legacy history scope also permits account exports, submitted identifiers and enforcement reports. delete permits account and assessment deletion.
evidence or detailed adds detailed merged evidence and submitted identifiers where the operation permits them. Neither grants access to the underlying resource alone. exports permits exports with the underlying account or audit scope. audit reads audit events and usage reads usage. audit_manage manages audit streams and retention, and includes audit-read and export authority.
webhooks manages webhook endpoints. integrations manages hosted auth-provider integrations. management manages keys, settings, lists, reviews and policy evaluations in the key's environment. New keys cannot exceed the issuer's effective permissions.
settings reads configuration, previews policy and list changes, runs evaluations and changes retention. Publishing decision policy or changing lists requires settings and policy_publish together, or the legacy management scope.
people reads people, groups and investigations with full evidence by default. people_write changes submitted people, groups and memberships. investigations starts or cancels jobs and screenings. decisions records reviews. exports with people-read access exports rosters. delete deletes people, groups and memberships. Existing groups keys retain non-destructive people access. Explicit evidence.read restrictions withhold collected records, posts, media, discovered identifiers and notes.
members reads the workspace directory. members_manage also administers non-owner members and invitations. These scopes require a live key issued by a current owner with access to both environments. They grant access across the workspace. management does not grant team access. API keys cannot change owners or accept invitations.
A missing, unknown, revoked or expired key answers 401. A valid key without a required scope 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}$Body
Response
The key with its updated restrictions. Changes take effect on its next request.
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 scopes, each at most once.
1 - 22 elementsassess, history, delete, webhooks, detailed, integrations, management, audit, usage, investigate, evidence, exports, audit_manage, settings, policy_publish, members, members_manage, groups, people, people_write, investigations, decisions Optional operational purpose, at most 200 printable characters without leading or trailing whitespace. Do not put secrets or personal data here. Preserved on rotation and included in the creation request fingerprint; omitted for older credentials.
1 - 200^[^\x00-\x1f\x7f-\x9f]+$Latest recorded authenticated request observation, updated at most once per minute. Capture is best effort after the response and includes authenticated requests refused by authorization or rate limits. Absence means unknown and does not prove the key was unused. It is independent of diagnostic retention and resets on the replacement key after rotation. This field retains no raw IP or user-agent.