Custom Domains: Retrieve One

This documentation entry provides a clear and detailed guide on how to retrieve a specific custom domain using the API, including the necessary parameters, headers, and expected response.

Endpoint

GET /api/domains/{domain_id}

Retrieve detailed information about a specific custom domain by its unique identifier.

Request

HTTP Request

GET https://uptimekeep.com/api/domains/{domain_id}

Replace {domain_id} with the ID of the custom domain you wish to retrieve.

Headers

Header
Type
Description

Authorization

String

Bearer token for API authentication.

Example of a request:

curl --request GET \
--url 'https://uptimekeep.com/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}'

Response

A successful response returns a JSON object containing detailed information about the specified custom domain.

Response Example

Fields

Data Object

Field
Type
Description

id

Integer

Unique identifier for the custom domain.

scheme

String

URL scheme used for the custom domain (e.g., "https://").

host

String

Hostname of the custom domain (e.g., "example.com").

custom_index_url

String

Custom URL for the index page, if applicable.

is_enabled

Boolean

Indicates if the custom domain is currently active.

last_datetime

String

Timestamp of the last activity related to the custom domain (in YYYY-MM-DD HH:MM:SS format).

datetime

String

Timestamp when the custom domain was created (in YYYY-MM-DD HH:MM:SS format).

Errors

If the request fails, the API will return an error message with an appropriate HTTP status code, such as 404 Not Found if the custom domain ID does not exist.

Last updated