/v1/mgmt/resource/createAuthorization
Descope Project ID and Management Key Project ID:Management Key as bearer token.
In: header
Request Body
application/json
1 <= length <= 254User access to the resource: allow, deny or allowViaPolicy.
Client access to the resource: allow, deny or allowViaPolicy.
length <= 1000Resource URI, used as the access token audience. For an MCP server, this is the MCP server URL and is required.
1 <= length <= 3000The kind of Resource. Use api for an API Resource that protects a backend you build, or mcp for an MCP Server Resource that serves tools over the Model Context Protocol. Set it on every create request. dynamicRegistrationSettings applies only when type is mcp.
"api" | "mcp"DynamicRegistrationSettings groups the DCR/CIMD configuration plus inline client-side defaults for an mcp-typed Resource. Only meaningful when the parent Resource has type=mcp.
When useTemplate is true, the resource MUST reference a non-empty dynamicRegistrationTemplateId, and the client defaults (loginPageURL, sessionSettings, skipConsentScreen, forceAddAllAuthorizationInfo, tags, plus template-only approvedCallbackUrls and logo) are sourced from that template. When useTemplate is false, the inline fields on this message are used directly.
IdJagTargetSettings configures the ID-JAG (Cross App Access) assertion an inbound app receives when it exchanges a token for this api-typed Resource: an external server (typically a remote MCP server) protected by another authorization server. The values describe the TARGET system that will accept the assertion, not this project. Not allowed on mcp-typed Resources, which this project protects itself.
Create a new resource, using a valid management key. A resource is a backend API (type api, the default) or an MCP server (type mcp) that clients get tokens for. The uri is required and must be unique in the project, and the type and uri cannot be changed later. Each scopes.connectionsScopes entry maps a scope that clients request (its name) onto connection (Outbound App) scopes, with values in the form outboundAppId:scope, or outboundAppId:* for every scope of an API key connection.
curl -X POST "https://api.descope.com/v1/mgmt/resource/create" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "uri": "string" }'{ "resource": { "id": "string", "version": "string", "name": "string", "scopes": { "permissionsScopes": [ { "name": "string", "description": "string", "optional": true, "values": [ "string" ] } ], "attributesScopes": [ { "name": "string", "description": "string", "optional": true, "values": [ "string" ] } ], "connectionsScopes": [ { "name": "string", "description": "string", "optional": true, "values": [ "string" ] } ] }, "createdTime": "string", "modifiedTime": "string", "userAccess": "string", "clientAccess": "string", "description": "string", "uri": "string", "type": "api", "dynamicRegistrationSettings": { "dynamicRegistration": { "enabled": true, "disableApprovedScopesAsDefault": true, "flowId": "string" }, "cimdSettings": { "enabled": true, "domainPolicies": { "policies": [ { "domainPattern": "string", "enabled": true } ] } }, "dynamicRegistrationTemplateId": "string", "useTemplate": true, "loginPageURL": "string", "skipConsentScreen": true, "forceAddAllAuthorizationInfo": true, "tags": [ "string" ], "sessionSettings": { "enabled": true, "refreshTokenExpiration": 0, "refreshTokenExpirationUnit": "string", "sessionTokenExpiration": 0, "sessionTokenExpirationUnit": "string", "userTemplateId": "string", "keyTemplateId": "string", "keySessionTokenExpiration": 0, "keySessionTokenExpirationUnit": "string" }, "fallbackClientLogo": "string", "overrideProjectSettings": true, "issuerType": "string" }, "idJagTarget": { "authorizationServer": "string", "targetTenant": "string" } }}export interface Response {/** * Resource CRUD messages */resource?: {id: stringversion?: stringname: stringscopes?: {permissionsScopes?: {name: stringdescription?: stringoptional?: booleanvalues?: string[]}[]attributesScopes?: {name: stringdescription?: stringoptional?: booleanvalues?: string[]}[]connectionsScopes?: Projectv1[]}createdTime?: stringmodifiedTime?: string/** * User access to the resource: allow, deny or allowViaPolicy. */userAccess?: string/** * Client access to the resource: allow, deny or allowViaPolicy. */clientAccess?: stringdescription?: string/** * Resource URI, used as the access token audience. For an MCP server, this is the MCP server URL and is required. */uri: string/** * The kind of Resource, either `api` for an API Resource or `mcp` for an MCP Server Resource. `dynamicRegistrationSettings` applies only when `type` is `mcp`. */type?: ("api" | "mcp")/** * Client registration settings (DCR, CIMD, login page and client defaults). Used by MCP servers. */dynamicRegistrationSettings?: DynamicRegistrationSettingsidJagTarget?: IdJagTargetSettings}}/** * Keep this message synchronized with the matching one in ManagementService */export interface Projectv1 {name: stringdescription?: stringoptional?: booleanvalues?: string[]}/** * DynamicRegistrationSettings groups the DCR/CIMD configuration plus inline * client-side defaults for an mcp-typed Resource. Only meaningful when the * parent Resource has type=mcp. * * When useTemplate is true, the resource MUST reference a non-empty * dynamicRegistrationTemplateId, and the client defaults * (loginPageURL, sessionSettings, skipConsentScreen, * forceAddAllAuthorizationInfo, tags, plus template-only approvedCallbackUrls * and logo) are sourced from that template. When useTemplate is false, the * inline fields on this message are used directly. */export interface DynamicRegistrationSettings {/** * Dynamic client registration (DCR) for MCP clients. Ignored when issuerType is project, where * registration is enabled in the project OIDC settings instead. */dynamicRegistration?: Projectv11/** * Client ID metadata document (CIMD) settings for MCP clients. */cimdSettings?: {enabled?: booleandomainPolicies?: CIMDDomainPolicies}/** * ID of the dynamic registration template to source client defaults from. Required when useTemplate is true. */dynamicRegistrationTemplateId?: string/** * When true, client defaults come from the template referenced by dynamicRegistrationTemplateId instead of the inline fields. */useTemplate?: boolean/** * Login page URL that clients registered for this resource send users to. Required when DCR or CIMD is enabled, * unless useTemplate is true or issuerType is project. */loginPageURL?: stringskipConsentScreen?: booleanforceAddAllAuthorizationInfo?: booleantags?: string[]sessionSettings?: {enabled?: booleanrefreshTokenExpiration?: numberrefreshTokenExpirationUnit?: stringsessionTokenExpiration?: numbersessionTokenExpirationUnit?: stringuserTemplateId?: stringkeyTemplateId?: stringkeySessionTokenExpiration?: numberkeySessionTokenExpirationUnit?: string}fallbackClientLogo?: string/** * optional so an update that omits it keeps the stored value instead of resetting it. */overrideProjectSettings?: boolean/** * OAuth issuer the MCP server advertises: project (the project OIDC issuer) or mcpServer (a per-server issuer). * Defaults on create based on the project, and keeps its stored value when omitted on update. */issuerType?: string}export interface Projectv11 {enabled?: booleandisableApprovedScopesAsDefault?: booleanflowId?: string}export interface CIMDDomainPolicies {/** * @maxItems 100 */policies?: CIMDDomainPolicy[]}export interface CIMDDomainPolicy {domainPattern: stringenabled?: boolean}/** * IdJagTargetSettings configures the ID-JAG (Cross App Access) assertion an inbound * app receives when it exchanges a token for this api-typed Resource: an external * server (typically a remote MCP server) protected by another authorization server. * The values describe the TARGET system that will accept the assertion, not this * project. Not allowed on mcp-typed Resources, which this project protects itself. */export interface IdJagTargetSettings {authorizationServer: stringtargetTenant?: string}Load all resources GET
Load all resources, using a valid management key. MCP servers are the resources with type "mcp".
Update resource POST
Update a resource, using a valid management key. The request replaces the whole resource: load it, change the fields, and send it back with its version unchanged. The type and uri cannot be changed. A stale version fails with Resource not found (E074805), so reload the resource and retry. On a resource managed by an agent gateway (tagged gateway), the connection scopes come from the gateway routes and only their optional flag can be changed. On an MCP server (type mcp), dynamicRegistrationSettings.issuerType and dynamicRegistrationSettings.overrideProjectSettings keep their stored values when omitted.