# Edge Platform Admin API Use the Edge Platform Admin API to create, retrieve, update, and delete custom hostnames in your organization. This REST API lets you interact with: - The custom hostname object. Use a [custom hostname](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/custom-hostnames.html) to serve content or direct traffic to specific web services or applications under your organization's domain. After creating a custom hostname, you must: - [Register the hostname](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/set-up-a-custom-hostname.html#add-the-cname-and-txt-records-to-your-domains-dns-record). Add the CNAME and TXT records to verify domain ownership. - [Check the status](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/set-up-a-custom-hostname.html#check-the-status-of-your-custom-hostname). Ensure that it is active before using the hostname. Note the following: - You must have an [*Organization Admin* or *Organization Owner* role](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/roles.html#organization-roles) in Sitecore Cloud Portal. - To use this REST API, you must authenticate your API requests. - All API requests are made in your production environment. For more information, see the [official Sitecore Portal developer documentation](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/introduction-to-the-sitecore-cloud-portal.html). ## Authentication The Edge Platform Admin API uses bearer authentication. Bearer authentication involves security tokens called bearer tokens, which are generated in response to a login request. To get the [bearer token](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/manage-api-tokens.html): 1. Log in to [Sitecore Cloud Portal](https://portal.sitecorecloud.io/). 2. In the top-right corner of the menu bar, click your profile ![profile](https://resources.doc.sitecore.com/assets/image/uuid-b9b63de7-4dd2-ed95-8901-29afe1d1bf30.PNG) > **API tokens**. 3. Click **Copy to clipboard**. You can now start making REST API requests. You must include this token in the authorization header of every request you make. Version: 1.0 License: Apache 2.0 Metadata: - product: Cloud Portal ## Servers Production server ``` https://edge-platform-admin-api.sitecorecloud.io ``` ## Security ### BearerAuth Type: http Scheme: bearer Bearer Format: JWT ## Download OpenAPI description [Edge Platform Admin API](https://api-docs.sitecore.com/_spec/portal/edge-platform-admin-rest-api/index.yaml) ## Organizations The Organizations API lets you create and manage [custom hostnames](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/custom-hostnames.html) in your organization. ### Create a custom hostname - [POST /api/admin/v1/hostnames](https://api-docs.sitecore.com/portal/edge-platform-admin-rest-api/organizations/post_em.md): Creates a custom hostname in your organization by specifying a , a , and a . Wildcards and apex domains are not currently supported for naming hostnames. The number of custom hostnames you can create is limited by your organization's XM Cloud account entitlement. If this limit is exceeded, an error message is returned, and the custom hostname won't be created. After it is created, the custom hostname details are stored and used to resolve and route traffic for incoming requests. ### List custom hostnames - [GET /api/admin/v1/hostnames](https://api-docs.sitecore.com/portal/edge-platform-admin-rest-api/organizations/get_sm.md): Retrieves the list of all custom hostnames in your organization. This lets you check if a certain hostname already exists. If the hostname exists and you need to retrieve, update, or delete it, you can use the appropriate endpoint to perform the desired action. ### Retrieve a custom hostname - [GET /api/admin/v1/hostnames/{hostname}](https://api-docs.sitecore.com/portal/edge-platform-admin-rest-api/organizations/get_im.md): Retrieves a specific custom hostname in your organization, including details such as , , and SSL certificate information. If you don't know the exact , first retrieve all custom hostnames within your organization using the List custom hostnames endpoint. ### Update a custom hostname - [PATCH /api/admin/v1/hostnames/{hostname}](https://api-docs.sitecore.com/portal/edge-platform-admin-rest-api/organizations/patch_am.md): Partially updates a custom hostname by replacing the , , or both, as needed. The itself cannot be updated after the custom hostname has been created and registered. As a workaround, you must delete the existing custom hostname and create a new one to change the . ### Delete a custom hostname - [DELETE /api/admin/v1/hostnames/{hostname}](https://api-docs.sitecore.com/portal/edge-platform-admin-rest-api/organizations/delete_rm.md): Deletes a custom hostname and all its associated details. This is an irreversible operation.