> ## Documentation Index > Fetch the complete documentation index at: https://docs.plainid.io/llms.txt > Use this file to discover all available pages before exploring further. # Regenerate Scope Secret Key > This API call generates a managed Scope Secret key and returns the value. ## OpenAPI ````json POST /api/1.0/scope-operations/{envId}/{scopeId}/secret-keys/{keyId}/regenerate { "openapi": "3.0.3", "info": { "title": "Management APIs", "version": "1.0.0", "contact": { "name": "PlainID", "url": "https://plainid.com", "email": "contact@plainid.com" }, "license": { "name": "Commercial", "url": "https://plainid.com/license" }, "termsOfService": "https://www.plainid.com/terms/", "description": "

The PlainID Authorization Platform provides Management capabilities through the APIs below.

To access the Management APIs, make sure to enter your dedicated domain according to your PlainID Tenant Location:
RegionBase URL
United States (US)https://api.us1.plainid.io
Canada (CA)https://api.ca1.plainid.io
Europe (EU)https://api.eu1.plainid.io
Local PAAhttps://api.plainid.local
" }, "servers": [ { "description": "United States", "url": "https://api.us1.plainid.io" }, { "description": "Europe", "url": "https://api.eu1.plainid.io" }, { "description": "Canada", "url": "https://api.ca1.plainid.io" }, { "description": "Local PAA", "url": "https://api.plainid.local" } ], "tags": [ { "name": "access-file-authorizer-oas", "description": "access-file-authorizer-oas" }, { "name": "authz-packager-oas", "description": "authz-packager-oas" }, { "name": "SQL Database Authorizer", "description": "API for modifying SQL queries based on authorization policies" }, { "name": "delegated-admin-oas", "description": "delegated-admin-oas" }, { "name": "Discovery", "description": "Discovery APIs" }, { "name": "Enrichment", "description": "Enrichment APIs" }, { "name": "env-mgmt-oas", "description": "env-mgmt-oas" }, { "name": "hybrid-commander-oas", "description": "hybrid-commander-oas" }, { "name": "auth-keys", "description": "Auth key operations" }, { "name": "components", "description": "Component operations" }, { "name": "paas", "description": "PAA operations" }, { "name": "paa-groups", "description": "PAA group operations" }, { "name": "packages", "description": "Package configuration operations" }, { "name": "secret-stores", "description": "Secret store operations" }, { "name": "Table Mapping", "description": "Table Mapping" }, { "name": "Column Mapping", "description": "Column Mapping" }, { "name": "Api Mapping", "description": "Api Mapping" }, { "name": "notifier-oas", "description": "notifier-oas" }, { "name": "shadow-tracker", "description": "Shadow tracker SSE stream" }, { "name": "orchestrator-oas", "description": "orchestrator-oas" }, { "name": "POP", "description": "pop operations" }, { "name": "org-mgmt-oas", "description": "org-mgmt-oas" }, { "name": "pip-mgmt-oas", "description": "pip-mgmt-oas" }, { "name": "monitor-loggers", "description": "monitor-loggers" }, { "name": "Policy Management APIs", "description": "Policy Management APIs" }, { "name": "Policy Management APIs 1.0", "description": "Policy Management APIs 1.0" }, { "name": "Policy Management APIs 2.0", "description": "Policy Management APIs 2.0" }, { "name": "Policy Building Blocks Management APIs 2.0", "description": "Policy Building Blocks Management APIs 2.0" }, { "name": "Audit", "description": "Audit" }, { "name": "Asset Template", "description": "Asset Template" }, { "name": "Application", "description": "Application" }, { "name": "Api Mapper", "description": "Api Mapper" }, { "name": "Identity Template", "description": "Identity Template" }, { "name": "Identity Sources", "description": "Identity Sources" }, { "name": "Mapper Sets", "description": "Mapper Sets" }, { "name": "Identity Template V2", "description": "Identity Template V2" }, { "name": "PAA Sources", "description": "PAA Sources" }, { "name": "PAA Views", "description": "PAA Views" }, { "name": "PAA Groups", "description": "PAA Groups" }, { "name": "Scope", "description": "Managed Scope APIs" }, { "name": "Authentication for Management APIs", "description": "Authentication for Management APIs" }, { "name": "runtime", "description": "runtime" }, { "name": "Cache Management", "description": "Cache invalidation operations for Runtime service" } ], "externalDocs": { "url": "https://docs.plainid.io/apidocs/policy-management-apis" }, "paths": { "/api/1.0/scope-operations/{envId}/{scopeId}/secret-keys/{keyId}/regenerate": { "post": { "tags": [ "Scope" ], "summary": "Regenerate Scope Secret Key", "description": "This API call generates a managed Scope Secret key and returns the value.", "operationId": "regenerateScopeSecretKey", "parameters": [ { "name": "envId", "in": "path", "required": "true", "description": "The Environment ID can be found under the Details Tab in the Environment Settings.", "schema": { "type": "string", "format": "uuid" }, "example": "550e8400-e29b-41d4-a716-446655440000" }, { "name": "scopeId", "in": "path", "required": "true", "description": "Scope ID can be found in the Scope Details in the Platform Environment Settings.", "schema": { "type": "string", "pattern": "^[a-zA-Z0-9_:.-]+$", "maxLength": "128" }, "example": "customer-api" }, { "name": "keyId", "in": "path", "required": "true", "description": "The Scope Key ID can be found in the Manage Key Settings section in the relevant Scope when the Scope Auth Method is set to Request Secret or Secret Header.", "schema": { "type": "string", "pattern": "^[a-zA-Z0-9_:.-]+$", "maxLength": "128" }, "example": "Key_1" } ], "responses": { "200": { "description": "Secret key regenerated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedSecretRegenerateResponse" }, "examples": { "regenerated": { "value": { "data": { "scopeId": "customer-api", "keyId": "Key_1", "value": "6b1f8d7c-3fd0-49c4-a58f-37d4a06d3c53" } } } } } } }, "400": { "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Missing permission for the Environment.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Scope or secret key not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal Server Error" } } } } }, "components": { "schemas": { "ManagedSecretRegenerateResponse": { "type": "object", "description": "Secret regeneration response.", "properties": { "data": { "$ref": "#/components/schemas/ManagedSecretRegenerateResult" } } }, "ErrorResponse": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "details": { "type": "string" } } }, "ManagedSecretRegenerateResult": { "type": "object", "required": [ "scopeId", "keyId", "value" ], "properties": { "scopeId": { "type": "string", "description": "Scope ID can be found in the Scope Details in the Platform Environment Settings.", "example": "customer-api" }, "keyId": { "type": "string", "description": "The Scope Key ID can be found in the Manage Key Settings section in the relevant Scope when the Scope Auth Method is set to Request Secret or Secret Header.", "example": "Key_1" }, "value": { "type": "string", "description": "Plaintext secret value returned once after regeneration.", "example": "6b1f8d7c-3fd0-49c4-a58f-37d4a06d3c53" } } } } } } ````