/v1/mgmt/jwt/templates/createAuthorization
Descope Project ID and Management Key Project ID:Management Key as bearer token.
In: header
Request Body
application/json
Create a new JWT template. Strict validation runs first — if it fails, the response carries a list of ValidationIssues with stable codes (RESERVED_CLAIM_KEY, NAME_MISSING, …) and the template is not saved. type must be "user" or "key". authSchema in {default,tenantOnly,none}. issuerType in {legacy,inbound,federated}. emptyClaimPolicy in {none,nil,delete}. The template field is the JSON object whose keys are claim names.
curl -X POST "https://api.descope.com/v1/mgmt/jwt/templates/create" \ -H "Content-Type: application/json" \ -d '{}'{ "template": { "id": "string", "name": "string", "description": "string", "template": {}, "source": "string", "tags": [ "string" ], "authSchema": "string", "type": "string", "conformanceIssuer": true, "autoDCT": true, "enforceIssuer": true, "emptyClaimPolicy": "string", "overrideSubject": true, "issuerType": "string", "omitCustomClaimsFromDSR": true, "addJti": true, "excludePermissions": true }}export interface Response {template?: {id?: stringname?: stringdescription?: stringtemplate?: {}source?: stringtags?: string[]authSchema?: stringtype?: stringconformanceIssuer?: booleanautoDCT?: booleanenforceIssuer?: booleanemptyClaimPolicy?: stringoverrideSubject?: booleanissuerType?: stringomitCustomClaimsFromDSR?: booleanaddJti?: booleanexcludePermissions?: boolean}}Apply JWT Template From Library POST
Materialise a library entry as a new project JWT template. Optional overrides let the caller pick a different name, swap tags, or amend the claim body before save. Strict validation runs as if it were a create.
Delete JWT Template POST
Delete a JWT template by id. The project's default templates are restored where this one was referenced.