Pass the optional and required parameters as per the official API docs. See the DTO reference below for more information.
Copy
Ask AI
package com.example.myapp;import com.unkey.unkeysdk.dto.KeyVerifyRequest;import com.unkey.unkeysdk.dto.KeyVerifyResponse;@RestControllerpublic class APIController { private static IKeyService keyService = new KeyService(); @PostMapping("/verify") public KeyVerifyResponse verifyKey( @RequestBody KeyVerifyRequest keyVerifyRequest) { // Delegate the creation of the key to the KeyService from the SDK return keyService.verifyKey(keyVerifyRequest); }}