# Check a domain's DNS now

Source: https://openpanel.sh/docs/api/domains/check-a-domain-s-dns-now

Looks up the TXT record at _openpanel.<domain> now. When it holds the domain's value, the domain is verified and is yours: the first organization to prove a domain wins it. Answers 422 with what is missing otherwise; a claim not proven within 7 days goes and has to be added again.

`POST https://openpanel.sh/api/v1/domains/{domainId}/verify`

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `domainId` | path | yes |  |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | Check a domain's DNS now | `application/json`, `Domain` |
| 401 | No valid credential was sent. | `application/problem+json`, `Problem` |
| 403 | The credential may not do this. | `application/problem+json`, `Problem` |
| 404 | Not found, or not visible to this credential. | `application/problem+json`, `Problem` |
| 409 | It clashes with something that exists, such as a name in use. | `application/problem+json`, `Problem` |
| 422 | The input was refused; detail says why. | `application/problem+json`, `Problem` |
| 429 | Too many requests; wait for Retry-After seconds. | `application/problem+json`, `Problem` |

## Schemas

### DnsRecord

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "CNAME",
        "TXT"
      ]
    },
    "name": {
      "type": "string"
    },
    "value": {
      "type": "string"
    },
    "purpose": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "name",
    "value",
    "purpose"
  ]
}
```

### Domain

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "serviceId": {
      "type": "string",
      "format": "uuid"
    },
    "projectId": {
      "type": "string",
      "format": "uuid"
    },
    "host": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "enum": [
        "opnl",
        "custom"
      ]
    },
    "port": {
      "type": "integer"
    },
    "verifyToken": {
      "type": [
        "string",
        "null"
      ]
    },
    "verifiedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "certificateSource": {
      "type": "string",
      "enum": [
        "auto",
        "uploaded"
      ],
      "description": "uploaded: the edge serves the certificate you uploaded for this domain."
    },
    "certificateExpiresAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "description": "When the uploaded certificate expires."
    },
    "dnsZoneId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "description": "The connected Cloudflare zone in which OpenPanel wrote this domain's records; null when you add them yourself."
    },
    "dnsProblem": {
      "description": "Why OpenPanel could not write a record in that zone, such as a name that already has one.",
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "records": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DnsRecord"
      },
      "description": "For your own domain: the DNS records to add."
    }
  },
  "required": [
    "id",
    "serviceId",
    "projectId",
    "host",
    "kind",
    "port",
    "verifyToken",
    "verifiedAt",
    "certificateSource",
    "certificateExpiresAt",
    "dnsZoneId",
    "dnsProblem",
    "createdAt",
    "records"
  ]
}
```

### Problem

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "A link to the error's explanation in the docs."
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    },
    "code": {
      "type": "string",
      "description": "Stable machine-readable code: not_found, forbidden, invalid, conflict, rate_limited, not_implemented, …"
    },
    "detail": {
      "type": "string",
      "description": "What went wrong, in a sentence written for a person."
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "code",
    "detail"
  ]
}
```