Create or update JWT customizer

PUT /api/configs/jwt-customizer/{tokenTypePath}

Create or update a JWT customizer for the given token type.

Path parameters

  • tokenTypePath string Required

    The token type to create a JWT customizer for.

    Values are access-token or client-credentials.

application/json

Body Required

Responses

PUT /api/configs/jwt-customizer/{tokenTypePath}
curl \
 -X PUT https://[tenant_id].logto.app/api/configs/jwt-customizer/{tokenTypePath} \
 -H "Content-Type: application/json"
Request example
{}
Response examples (200)
{
  "script": "string",
  "environmentVariables": {
    "key": "string"
  },
  "contextSample": {
    "user": {
      "id": "string",
      "username": "string",
      "primaryEmail": "string",
      "primaryPhone": "string",
      "name": "string",
      "avatar": "string",
      "customData": {},
      "identities": {
        "userId": "string",
        "details": {}
      },
      "lastSignInAt": 42.0,
      "createdAt": 42.0,
      "updatedAt": 42.0,
      "profile": {
        "familyName": "string",
        "givenName": "string",
        "middleName": "string",
        "nickname": "string",
        "preferredUsername": "string",
        "profile": "string",
        "website": "string",
        "gender": "string",
        "birthdate": "string",
        "zoneinfo": "string",
        "locale": "string",
        "address": {
          "formatted": "string",
          "streetAddress": "string",
          "locality": "string",
          "region": "string",
          "postalCode": "string",
          "country": "string"
        }
      },
      "applicationId": "string",
      "isSuspended": true,
      "ssoIdentities": [
        {
          "issuer": "string",
          "identityId": "string",
          "detail": {}
        }
      ],
      "mfaVerificationFactors": [
        "Totp"
      ],
      "roles": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "scopes": [
            {
              "id": "string",
              "name": "string",
              "description": "string",
              "resourceId": "string",
              "resource": {
                "id": "string",
                "name": "string",
                "indicator": "string",
                "isDefault": true,
                "accessTokenTtl": 42.0
              }
            }
          ]
        }
      ],
      "organizations": [
        {
          "id": "string",
          "name": "string",
          "description": "string"
        }
      ],
      "organizationRoles": [
        {
          "organizationId": "string",
          "roleId": "string",
          "roleName": "string"
        }
      ]
    }
  },
  "tokenSample": {
    "jti": "string",
    "aud": "string",
    "scope": "string",
    "clientId": "string",
    "accountId": "string",
    "expiresWithSession": true,
    "grantId": "string",
    "gty": "string",
    "sessionUid": "string",
    "sid": "string",
    "kind": "string"
  }
}
{
  "script": "string",
  "environmentVariables": {
    "key": "string"
  },
  "contextSample": {},
  "tokenSample": {
    "jti": "string",
    "aud": "string",
    "scope": "string",
    "clientId": "string",
    "kind": "string"
  }
}