Package com.okta.sdk.resource.api
Class CustomDomainApi
java.lang.Object
com.okta.sdk.resource.api.CustomDomainApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2026-03-13T17:36:05.533634+05:30[Asia/Kolkata]",
comments="Generator version: 7.15.0")
public class CustomDomainApi
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCustomDomain(DomainRequest domain) Create a custom domain Creates your custom domaincreateCustomDomain(DomainRequest domain, Map<String, String> additionalHeaders) Create a custom domain Creates your custom domainvoiddeleteCustomDomain(String domainId) Delete a custom domain Deletes a custom domain by `domainId`voiddeleteCustomDomain(String domainId, Map<String, String> additionalHeaders) Delete a custom domain Deletes a custom domain by `domainId`getCustomDomain(String domainId) Retrieve a custom domain Retrieves a custom domain by `domainId`getCustomDomain(String domainId, Map<String, String> additionalHeaders) Retrieve a custom domain Retrieves a custom domain by `domainId`protected static com.fasterxml.jackson.databind.ObjectMapperList all custom domains Lists all verified custom domains for the orglistCustomDomains(Map<String, String> additionalHeaders) List all custom domains Lists all verified custom domains for the orgreplaceCustomDomain(String domainId, UpdateDomain updateDomain) Replace a custom domain's brand Replaces a custom domain's brandreplaceCustomDomain(String domainId, UpdateDomain updateDomain, Map<String, String> additionalHeaders) Replace a custom domain's brand Replaces a custom domain's brandvoidsetApiClient(ApiClient apiClient) voidupsertCertificate(String domainId, DomainCertificate certificate) Upsert the custom domain's certificate Upserts (creates or renews) the `MANUAL` certificate for the custom domain > **Notes:** > * If the existing `certificateSourceType` is `OKTA_MANAGED`, this operation changes the source type to `MANUAL`.voidupsertCertificate(String domainId, DomainCertificate certificate, Map<String, String> additionalHeaders) Upsert the custom domain's certificate Upserts (creates or renews) the `MANUAL` certificate for the custom domain > **Notes:** > * If the existing `certificateSourceType` is `OKTA_MANAGED`, this operation changes the source type to `MANUAL`.verifyDomain(String domainId) Verify a custom domain Verifies the custom domain and validity of DNS records by `domainId`.verifyDomain(String domainId, Map<String, String> additionalHeaders) Verify a custom domain Verifies the custom domain and validity of DNS records by `domainId`.
-
Constructor Details
-
CustomDomainApi
public CustomDomainApi() -
CustomDomainApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
createCustomDomain
Create a custom domain Creates your custom domain- Parameters:
domain- (required)- Returns:
- DomainResponse
- Throws:
ApiException- if fails to make API call
-
createCustomDomain
public DomainResponse createCustomDomain(DomainRequest domain, Map<String, String> additionalHeaders) throws ApiExceptionCreate a custom domain Creates your custom domain- Parameters:
domain- (required)additionalHeaders- additionalHeaders for this call- Returns:
- DomainResponse
- Throws:
ApiException- if fails to make API call
-
deleteCustomDomain
Delete a custom domain Deletes a custom domain by `domainId`- Parameters:
domainId- `id` of the Domain (required)- Throws:
ApiException- if fails to make API call
-
deleteCustomDomain
public void deleteCustomDomain(String domainId, Map<String, String> additionalHeaders) throws ApiExceptionDelete a custom domain Deletes a custom domain by `domainId`- Parameters:
domainId- `id` of the Domain (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
getCustomDomain
Retrieve a custom domain Retrieves a custom domain by `domainId`- Parameters:
domainId- `id` of the Domain (required)- Returns:
- DomainResponse
- Throws:
ApiException- if fails to make API call
-
getCustomDomain
public DomainResponse getCustomDomain(String domainId, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a custom domain Retrieves a custom domain by `domainId`- Parameters:
domainId- `id` of the Domain (required)additionalHeaders- additionalHeaders for this call- Returns:
- DomainResponse
- Throws:
ApiException- if fails to make API call
-
listCustomDomains
List all custom domains Lists all verified custom domains for the org- Returns:
- DomainListResponse
- Throws:
ApiException- if fails to make API call
-
listCustomDomains
public DomainListResponse listCustomDomains(Map<String, String> additionalHeaders) throws ApiExceptionList all custom domains Lists all verified custom domains for the org- Parameters:
additionalHeaders- additionalHeaders for this call- Returns:
- DomainListResponse
- Throws:
ApiException- if fails to make API call
-
replaceCustomDomain
public DomainResponse replaceCustomDomain(String domainId, UpdateDomain updateDomain) throws ApiException Replace a custom domain's brand Replaces a custom domain's brand- Parameters:
domainId- `id` of the Domain (required)updateDomain- (required)- Returns:
- DomainResponse
- Throws:
ApiException- if fails to make API call
-
replaceCustomDomain
public DomainResponse replaceCustomDomain(String domainId, UpdateDomain updateDomain, Map<String, String> additionalHeaders) throws ApiExceptionReplace a custom domain's brand Replaces a custom domain's brand- Parameters:
domainId- `id` of the Domain (required)updateDomain- (required)additionalHeaders- additionalHeaders for this call- Returns:
- DomainResponse
- Throws:
ApiException- if fails to make API call
-
upsertCertificate
Upsert the custom domain's certificate Upserts (creates or renews) the `MANUAL` certificate for the custom domain > **Notes:** > * If the existing `certificateSourceType` is `OKTA_MANAGED`, this operation changes the source type to `MANUAL`. Okta no longer manages and renews certificates for this domain after you provide a user-managed certificate. > * Okta supports TLS certificates and private keys that are PEM-encoded and 2048, 3072, or 4096 bits. See the [Custom domain guide](https://developer.okta.com/docs/guides/custom-url-domain/main/) for more details.- Parameters:
domainId- `id` of the Domain (required)certificate- (required)- Throws:
ApiException- if fails to make API call
-
upsertCertificate
public void upsertCertificate(String domainId, DomainCertificate certificate, Map<String, String> additionalHeaders) throws ApiExceptionUpsert the custom domain's certificate Upserts (creates or renews) the `MANUAL` certificate for the custom domain > **Notes:** > * If the existing `certificateSourceType` is `OKTA_MANAGED`, this operation changes the source type to `MANUAL`. Okta no longer manages and renews certificates for this domain after you provide a user-managed certificate. > * Okta supports TLS certificates and private keys that are PEM-encoded and 2048, 3072, or 4096 bits. See the [Custom domain guide](https://developer.okta.com/docs/guides/custom-url-domain/main/) for more details.- Parameters:
domainId- `id` of the Domain (required)certificate- (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
verifyDomain
Verify a custom domain Verifies the custom domain and validity of DNS records by `domainId`. Verify your custom domain to confirm that you own or control the domain and that you have properly configured the required DNS records. Furthermore, if the `certificateSourceType` in the domain is `OKTA_MANAGED`, then an attempt is made to obtain and install a certificate. After a certificate is obtained and installed by Okta, Okta manages the certificate including certificate renewal. Verify your custom domain after you've [created it](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/CustomDomain/#tag/CustomDomain/operation/createCustomDomain) and after you've added your TXT and CNAME records to your domain provider. Okta doesn't verify your domain automatically. You must use the API to verify your custom domain if you change your DNS records or if you encounter issues with domain validation. > **Note:** DNS record changes can take time to propagate. If you recently updated your DNS records, you may need to wait before verifying your custom domain. If you encounter issues with domain verification, double-check your DNS records and ensure that they're correctly configured. See [Update your DNS TXT](https://developer.okta.com/docs/guides/custom-url-domain/main/#update-your-dns-txt) for more information about verifying your custom domain.- Parameters:
domainId- `id` of the Domain (required)- Returns:
- DomainResponse
- Throws:
ApiException- if fails to make API call
-
verifyDomain
public DomainResponse verifyDomain(String domainId, Map<String, String> additionalHeaders) throws ApiExceptionVerify a custom domain Verifies the custom domain and validity of DNS records by `domainId`. Verify your custom domain to confirm that you own or control the domain and that you have properly configured the required DNS records. Furthermore, if the `certificateSourceType` in the domain is `OKTA_MANAGED`, then an attempt is made to obtain and install a certificate. After a certificate is obtained and installed by Okta, Okta manages the certificate including certificate renewal. Verify your custom domain after you've [created it](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/CustomDomain/#tag/CustomDomain/operation/createCustomDomain) and after you've added your TXT and CNAME records to your domain provider. Okta doesn't verify your domain automatically. You must use the API to verify your custom domain if you change your DNS records or if you encounter issues with domain validation. > **Note:** DNS record changes can take time to propagate. If you recently updated your DNS records, you may need to wait before verifying your custom domain. If you encounter issues with domain verification, double-check your DNS records and ensure that they're correctly configured. See [Update your DNS TXT](https://developer.okta.com/docs/guides/custom-url-domain/main/#update-your-dns-txt) for more information about verifying your custom domain.- Parameters:
domainId- `id` of the Domain (required)additionalHeaders- additionalHeaders for this call- Returns:
- DomainResponse
- Throws:
ApiException- if fails to make API call
-
getObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-