API ReferenceManagementResources
POST
/v1/mgmt/resource/create

Authorization

Descope Project ID and Management Key
AuthorizationBearer <token>

Project ID:Management Key as bearer token.

In: header

Request Body

application/json

name*string
Length1 <= length
scopes?object
userAccess?"allow" | "deny" | "allowViaPolicy" | ""

User access to the resource: allow, deny or allowViaPolicy.

Value in"allow" | "deny" | "allowViaPolicy" | ""
clientAccess?"allow" | "deny" | "allowViaPolicy" | ""

Client access to the resource: allow, deny or allowViaPolicy.

Value in"allow" | "deny" | "allowViaPolicy" | ""
description?string
uri?string

Deprecated: use uris.

type?"api" | "mcp" | ""

The 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.

Value in"api" | "mcp" | ""
dynamicRegistrationSettings?object

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.

idJagTarget?object

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.

rarSettings?object
translate?boolean

Translate the scope descriptions on the consent screen. Scope names are OAuth identifiers and are never translated.

translateConnectorID?string

Translation connector used to generate the translations.

translateSourceLang?string
translateTargetLangs?array<string>
string
uris?array<string>
string

Access token audiences, unique in the project. Supports a * wildcard, such as https://*.example.com/mcp.

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. Set its audiences in uris: at least one is required, each must be unique in the project, and the type cannot be changed later. An audience can hold a wildcard, such as https://.example.com/mcp or https://example.com/mcp/, to cover servers on many hosts or paths. 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. An MCP server with dynamic client registration or CIMD enabled needs dynamicRegistrationSettings.loginPageURL, unless it uses a registration template or the project issuer: the Descope-hosted page is /login/?flow=, on the same host as the resource discovery URL. Clients that register through dynamic client registration or CIMD can request openid, offline_access, the project default scopes (profile and email unless an admin removed them) and the scopes.connectionsScopes names. Outside policy mode they are never granted scopes.permissionsScopes, so requesting one fails with invalid_scope. openid is accepted, but appears in the access token's scope claim only when no other scope was granted. An MCP server's Approved domains and URLs in the Descope Console are dynamicRegistrationSettings.cimdSettings.domainPolicies: the entries that decide which CIMD clients may register. An entry starting with https:// approves one client metadata document: it is compared to the whole client_id URL, where * stands for one path segment (https://chatgpt.com/oauth/*/client.json) and the client_id's query string is ignored. Any other entry is compared to the client_id hostname only (*, example.com, or *.example.com for a host and its subdomains), so it approves every document on that host: to approve a single client on a shared host such as github.com, use its https:// URL. The first entry that matches a client decides, and an entry with enabled false blocks it.

curl -X POST "https://api.descope.com/v1/mgmt/resource/create" \  -H "Content-Type: application/json" \  -d '{    "name": "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": "allow",    "clientAccess": "allow",    "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": "seconds",        "sessionTokenExpiration": 0,        "sessionTokenExpirationUnit": "seconds",        "userTemplateId": "string",        "keyTemplateId": "string",        "keySessionTokenExpiration": 0,        "keySessionTokenExpirationUnit": "seconds",        "enableInactivity": true,        "inactivityTime": 0,        "inactivityTimeUnit": "seconds"      },      "fallbackClientLogo": "string",      "overrideProjectSettings": true,      "issuerType": "project"    },    "idJagTarget": {      "authorizationServer": "string",      "targetTenant": "string"    },    "uris": [      "string"    ],    "rarSettings": {      "schemas": [        {          "type": "string",          "schema": {}        }      ]    },    "translate": true,    "translateConnectorID": "string",    "translateSourceLang": "string",    "translateTargetLangs": [      "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?: ("allow" | "deny" | "allowViaPolicy" | "")/** * Client access to the resource: allow, deny or allowViaPolicy. */clientAccess?: ("allow" | "deny" | "allowViaPolicy" | "")description?: string/** * Deprecated: use uris. An update can only resend it unchanged or empty it. */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/** * Access token audiences, unique in the project. An update replaces the list. Supports a * wildcard, such as https://*.example.com/mcp. */uris?: string[]rarSettings?: {/** * @maxItems 50 */schemas?: RARTypeSchema[]}/** * Translate the scope descriptions on the consent screen. Scope names are OAuth identifiers and are never translated. */translate?: boolean/** * Translation connector used to generate the translations. */translateConnectorID?: stringtranslateSourceLang?: stringtranslateTargetLangs?: string[]}}/** * 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?: ("seconds" | "minutes" | "hours" | "days" | "weeks" | "")sessionTokenExpiration?: numbersessionTokenExpirationUnit?: ("seconds" | "minutes" | "hours" | "days" | "weeks" | "")userTemplateId?: stringkeyTemplateId?: stringkeySessionTokenExpiration?: numberkeySessionTokenExpirationUnit?: ("seconds" | "minutes" | "hours" | "days" | "weeks" | "")/** * Custom mode only (enabled=true). A refresh after inactivityTime without use is rejected and the client must authorize again. In inherit mode (enabled=false) the project session inactivity applies instead. */enableInactivity?: boolean/** * How long a client may stay unused before its refresh token is rejected, in inactivityTimeUnit. */inactivityTime?: number/** * Unit of inactivityTime: seconds, minutes, hours, days, weeks. */inactivityTimeUnit?: ("seconds" | "minutes" | "hours" | "days" | "weeks" | "")}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?: ("project" | "mcpServer" | "")}export interface Projectv11 {enabled?: booleandisableApprovedScopesAsDefault?: booleanflowId?: string}export interface CIMDDomainPolicies {/** * @maxItems 100 */policies?: CIMDDomainPolicy[]}export interface CIMDDomainPolicy {/** * What the entry matches. An entry starting with https:// is compared to the whole client_id URL: same host, port *  and path, where * stands for one path segment (https://chatgpt.com/oauth/* /client.json), ignoring the client_id's *  query string and fragment. Any other entry is compared to the client_id hostname only: * for every host, *  example.com for that host, *.example.com for it and its subdomains */domainPattern: string/** * false makes the entry a block. The first entry that matches a client decides, so a block goes before a broader allow */enabled?: 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}export interface RARTypeSchema {type: stringschema?: {}}
Was this helpful?