---
title: "Check a custom domain again"
method: POST
path: "/v2/teamspaces/{teamspaceId}/sites/{siteId}/domain/refresh"
tags: ["Docs7 Sites"]
---

# Check a custom domain again

`POST /v2/teamspaces/{teamspaceId}/sites/{siteId}/domain/refresh`

## Request

- Base URL: `https://context7.com/api`
- URL: `https://context7.com/api/v2/teamspaces/{teamspaceId}/sites/{siteId}/domain/refresh`
- Auth: HTTP bearer

Check the custom domain now: the ownership TXT record when it waits for proof, else the DNS and certificate state. A verified path domain starts a rebuild. Owner or admin. Only for GitHub sites: a CLI site (`source: "local"`) answers 404.

## Path parameters

- `teamspaceId` string, uuid, required
- `siteId` string, uuid, required

## Response `200`

The site with the new domain state

- object
  - `data` Docs7Site, required: A Docs7 site built from a GitHub repository.
    - `id` string, uuid, required
    - `projectId` string, uuid, required: Teamspace id.
    - `createdBy` string, nullable
    - `repoUrl` string, uri, required
    - `repositoryId` string: GitHub repository id.
    - `installationId` integer: GitHub App installation id.
    - `branch` string, nullable: Pinned production branch. Null follows the default branch.
    - `defaultBranch` string, nullable
    - `docsPath` string, required: Docs folder in the repository; `.` is the root.
    - `hosting` 'off' | 'on', required: `off`: added for the agents only, nothing is published.
    - `analyticsUrl` string, uri, nullable: External docs URL for browser analytics of a site that Docs7 does not host.
    - `workerName` string
    - `platformHostname` string, required
    - `customDomain` string, nullable
    - `customDomainPath` string, nullable: Path prefix the docs are served under on the custom domain.
    - `customDomainRouting` 'dns' | 'proxy', nullable
    - `customHostnameId` string, nullable
    - `customDomainStatus` 'none' | 'pending_ownership' | 'pending_dns' | 'pending_validation' | 'pending_certificate' | 'pending_proxy' | 'active' | 'failed', required
    - `customDomainError` string, nullable
    - `customDomainRecords` Docs7DnsRecord[]
      - `purpose` 'domain_ownership' | 'tls_certificate', required
      - `type` 'CNAME' | 'TXT', required
      - `name` string, required
      - `value` string, required
    - `context7Index` boolean, required: Whether the repository is indexed in Context7.
    - `context7LibraryName` string
    - `improveSchedule` 'off' | 'daily' | 'weekly', required: How often the Context7 Agent runs on its own.
    - `pullRequestReview` Docs7PullRequestReview: PR Review Agent settings.
      - `enabled` boolean, required
      - `response` 'comment' | 'pull_request' | 'commit', required: What the agent does with its fixes. The findings comment is always posted, and every check always runs.
    - `codeWatch` object: Code Watch Agent settings: code repositories whose merged pull requests can change the docs.
      - `enabled` boolean, required
      - `repositories` object[], required
        - `repositoryId` string, required
        - `repoUrl` string, uri, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `buildFixSchedule` 'off' | 'after_build' | 'daily' | 'weekly': When the Build Fix Agent fixes the issues of the latest production build (hosted sites).
    - `snippetSchedule` 'off' | 'monthly': Whether the Example Check Agent runs every code example of the docs once a month (Docs7 Pro).

## Other responses

- `400`: Invalid teamspace or site id
- `401`: Missing or invalid bearer
- `403`: Not a member, missing role, or an API key of another teamspace
- `404`: No such site in this teamspace
- `409`: No custom domain (`custom_domain_not_configured`), the domain is taken (`domain_conflict`), or `project_busy`
- `500`: Internal error
- `502`: The check failed

## Changes

- **2026-10-27** `2ead96d131a7`: 1 info
  - added the optional property `data/snippetSchedule` to the response with the `200` status
- **2026-10-22** `e17589fd8767`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/context7/apis/context7-public-api/changes/v2/teamspaces/:teamspaceId/sites/:siteId/domain/refresh/post.md)

---

[API](https://skmtc.dev/context7/apis/context7-public-api.md) - [All operations](https://skmtc.dev/context7/apis/context7-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/context7/apis/context7-public-api/revisions/945f7834fa8c?raw)
