API keys

Delete API key

Revoke an API key with the Java SDK.

DEL/api-keys/{id}

Use blnk.apiKeys().delete for this operation.

Call the method

String apiKeyId = "api_key_073f7ffe-9dfd-42ce-aa50-d1dca1788adc";

ApiResponse<JsonNode> response = blnk.apiKeys().delete(
    apiKeyId,
    DeleteApiKeyOptions.create().owner("merchant_a"));
FieldTypeDescription
idStringID of the API key to revoke.
ownerStringOwner of the key. Required when authenticating with the master key.

Confirm the outcome

On success, Core returns 204 No Content and response.data() is null. The key can no longer authenticate requests.

Response

Returns 204 No Content on success. Check response.status() == 204 and treat response.data() as null. Do not parse a response body on this endpoint.