Introduction📖
Postman is an API client that allows developers to quickly create, share, test, and document APIs. This is accomplished by allowing users to create, save, and read simple and complex HTTP/s requests.

In this article, we will discuss using a custom domain for the API documentation in postman.
Using Custom Domains👨🏻💻
Postman provides the functionality of using a custom domain for your API documentation. We will discuss using custom domains under the following headings:
Adding a Custom Domain➕
To add a custom domain, open the postman web dashboard and navigate to the team tab.

Now navigate to the custom domains section, which displays a list of domains and their verification status. Choose to add custom domain.

In the following step, enter the domain URL you want to add. Your domain can be either a whole domain or a subdomain. You can, for example, use either example.com or api.example.com.

Now to verify your domain, click proceed.
Verifying Your Domain🔎
Postman displays the DNS records required to verify domain ownership when you add a custom domain. To prove that you own the domain you're attempting to add, add the provided tokens as TXT and CNAME DNS records to your domain.

Adding DNS Records🗃️
Verify the ownership of DNS records with a DNS web service provider. Go to the DNS provider's console in a separate browser tab and add the two new records listed below.
- A TXT record for postman-echo.com verifies domain ownership. The value must match the token displayed in the modal. Incorporate the TXT record into the root domain. If you're adding example.com or api.example.com, add the TXT record to example.com.
- As shown in the modal, a CNAME record for docs.postman-echo.com. This value is required to be phs.getpostman.com. Include the CNAME record in the URL for your public documentation.
To verify the domain, select confirm domain. After checking, I've added the TXT and CNAME records checkbox. The domain will be verified when you receive a confirmation message.

Note: To host public documentation on your domain, postman employs letsencrypt as an SSL certificate provider to host public documentation on your domain. If your domain lacks CAA records, letsencrypt will generate a certificate automatically. LetsEncrypt requires an explicit CAA record to issue a certificate for a domain with CAA records. Refer to the letsencrypt documentation to enable letsencrypt to issue this certificate.
You can select verify later if you do not want to verify the domain right now. By selecting delete custom domain, you can delete the custom domain. It may take up to 24 hours for your DNS settings to take effect.
Troubleshooting DNS Issues✔

If you receive the error message when adding your first domain, remember that CNAME records cannot coexist with any other domain records. You must either change the existing record type for your subdomain to CNAME or create a new subdomain.
If you receive the same message when adding your second domain, remember that because the TXT record verifies domain ownership, the value will be the same as the token you said for the root domain. Include the CNAME record in the URL associated with your public documentation, with the value phs.getpostman.com.
Publishing a Collection on Your Custom Domain👩🏻💻
You can use your domain to publish your API documentation once it has been verified. If you already have a collection published, you can update it to use the new domain.
