### Initialize VerificationOtpVerificationStatus Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationOtpVerificationStatus.md Example of how to initialize a VerificationOtpVerificationStatus variable with a specific status. ```java import com.clerk.backend_api.models.components.VerificationOtpVerificationStatus; VerificationOtpVerificationStatus value = VerificationOtpVerificationStatus.UNVERIFIED; ``` -------------------------------- ### get Source: https://github.com/clerk/clerk-sdk-java/blob/main/README.md Get a client. ```APIDOC ## get ### Description Get a client. ### Method Not specified in source. ### Endpoint Not specified in source. ### Parameters Not specified in source. ### Request Example Not specified in source. ### Response Not specified in source. ``` -------------------------------- ### Example Debug Log Output Source: https://github.com/clerk/clerk-sdk-java/blob/main/README.md This is an example of the detailed output generated when HTTP debug logging is enabled, showing request/response details and bodies. ```text Sending request: http://localhost:35123/bearer#global GET Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]} Received response: (GET http://localhost:35123/bearer#global) 200 Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]} Response body: { "authenticated": true, "token": "global" } ``` -------------------------------- ### Instantiate CommercePaymentMethodResponseObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/CommercePaymentMethodResponseObject.md Example of how to import and instantiate the CommercePaymentMethodResponseObject with its predefined value. ```java import com.clerk.backend_api.models.components.CommercePaymentMethodResponseObject; CommercePaymentMethodResponseObject value = CommercePaymentMethodResponseObject.COMMERCE_PAYMENT_METHOD; ``` -------------------------------- ### get Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/instancesettings/README.md Fetches the current instance settings. This operation retrieves the current configuration of your Clerk instance. ```APIDOC ## get Instance Settings ### Description Fetches the current instance settings. This operation retrieves the current configuration of your Clerk instance. ### Method GET ### Endpoint /instance ### Response #### Success Response (200) **[GetInstanceResponse](../../models/operations/GetInstanceResponse.md)** - Contains the instance settings. ### Errors | Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4XX, 5XX | */* | ``` -------------------------------- ### Instantiate MachineSecretKeyObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/MachineSecretKeyObject.md Demonstrates how to import and instantiate the MachineSecretKeyObject using its predefined constant. ```java import com.clerk.backend_api.models.components.MachineSecretKeyObject; MachineSecretKeyObject value = MachineSecretKeyObject.MACHINE_SECRET_KEY; ``` -------------------------------- ### Instantiate DomainObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/DomainObject.md Use the static DOMAIN field to get a DomainObject instance. No additional setup is required. ```java import com.clerk.backend_api.models.components.DomainObject; DomainObject value = DomainObject.DOMAIN; ``` -------------------------------- ### Get CommerceSubscriptionItemStatus Enum Value Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/CommerceSubscriptionItemStatus.md Example of how to access an enum value for CommerceSubscriptionItemStatus. Ensure the necessary import is present. ```java import com.clerk.backend_api.models.components.CommerceSubscriptionItemStatus; CommerceSubscriptionItemStatus value = CommerceSubscriptionItemStatus.ACTIVE; ``` -------------------------------- ### Instantiate OrganizationObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/OrganizationObject.md Demonstrates how to import and instantiate the OrganizationObject using its predefined ORGANIZATION value. ```java import com.clerk.backend_api.models.components.OrganizationObject; OrganizationObject value = OrganizationObject.ORGANIZATION; ``` -------------------------------- ### Initialize SignUpObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/SignUpObject.md Demonstrates how to initialize a SignUpObject using the predefined SIGN_UP_ATTEMPT value. Ensure the Clerk backend API models are imported. ```java import com.clerk.backend_api.models.components.SignUpObject; SignUpObject value = SignUpObject.SIGN_UP_ATTEMPT; ``` -------------------------------- ### Get InstanceObject Instance Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/InstanceObject.md Use this to access the singleton INSTANCE of InstanceObject. No setup or imports are required beyond the base Clerk SDK. ```java import com.clerk.backend_api.models.components.InstanceObject; InstanceObject value = InstanceObject.INSTANCE; ``` -------------------------------- ### Instantiate VerificationWeb3VerificationObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationWeb3VerificationObject.md Demonstrates how to import and instantiate the VerificationWeb3VerificationObject using its predefined constant. ```java import com.clerk.backend_api.models.components.VerificationWeb3VerificationObject; VerificationWeb3VerificationObject value = VerificationWeb3VerificationObject.VERIFICATION_WEB3; ``` -------------------------------- ### Get Api Key Object Example Usage Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/operations/GetApiKeyObject.md Demonstrates how to access the API_KEY constant from the GetApiKeyObject enum. This is useful for retrieving the default API key object. ```java import com.clerk.backend_api.models.operations.GetApiKeyObject; GetApiKeyObject value = GetApiKeyObject.API_KEY; ``` -------------------------------- ### Instantiate TotalCountObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/TotalCountObject.md Use the predefined TOTAL_COUNT constant to get the string representation of the total count object type. No additional setup is required beyond importing the class. ```java import com.clerk.backend_api.models.components.TotalCountObject; TotalCountObject value = TotalCountObject.TOTAL_COUNT; ``` -------------------------------- ### Instantiate VerificationScimVerificationObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationScimVerificationObject.md Demonstrates how to import and instantiate the VerificationScimVerificationObject using its predefined constant. ```java import com.clerk.backend_api.models.components.VerificationScimVerificationObject; VerificationScimVerificationObject value = VerificationScimVerificationObject.VERIFICATION_SCIM; ``` -------------------------------- ### Instantiate SchemasCommerceSubscriptionItemPlanObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/SchemasCommerceSubscriptionItemPlanObject.md Demonstrates how to import and instantiate the SchemasCommerceSubscriptionItemPlanObject with the COMMERCE_PLAN value. Ensure the Clerk backend API models are correctly imported. ```java import com.clerk.backend_api.models.components.SchemasCommerceSubscriptionItemPlanObject; SchemasCommerceSubscriptionItemPlanObject value = SchemasCommerceSubscriptionItemPlanObject.COMMERCE_PLAN; ``` -------------------------------- ### Instantiate BillingPaymentAttemptObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/BillingPaymentAttemptObject.md Example of how to instantiate a BillingPaymentAttemptObject with a specific value. Ensure the necessary import statement is included. ```java import com.clerk.backend_api.models.components.BillingPaymentAttemptObject; BillingPaymentAttemptObject value = BillingPaymentAttemptObject.COMMERCE_PAYMENT; ``` -------------------------------- ### Instantiate InstanceSettingsObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/InstanceSettingsObject.md Demonstrates how to instantiate an InstanceSettingsObject using the predefined INSTANCE_SETTINGS value. Ensure the Clerk backend API models are imported. ```java import com.clerk.backend_api.models.components.InstanceSettingsObject; InstanceSettingsObject value = InstanceSettingsObject.INSTANCE_SETTINGS; ``` -------------------------------- ### GET /api/keys - Get API Keys Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/apikeys/README.md Retrieves a list of all API Keys associated with the account. Supports filtering by subject. ```APIDOC ## GET /api/keys ### Description Get API Keys ### Method GET ### Endpoint /api_keys ### Parameters #### Query Parameters - **subject** (string) - Optional - Filter API keys by subject. ### Request Example ```json { "subject": "" } ``` ### Response #### Success Response (200) - **object** (array) - A list of API key objects. #### Response Example ```json { "object": [ { "id": "key_123", "name": "my-key", "created_at": "2023-01-01T12:00:00Z", "expires_at": null, "last_4_bytes": "abcd" } ] } ``` ### Errors - **400** - models/errors/GetApiKeysResponseBody - **409** - models/errors/GetAPIKeysAPIKeysResponseBody - **4XX, 5XX** - models/errors/SDKError ``` -------------------------------- ### Instantiate CommercePlanObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/CommercePlanObject.md Example of how to instantiate and use the CommercePlanObject in Java. Ensure the Clerk backend API models are imported. ```java import com.clerk.backend_api.models.components.CommercePlanObject; CommercePlanObject value = CommercePlanObject.COMMERCE_PLAN; ``` -------------------------------- ### Get SchemasCommerceSubscriptionItemPaymentSourceStatus Enum Value Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/SchemasCommerceSubscriptionItemPaymentSourceStatus.md Demonstrates how to import and use the SchemasCommerceSubscriptionItemPaymentSourceStatus enum to get a status value. This is useful for setting or checking the payment source status. ```java import com.clerk.backend_api.models.components.SchemasCommerceSubscriptionItemPaymentSourceStatus; SchemasCommerceSubscriptionItemPaymentSourceStatus value = SchemasCommerceSubscriptionItemPaymentSourceStatus.ACTIVE; ``` -------------------------------- ### Instantiate OrganizationWithLogoObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/OrganizationWithLogoObject.md Demonstrates how to instantiate the OrganizationWithLogoObject using the predefined ORGANIZATION value. ```java import com.clerk.backend_api.models.components.OrganizationWithLogoObject; OrganizationWithLogoObject value = OrganizationWithLogoObject.ORGANIZATION; ``` -------------------------------- ### get Source: https://github.com/clerk/clerk-sdk-java/blob/main/README.md Retrieve an enterprise connection. ```APIDOC ## get ### Description Retrieve an enterprise connection. ### Method Not specified in source. ### Endpoint Not specified in source. ### Parameters Not specified in source. ### Request Example Not specified in source. ### Response Not specified in source. ``` -------------------------------- ### Instantiate OrganizationSettingsObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/OrganizationSettingsObject.md Demonstrates how to instantiate the OrganizationSettingsObject with the predefined ORGANIZATION_SETTINGS value. ```java import com.clerk.backend_api.models.components.OrganizationSettingsObject; OrganizationSettingsObject value = OrganizationSettingsObject.ORGANIZATION_SETTINGS; ``` -------------------------------- ### Instantiate MachineObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/MachineObject.md Demonstrates how to import and instantiate the MachineObject using its predefined MACHINE value. Ensure the Clerk backend API models are imported. ```java import com.clerk.backend_api.models.components.MachineObject; MachineObject value = MachineObject.MACHINE; ``` -------------------------------- ### get Source: https://github.com/clerk/clerk-sdk-java/blob/main/README.md Retrieve an email address. ```APIDOC ## get ### Description Retrieve an email address. ### Method Not specified in source. ### Endpoint Not specified in source. ### Parameters Not specified in source. ### Request Example Not specified in source. ### Response Not specified in source. ``` -------------------------------- ### Instantiate CommerceSubscriptionObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/CommerceSubscriptionObject.md Demonstrates how to import and instantiate the CommerceSubscriptionObject with its predefined value. ```java import com.clerk.backend_api.models.components.CommerceSubscriptionObject; CommerceSubscriptionObject value = CommerceSubscriptionObject.COMMERCE_SUBSCRIPTION; ``` -------------------------------- ### get Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/users/README.md Retrieve the details of a user by their ID. ```APIDOC ## GET /users/{user_id} ### Description Retrieve the details of a user. ### Method GET ### Endpoint /users/{user_id} ### Parameters #### Path Parameters - **user_id** (String) - Required - The ID of the user to retrieve ### Response #### Success Response (200) - **user** (User) - The retrieved user object #### Response Example { "example": "{\"user\": {\"id\": \"user_abc123\", \"email_addresses\": [ { \"email_address\": \"test@example.com\" } ]}}" } ### Errors - **models/errors/ClerkErrors** (400, 401, 404) - application/json - **models/errors/SDKError** (4XX, 5XX) - */* ``` -------------------------------- ### Get Client Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/clients/README.md Retrieves a specific client by its ID. ```APIDOC ## GET /clients/{clientId} ### Description Gets a specific client by its ID. ### Method GET ### Endpoint /clients/{clientId} ### Parameters #### Path Parameters - **clientId** (string) - Required - The ID of the client to retrieve. ### Response #### Success Response (200) - **client** (object) - The client object. #### Response Example ```json { "client": { "id": "cl_123", "name": "Example Client" } } ``` ``` -------------------------------- ### Instantiate SignInTokenObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/SignInTokenObject.md Demonstrates how to instantiate a SignInTokenObject using the predefined SIGN_IN_TOKEN constant. ```java import com.clerk.backend_api.models.components.SignInTokenObject; SignInTokenObject value = SignInTokenObject.SIGN_IN_TOKEN; ``` -------------------------------- ### Instantiate VerificationAdminVerificationWeb3WalletStrategy Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationAdminVerificationWeb3WalletStrategy.md Demonstrates how to instantiate VerificationAdminVerificationWeb3WalletStrategy using predefined values or custom strings. ```java import com.clerk.backend_api.models.components.VerificationAdminVerificationWeb3WalletStrategy; VerificationAdminVerificationWeb3WalletStrategy value = VerificationAdminVerificationWeb3WalletStrategy.ADMIN; // Open enum: use .of() to create instances from custom string values VerificationAdminVerificationWeb3WalletStrategy custom = VerificationAdminVerificationWeb3WalletStrategy.of("custom_value"); ``` -------------------------------- ### GET /organization_permissions/{permission_id} Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/organizationpermissions/README.md Retrieves the details of an organization permission. ```APIDOC ## GET /organization_permissions/{permission_id} ### Description Retrieves the details of an organization permission. ### Method GET ### Endpoint /organization_permissions/{permission_id} ### Parameters #### Path Parameters - **permission_id** (string) - Required - The ID of the permission to retrieve. ### Response #### Success Response (200) - **permission** (Permission) - Description of the permission object #### Response Example ```json { "id": "perm_123", "name": "Member Access", "key": "org:member:read", "created_at": "2023-01-01T12:00:00Z", "updated_at": "2023-01-01T12:00:00Z" } ``` ### Errors - **models/errors/ClerkErrors** - Status Code: 401, 422 - Content Type: application/json - **models/errors/SDKError** - Status Code: 4XX, 5XX - Content Type: */* ``` -------------------------------- ### Instantiate SignUpStatus Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/SignUpStatus.md Demonstrates how to instantiate a SignUpStatus variable with a specific status value. Ensure the Clerk backend API models are imported. ```java import com.clerk.backend_api.models.components.SignUpStatus; SignUpStatus value = SignUpStatus.MISSING_REQUIREMENTS; ``` -------------------------------- ### GET /users Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/operations/GetUserListRequest.md Retrieves a list of users with filtering options. ```APIDOC ## GET /users ### Description Retrieves a list of users, with the ability to filter by their last active timestamp. ### Method GET ### Endpoint /users ### Query Parameters - **lastActiveAtAfter** (Optional) - Optional - Returns users whose last session activity was after the given date (with millisecond precision). Example: use 1700690400000 to retrieve users whose last session activity was after 2023-11-23. ### Response #### Success Response (200) - **users** (Array) - A list of user objects. - **totalCount** (Integer) - The total number of users matching the query. #### Response Example { "users": [ { "id": "user_123", "firstName": "John", "lastName": "Doe", "emailAddresses": [{"emailAddress": "john.doe@example.com"}], "lastActiveAt": 1700690400000 } ], "totalCount": 1 } ``` -------------------------------- ### Get Redirect URL Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/redirecturls/README.md Retrieves a specific redirect URL by its ID. ```APIDOC ## GET /redirect_urls/{redirect_url_id} ### Description Retrieves a redirect URL. ### Method GET ### Endpoint /redirect_urls/{redirect_url_id} ### Path Parameters - **redirect_url_id** (string) - Required - The ID of the redirect URL to retrieve. ### Response #### Success Response (200) - **redirectURL** (RedirectURL) - The requested redirect URL object. #### Response Example ```json { "id": "uid_abc123", "url": "https://example.com/callback", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z" } ``` ### Errors - **SDKError** (4XX, 5XX) - An error occurred during the request. ``` -------------------------------- ### Build SDK Artifact from Source (Unix) Source: https://github.com/clerk/clerk-sdk-java/blob/main/README.md Builds the SDK artifact to the 'build' directory on Unix-like systems. ```bash ./gradlew build ``` -------------------------------- ### Create Billing Price Transition in Java Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/billing/README.md Use this snippet to create a price transition for a subscription item. Ensure you have the necessary authentication token and IDs. ```java package hello.world; import com.clerk.backend_api.Clerk; import com.clerk.backend_api.models.components.PriceTransitionRequest; import com.clerk.backend_api.models.errors.ClerkErrors; import com.clerk.backend_api.models.operations.CreateBillingPriceTransitionResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws ClerkErrors, Exception { Clerk sdk = Clerk.builder() .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) .build(); CreateBillingPriceTransitionResponse res = sdk.billing().createPriceTransition() .subscriptionItemId("") .priceTransitionRequest(PriceTransitionRequest.builder() .fromPriceId("") .toPriceId("") .build()) .call(); if (res.commercePriceTransitionResponse().isPresent()) { System.out.println(res.commercePriceTransitionResponse().get()); } } } ``` -------------------------------- ### GET /organization_roles/{organization_role_id} Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/organizationroles/README.md Retrieves an existing organization role by its ID. ```APIDOC ## GET /organization_roles/{organization_role_id} ### Description Retrieves an existing organization role by its ID. ### Method GET ### Endpoint /organization_roles/{organization_role_id} ### Parameters #### Path Parameters - **organizationRoleId** (String) - Required - The ID of the organization role ### Response #### Success Response (200) - **role** (Role) - Description of the retrieved role. #### Response Example ```json { "role": { "id": "rol_...", "name": "Admin", "key": "org:admin", "description": "Administrator role", "granted_to": "org", "created_at": "2023-01-01T12:00:00.000Z", "updated_at": "2023-01-01T12:00:00.000Z" } } ``` ``` -------------------------------- ### Get API Key Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/apikeys/README.md Retrieves a specific API key by its ID. ```APIDOC ## GET /api_keys/{apiKeyID} ### Description Get an API Key by ID. ### Method GET ### Endpoint /api_keys/{apiKeyID} ### Parameters #### Path Parameters - **apiKeyID** (String) - Required - N/A ### Response #### Success Response (200) - **object** (Object) - Description of the returned API key object. #### Response Example ```json { "example": "response body" } ``` ### Errors - **models/errors/GetApiKeyResponseBody** - 400 - application/json - **models/errors/GetAPIKeyAPIKeysResponseBody** - 404 - application/json - **models/errors/SDKError** - 4XX, 5XX - */* ``` -------------------------------- ### Initialize VerificationObject with OTP Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationObject.md Demonstrates how to initialize a VerificationObject with the VERIFICATION_OTP constant. Ensure the Clerk backend API models are imported. ```java import com.clerk.backend_api.models.components.VerificationObject; VerificationObject value = VerificationObject.VERIFICATION_OTP; ``` -------------------------------- ### Get JWT Template Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/jwttemplates/README.md Retrieves a specific JWT template by its ID. ```APIDOC ## GET /jwt_templates/{jwtTemplateId} ### Description Retrieve a specific JWT template by its ID. ### Method GET ### Endpoint /jwt_templates/{jwtTemplateId} ### Path Parameters - **jwtTemplateId** (string) - Required - The ID of the JWT template to retrieve. ### Response #### Success Response (200) - **jwtTemplate** (object) - The requested JWT template object. #### Response Example ```json { "id": "jwtTpl_abc", "template": "{\"claims\": {\"user_id\": \"$user.id\"}}", "createdAt": 1678886400000, "updatedAt": 1678886400000 } ``` ### Errors - **SDKError** (4XX, 5XX) - An error occurred during the request. ``` -------------------------------- ### Instantiate ProxyCheckObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/ProxyCheckObject.md Demonstrates how to import and instantiate the ProxyCheckObject using its predefined PROXY_CHECK value. This is useful for setting or checking proxy check statuses. ```java import com.clerk.backend_api.models.components.ProxyCheckObject; ProxyCheckObject value = ProxyCheckObject.PROXY_CHECK; ``` -------------------------------- ### Get VerificationAdminVerificationObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationAdminVerificationObject.md Import and access the VERIFICATION_ADMIN constant from the VerificationAdminVerificationObject class. ```java import com.clerk.backend_api.models.components.VerificationAdminVerificationObject; VerificationAdminVerificationObject value = VerificationAdminVerificationObject.VERIFICATION_ADMIN; ``` -------------------------------- ### Initialize PermissionObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/PermissionObject.md Demonstrates how to initialize a PermissionObject using the predefined PERMISSION value. Ensure the Clerk SDK is imported. ```java import com.clerk.backend_api.models.components.PermissionObject; PermissionObject value = PermissionObject.PERMISSION; ``` -------------------------------- ### Instantiate VerificationSamlVerificationObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationSamlVerificationObject.md Demonstrates how to instantiate the VerificationSamlVerificationObject using its predefined constant. ```java import com.clerk.backend_api.models.components.VerificationSamlVerificationObject; VerificationSamlVerificationObject value = VerificationSamlVerificationObject.VERIFICATION_SAML; ``` -------------------------------- ### Initialize VerificationWeb3VerificationStrategy Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationWeb3VerificationStrategy.md Demonstrates how to import and initialize the VerificationWeb3VerificationStrategy enum with a specific value like WEB3_METAMASK_SIGNATURE. ```java import com.clerk.backend_api.models.components.VerificationWeb3VerificationStrategy; VerificationWeb3VerificationStrategy value = VerificationWeb3VerificationStrategy.WEB3_METAMASK_SIGNATURE; ``` -------------------------------- ### Initialize BillingStatementStatus Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/BillingStatementStatus.md Example of how to initialize a BillingStatementStatus variable with the OPEN value. ```java import com.clerk.backend_api.models.components.BillingStatementStatus; BillingStatementStatus value = BillingStatementStatus.OPEN; ``` -------------------------------- ### Instantiate CommerceSubscriptionItemPlanObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/CommerceSubscriptionItemPlanObject.md Shows how to import and instantiate the CommerceSubscriptionItemPlanObject with the COMMERCE_PLAN value. This is useful for setting or referencing a commerce subscription plan. ```java import com.clerk.backend_api.models.components.CommerceSubscriptionItemPlanObject; CommerceSubscriptionItemPlanObject value = CommerceSubscriptionItemPlanObject.COMMERCE_PLAN; ``` -------------------------------- ### getInstanceProtect Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/instancesettings/README.md Get instance protect settings. Retrieves the protect settings for the instance. ```APIDOC ## getInstanceProtect Instance Settings ### Description Get instance protect settings. Retrieves the protect settings for the instance. ### Method GET ### Endpoint /instance/protect ### Response #### Success Response (200) **[GetInstanceProtectResponse](../../models/operations/GetInstanceProtectResponse.md)** - Contains the instance protect settings. ### Errors | Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4XX, 5XX | */* | ``` -------------------------------- ### Instantiate SAMLConnectionObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/SAMLConnectionObject.md Demonstrates how to instantiate the SAMLConnectionObject using its predefined value. This is useful for setting up SAML connections in your application. ```java import com.clerk.backend_api.models.components.SAMLConnectionObject; SAMLConnectionObject value = SAMLConnectionObject.SAML_CONNECTION; ``` -------------------------------- ### getOrganizationSettings Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/instancesettings/README.md Get instance organization settings. Retrieves the organization-related settings for the instance. ```APIDOC ## getOrganizationSettings Instance Settings ### Description Get instance organization settings. Retrieves the organization-related settings for the instance. ### Method GET ### Endpoint /instance/organization_settings ### Response #### Success Response (200) **[GetInstanceOrganizationSettingsResponse](../../models/operations/GetInstanceOrganizationSettingsResponse.md)** - Contains the instance organization settings. ### Errors | Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4XX, 5XX | */* | ``` -------------------------------- ### GET /sign_ups/{id} Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/signups/README.md Retrieve the details of a specific sign-up using its ID. ```APIDOC ## GET /sign_ups/{id} ### Description Retrieve the details of the sign-up with the given ID. ### Method GET ### Endpoint /sign_ups/{id} ### Parameters #### Path Parameters - **id** (String) - Required - The ID of the sign-up to retrieve ### Response #### Success Response (200) - **signUp** (GetSignUpResponse) - Description of the retrieved sign-up object. #### Response Example ```json { "signUp": { "id": "sign_abc123", "email_address": "test@example.com", "created_at": 1678886400, "updated_at": 1678886400 } } ``` ### Errors - **ClerkErrors** (403) - Returned when the request is forbidden. - **SDKError** (4XX, 5XX) - Returned for other client or server errors. ``` -------------------------------- ### Instantiate MachineWithoutScopedMachinesObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/MachineWithoutScopedMachinesObject.md Demonstrates how to instantiate the MachineWithoutScopedMachinesObject using the predefined MACHINE value. Ensure the Clerk SDK is imported. ```java import com.clerk.backend_api.models.components.MachineWithoutScopedMachinesObject; MachineWithoutScopedMachinesObject value = MachineWithoutScopedMachinesObject.MACHINE; ``` -------------------------------- ### GET /role_sets/{role_set_key_or_id} Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/rolesets/README.md Retrieves an existing role set by its key or ID. ```APIDOC ## GET /role_sets/{role_set_key_or_id} ### Description Retrieves an existing role set by its key or ID. ### Method GET ### Endpoint /role_sets/{role_set_key_or_id} ### Parameters #### Path Parameters - **roleSetKeyOrId** (String) - Required - The key or ID of the role set ### Response #### Success Response (200) - **roleSet** (RoleSet) - Description of the retrieved role set. #### Response Example ```json { "roleSet": { "id": "rol_...", "name": "Example Role Set", "key": "example_role_set", "description": "An example role set.", "defaultRoleKey": "default_role", "creatorRoleKey": "creator_role", "roles": [ { "id": "rol_...", "name": "Role 1", "key": "role_1", "description": "Description for Role 1" } ], "createdAt": "2023-01-01T12:00:00Z", "updatedAt": "2023-01-01T12:00:00Z" } } ``` ### Errors - **ClerkErrors** - 401, 403, 404 - application/json - **SDKError** - 4XX, 5XX - */* ``` -------------------------------- ### Initialize VerificationStatus Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationStatus.md Demonstrates how to import and initialize a VerificationStatus variable. This is useful for setting or checking the status of a verification. ```java import com.clerk.backend_api.models.components.VerificationStatus; VerificationStatus value = VerificationStatus.UNVERIFIED; ``` -------------------------------- ### Instantiate VerificationPasskeyVerificationObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationPasskeyVerificationObject.md Demonstrates how to instantiate the VerificationPasskeyVerificationObject using its predefined constant. ```java import com.clerk.backend_api.models.components.VerificationPasskeyVerificationObject; VerificationPasskeyVerificationObject value = VerificationPasskeyVerificationObject.VERIFICATION_PASSKEY; ``` -------------------------------- ### GET /sessions/{session_id} Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/sessions/README.md Retrieves the details of a specific session using its ID. ```APIDOC ## GET /sessions/{session_id} ### Description Retrieve the details of a session. ### Method GET ### Endpoint /sessions/{session_id} ### Parameters #### Path Parameters - **session_id** (String) - Required - The ID of the session ### Response #### Success Response (200) - **session** (Session) - Description of the session object #### Response Example { "session": { "id": "", "userId": "user_123", "lastActiveAt": 1678886400, "createdAt": 1678886400, "expireAt": 1678886400 } } ### Errors - **models/errors/ClerkErrors** (400, 401, 404) - application/json - **models/errors/SDKError** (4XX, 5XX) - */* ``` -------------------------------- ### GET /redirect_urls/{id} Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/redirecturls/README.md Retrieves the details of a specific redirect URL by its ID. ```APIDOC ## GET /redirect_urls/{id} ### Description Retrieve the details of the redirect URL with the given ID. ### Method GET ### Endpoint /redirect_urls/{id} ### Parameters #### Path Parameters - **id** (String) - Required - The ID of the redirect URL. ### Response #### Success Response (200) - **redirectURL** (RedirectURL) - Description of the retrieved redirect URL. #### Response Example ```json { "example": "response body" } ``` ### Errors - **ClerkErrors** (404) - application/json - **SDKError** (4XX, 5XX) - */* ``` -------------------------------- ### Instantiate RoleSetItemObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/RoleSetItemObject.md Demonstrates how to instantiate a RoleSetItemObject using the predefined ROLE_SET_ITEM constant. Ensure the Clerk backend API models are imported. ```java import com.clerk.backend_api.models.components.RoleSetItemObject; RoleSetItemObject value = RoleSetItemObject.ROLE_SET_ITEM; ``` -------------------------------- ### GET /machines/{machine_id} Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/machines/README.md Retrieves the details of a specific machine using its ID. ```APIDOC ## GET /machines/{machine_id} ### Description Returns the details of a machine. ### Method GET ### Endpoint /machines/{machine_id} ### Parameters #### Path Parameters - **machineId** (String) - Required - The ID of the machine to retrieve ### Response #### Success Response (200) - **machine** (GetMachineResponse) - Details of the requested machine. #### Response Example ```json { "example": "response body" } ``` ### Errors - **models/errors/ClerkErrors**: 400, 401, 403, 404, 422 (application/json) - **models/errors/SDKError**: 4XX, 5XX (*/*) ``` -------------------------------- ### Instantiate VerificationSAMLVerificationSAMLAccountObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationSAMLVerificationSAMLAccountObject.md Demonstrates how to import and instantiate the VerificationSAMLVerificationSAMLAccountObject with the VERIFICATION_SAML value. ```java import com.clerk.backend_api.models.components.VerificationSAMLVerificationSAMLAccountObject; VerificationSAMLVerificationSAMLAccountObject value = VerificationSAMLVerificationSAMLAccountObject.VERIFICATION_SAML; ``` -------------------------------- ### Instantiate EnterpriseAccountObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/EnterpriseAccountObject.md Demonstrates how to instantiate an EnterpriseAccountObject using the predefined ENTERPRISE_ACCOUNT constant. Ensure the Clerk backend API library is imported. ```java import com.clerk.backend_api.models.components.EnterpriseAccountObject; EnterpriseAccountObject value = EnterpriseAccountObject.ENTERPRISE_ACCOUNT; ``` -------------------------------- ### GET /organizations/{organization_id}/memberships Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/organizationmemberships/README.md Retrieves all user memberships for the given organization. ```APIDOC ## GET /organizations/{organization_id}/memberships ### Description Retrieves all user memberships for the given organization. ### Method GET ### Endpoint /organizations/{organization_id}/memberships ### Parameters #### Path Parameters - **organization_id** (String) - Required - The ID of the organization for which to list memberships. ``` -------------------------------- ### Get Billing Statement Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/billing/README.md Retrieves the details of a specific billing statement by its ID. ```APIDOC ## GET /billing/statements/{statementID} ### Description Retrieves the details of a billing statement. ### Method GET ### Endpoint /billing/statements/{statementID} ### Parameters #### Path Parameters - **statementID** (String) - Required - The ID of the statement to retrieve. ### Request Example { "example": "" } ### Response #### Success Response (200) - **GetBillingStatementResponse** (GetBillingStatementResponse) - Description of the response object #### Response Example { "example": "response body" } ### Errors - **models/errors/ClerkErrors** - 400, 401, 422, application/json - **models/errors/ClerkErrors** - 500, application/json - **models/errors/SDKError** - 4XX, 5XX, */* ``` -------------------------------- ### Instantiate RedirectURLObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/RedirectURLObject.md Demonstrates how to import and instantiate the RedirectURLObject using its predefined constant REDIRECT_URL. ```java import com.clerk.backend_api.models.components.RedirectURLObject; RedirectURLObject value = RedirectURLObject.REDIRECT_URL; ``` -------------------------------- ### GET /commerce/plans Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/billing/README.md Retrieves a list of commerce plans, with support for pagination and filtering. ```APIDOC ## GET /commerce/plans ### Description Returns a list of all commerce plans for the instance. The plans are returned sorted by amount ascending, then by creation date descending. This includes both default and custom plans. Pagination is supported. ### Method GET ### Endpoint /commerce/plans ### Parameters #### Query Parameters - **paginated** (Optional) - Optional - Whether to paginate the results. If true, the results will be paginated. If false, the results will not be paginated. - **limit** (Optional) - Optional - Applies a limit to the number of results returned. Can be used for paginating the results together with `offset`. - **offset** (Optional) - Optional - Skip the first `offset` results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. - **payerType** (Optional) - Optional - Filter plans by payer type ### Response #### Success Response (200) - **GetCommercePlanListResponse** (object) - The response object containing a list of commerce plans. #### Response Example { "example": "response body" } ### Errors - **models/errors/ClerkErrors** (400, 401, 422) - Bad Request, Unauthorized, or Unprocessable Entity errors. - **models/errors/ClerkErrors** (500) - Internal Server Error. - **models/errors/SDKError** (4XX, 5XX) - General SDK errors. ``` -------------------------------- ### Instantiate PasskeyObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/PasskeyObject.md Demonstrates how to import and instantiate the PasskeyObject with the PASSKEY value. Ensure the Clerk backend API models are correctly imported. ```java import com.clerk.backend_api.models.components.PasskeyObject; PasskeyObject value = PasskeyObject.PASSKEY; ``` -------------------------------- ### Using VerificationOtpVerificationStrategy Enum Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/VerificationOtpVerificationStrategy.md Demonstrates how to use predefined enum values like PHONE_CODE and how to create instances from custom string values using the .of() method. ```java import com.clerk.backend_api.models.components.VerificationOtpVerificationStrategy; VerificationOtpVerificationStrategy value = VerificationOtpVerificationStrategy.PHONE_CODE; // Open enum: use .of() to create instances from custom string values VerificationOtpVerificationStrategy custom = VerificationOtpVerificationStrategy.of("custom_value"); ``` -------------------------------- ### GET /users Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/operations/GetUserListRequest.md Retrieves a list of users, with an option to filter by banned status. ```APIDOC ## GET /users ### Description Returns users which are either banned (`banned=true`) or not banned (`banned=false`). ### Method GET ### Endpoint /users ### Query Parameters - **banned** (Optional) - Optional - Filter users by their banned status. If true, returns banned users. If false, returns non-banned users. ``` -------------------------------- ### Get API Keys Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/operations/GetApiKeysResponse.md Retrieves a list of API keys associated with the account. ```APIDOC ## GET /v1/api-keys ### Description Retrieves a list of API keys associated with the account. ### Method GET ### Endpoint /v1/api-keys ### Response #### Success Response (200) - **contentType** (String) - Required - HTTP response content type for this operation - **statusCode** (int) - Required - HTTP response status code for this operation - **rawResponse** (HttpResponse) - Required - Raw HTTP response; suitable for custom response parsing - **object** (Optional) - 200 OK #### Response Example { "contentType": "application/json", "statusCode": 200, "rawResponse": "...", "object": { "apiKeys": [ { "id": "key_123", "key": "sk_test_...", "name": "My Test Key", "lastUsedAt": "2023-10-27T10:00:00Z", "createdAt": "2023-10-26T09:00:00Z" } ] } } ``` -------------------------------- ### Instantiate BillingPriceResponseObject Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/BillingPriceResponseObject.md Demonstrates how to import and instantiate the BillingPriceResponseObject with a predefined value like COMMERCE_PRICE. ```java import com.clerk.backend_api.models.components.BillingPriceResponseObject; BillingPriceResponseObject value = BillingPriceResponseObject.COMMERCE_PRICE; ``` -------------------------------- ### Using Strategy Enum in Java Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/components/Strategy.md Demonstrates how to import and use the Strategy enum for authentication. Use .of() to create instances from custom string values. ```java import com.clerk.backend_api.models.components.Strategy; Strategy value = Strategy.PHONE_CODE; // Open enum: use .of() to create instances from custom string values Strategy custom = Strategy.of("custom_value"); ``` -------------------------------- ### Get API Keys Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/operations/GetApiKeysResponseBody.md Retrieves a list of API keys and their total count. ```APIDOC ## GET /api/api-keys ### Description Retrieves a list of API keys and their associated data, along with the total count. ### Method GET ### Endpoint /api/api-keys ### Response #### Success Response (200) - **data** (List) - Required - List of API key data objects. - **totalCount** (double) - Required - The total number of API keys. #### Response Example ```json { "data": [ { "id": "key_abc123", "key": "sk_test_...", "created_at": "2023-01-01T12:00:00Z", "last_used_at": null, "name": "My Test Key", "permissions": ["users.read", "users.create"] } ], "totalCount": 1.0 } ``` ``` -------------------------------- ### Error Response Example Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/models/errors/GetM2MTokensM2mResponseBody.md Illustrates a potential error response for the GetM2MTokensM2m API. ```APIDOC ## 403 Forbidden ### Description Indicates that the request is forbidden, likely due to insufficient permissions. ``` -------------------------------- ### Create a new machine using Clerk SDK Java Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/machines/README.md Use this snippet to create a new machine. Ensure the BEARER_AUTH environment variable is set. ```java package hello.world; import com.clerk.backend_api.Clerk; import com.clerk.backend_api.models.errors.ClerkErrors; import com.clerk.backend_api.models.operations.CreateMachineResponse; import java.lang.Exception; public class Application { public static void main(String[] args) throws ClerkErrors, Exception { Clerk sdk = Clerk.builder() .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) .build(); CreateMachineResponse res = sdk.machines().create() .call(); if (res.machineCreated().isPresent()) { System.out.println(res.machineCreated().get()); } } } ``` -------------------------------- ### Get Organization Source: https://github.com/clerk/clerk-sdk-java/blob/main/docs/sdks/organizations/README.md Fetches an organization by its ID. The organization ID is provided as a path parameter. ```APIDOC ## GET /organizations/{organization_id} ### Description Fetches the organization whose ID or slug matches the provided `id_or_slug` URL query parameter. ### Method GET ### Endpoint /organizations/{organization_id} ### Parameters #### Path Parameters - **organization_id** (string) - Required - The ID of the organization to fetch. ### Response #### Success Response (200) - **organization** (Organization) - Description of the organization object returned. ### Errors - **models/errors/ClerkErrors** - Status Code: 400, 402, 403, 422 - Content Type: application/json - **models/errors/SDKError** - Status Code: 4XX, 5XX - Content Type: */* ```