Modify the settings of your instance.
- get - Fetch the current instance
- update - Update instance settings
- updateRestrictions - Update instance restrictions
- getCommunication - Get instance communication settings
- updateCommunication - Update instance communication settings
- getOAuthApplicationSettings - Get OAuth application settings
- updateOAuthApplicationSettings - Update OAuth application settings
- changeDomain - Update production instance domain
- getOrganizationSettings - Get instance organization settings
- updateOrganizationSettings - Update instance organization settings
- getInstanceProtect - Get instance protect settings
- updateInstanceProtect - Update instance protect settings
Fetches the current instance
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.operations.GetInstanceResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetInstanceResponse res = sdk.instanceSettings().get()
.call();
if (res.instance().isPresent()) {
System.out.println(res.instance().get());
}
}
}| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/SDKError | 4XX, 5XX | */* |
Updates the settings of an instance
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceResponse;
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();
UpdateInstanceResponse res = sdk.instanceSettings().update()
.call();
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
UpdateInstanceRequestBody | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Updates the restriction settings of an instance
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceRestrictionsResponse;
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();
UpdateInstanceRestrictionsResponse res = sdk.instanceSettings().updateRestrictions()
.call();
if (res.instanceRestrictions().isPresent()) {
System.out.println(res.instanceRestrictions().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
UpdateInstanceRestrictionsRequestBody | ✔️ | The request object to use for the request. |
UpdateInstanceRestrictionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 402, 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Retrieves the per-instance SMS communication settings, including the SMS country blocklist.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.operations.GetInstanceCommunicationResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetInstanceCommunicationResponse res = sdk.instanceSettings().getCommunication()
.call();
if (res.instanceCommunication().isPresent()) {
System.out.println(res.instanceCommunication().get());
}
}
}GetInstanceCommunicationResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/SDKError | 4XX, 5XX | */* |
Replaces the SMS country blocklist for this instance. Pass the full set of ISO 3166-1
alpha-2 country codes that should be blocked; codes that aren't recognized as SMS-tier
countries are silently dropped from the persisted list. Omitting blocked_country_codes
is a no-op.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationResponse;
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();
UpdateInstanceCommunicationResponse res = sdk.instanceSettings().updateCommunication()
.call();
if (res.instanceCommunication().isPresent()) {
System.out.println(res.instanceCommunication().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
UpdateInstanceCommunicationRequestBody | ✔️ | The request object to use for the request. |
UpdateInstanceCommunicationResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Retrieves the settings for OAuth applications for the instance (dynamic client registration, JWT access tokens, etc.).
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.operations.GetInstanceOAuthApplicationSettingsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetInstanceOAuthApplicationSettingsResponse res = sdk.instanceSettings().getOAuthApplicationSettings()
.call();
if (res.oAuthApplicationSettings().isPresent()) {
System.out.println(res.oAuthApplicationSettings().get());
}
}
}GetInstanceOAuthApplicationSettingsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/SDKError | 4XX, 5XX | */* |
Updates the OAuth application settings for the instance.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceOAuthApplicationSettingsResponse;
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();
UpdateInstanceOAuthApplicationSettingsResponse res = sdk.instanceSettings().updateOAuthApplicationSettings()
.call();
if (res.oAuthApplicationSettings().isPresent()) {
System.out.println(res.oAuthApplicationSettings().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
UpdateInstanceOAuthApplicationSettingsRequestBody | ✔️ | The request object to use for the request. |
UpdateInstanceOAuthApplicationSettingsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Change the domain of a production instance.
Changing the domain requires updating the DNS records accordingly, deploying new SSL certificates, updating your Social Connection's redirect URLs and setting the new keys in your code.
WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.ChangeProductionInstanceDomainResponse;
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();
ChangeProductionInstanceDomainResponse res = sdk.instanceSettings().changeDomain()
.call();
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ChangeProductionInstanceDomainRequestBody | ✔️ | The request object to use for the request. |
ChangeProductionInstanceDomainResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 400, 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Retrieves the organization settings of the instance
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.GetInstanceOrganizationSettingsResponse;
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();
GetInstanceOrganizationSettingsResponse res = sdk.instanceSettings().getOrganizationSettings()
.call();
if (res.organizationSettings().isPresent()) {
System.out.println(res.organizationSettings().get());
}
}
}GetInstanceOrganizationSettingsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 402, 404, 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Updates the organization settings of the instance
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceOrganizationSettingsResponse;
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();
UpdateInstanceOrganizationSettingsResponse res = sdk.instanceSettings().updateOrganizationSettings()
.call();
if (res.organizationSettings().isPresent()) {
System.out.println(res.organizationSettings().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
UpdateInstanceOrganizationSettingsRequestBody | ✔️ | The request object to use for the request. |
UpdateInstanceOrganizationSettingsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 400, 402, 403, 404, 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Get instance protect settings
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.operations.GetInstanceProtectResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetInstanceProtectResponse res = sdk.instanceSettings().getInstanceProtect()
.call();
if (res.instanceProtect().isPresent()) {
System.out.println(res.instanceProtect().get());
}
}
}| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/SDKError | 4XX, 5XX | */* |
Update instance protect settings
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceProtectResponse;
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();
UpdateInstanceProtectResponse res = sdk.instanceSettings().updateInstanceProtect()
.call();
if (res.instanceProtect().isPresent()) {
System.out.println(res.instanceProtect().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
UpdateInstanceProtectRequestBody | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |