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 Details

    • CustomDomainApi

      public CustomDomainApi()
    • CustomDomainApi

      public CustomDomainApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createCustomDomain

      public DomainResponse createCustomDomain(DomainRequest domain) throws ApiException
      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 ApiException
      Create 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

      public void deleteCustomDomain(String domainId) throws ApiException
      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 ApiException
      Delete 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

      public DomainResponse getCustomDomain(String domainId) throws ApiException
      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 ApiException
      Retrieve 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

      public DomainListResponse listCustomDomains() throws ApiException
      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 ApiException
      List 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 ApiException
      Replace 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

      public void upsertCertificate(String domainId, DomainCertificate certificate) throws ApiException
      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 ApiException
      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)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • verifyDomain

      public DomainResponse verifyDomain(String domainId) throws ApiException
      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 ApiException
      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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      DomainResponse
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()