# Create a claim

Start proving a domain is yours, and get the one DNS record to add.

POST `/api/v1/claims`

**cURL**

```shell
curl -X POST 'https://www.prufy.dev/api/v1/claims' \
  -c cookies.txt -b cookies.txt \
  -H 'content-type: application/json' \
  -d '{
  "input": "yourcompany.com"
}'
```

**Node.js**

```javascript
const response = await fetch("https://www.prufy.dev/api/v1/claims", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ input: "yourcompany.com" }),
})

// The session cookie is what makes this claim yours. Keep it for later requests.
const cookie = response.headers.getSetCookie()[0]?.split(";")[0]
const data = await response.json()
```

**Python**

```python
import requests

# A Session keeps the cookie the response sets, and sends it from then on.
session = requests.Session()

response = session.post(
    "https://www.prufy.dev/api/v1/claims",
    json={"input": "yourcompany.com"},
)
data = response.json()
```

Response 201 Created

```json
{
  "claimId": "clm_4b1f7c1e-52e7-4c0a-9a3b-7d2f0c6e8a10",
  "existing": false,
  "normalized": {
    "ascii": "yourcompany.com",
    "unicode": "yourcompany.com",
    "registrableDomain": "yourcompany.com",
    "isSubdomain": false,
    "warnings": []
  },
  "view": {
    "claimId": "clm_4b1f7c1e-52e7-4c0a-9a3b-7d2f0c6e8a10",
    "domainAscii": "yourcompany.com",
    "domainUnicode": "yourcompany.com",
    "dnsHost": {
      "providerId": "namecheap",
      "name": "Namecheap",
      "settingsUrl": "https://ap.www.namecheap.com/Domains/DomainControlPanel/yourcompany.com/advancedns",
      "nameservers": [
        "dns1.registrar-servers.com",
        "dns2.registrar-servers.com"
      ],
      "parked": false
    },
    "status": "pending",
    "explanation": {
      "headline": "Add this record at Namecheap",
      "why": "Most records appear within a few minutes. Your code works until 2026-11-17.",
      "fix": null,
      "action": {
        "kind": "check_now",
        "label": "Check now"
      }
    },
    "record": {
      "type": "TXT",
      "host": "_prufy-challenge",
      "fullName": "_prufy-challenge.yourcompany.com",
      "value": "prufy-domain-verification=xwqyp4hnsmgqxceo2xd6orgeay",
      "ttl": 300
    },
    "instructions": {
      "providerId": "namecheap",
      "name": "Namecheap",
      "hostFieldLabel": "Host",
      "valueFieldLabel": "Value",
      "settingsUrl": "https://ap.www.namecheap.com/Domains/DomainControlPanel/yourcompany.com/advancedns",
      "steps": [
        "Sign in to Namecheap and open Domain List.",
        "Click Manage next to your domain, then open the Advanced DNS tab.",
        "Click Add New Record and choose TXT Record."
      ],
      "notes": [
        "Namecheap adds your domain to the Host automatically. Enter only the part shown, without your domain."
      ]
    },
    "timing": {
      "lastCheckedAt": null,
      "nextCheckAt": "2026-11-10T09:30:30.000Z",
      "expiresAt": "2026-11-17T09:30:00.000Z",
      "canCheckNowAt": null
    },
    "phase": "add_record"
  },
  "warning": null
}
```

Send whatever the person typed: a bare domain, a URL or an email address all work. The response says what we made of it in `normalized`, and `view.record` is the TXT record to add.

This is the one route that can start a session. When the request carries no session cookie, the response sets one, and that cookie is what makes the claim yours. Keep it and send it with every later request.

Asking again for a domain you already have an open claim on returns that claim with `existing: true` and a 200, so it's safe to retry.

`warning` is `verified_by_another_account` when someone else has already proven this name. You can still go ahead: the newest proof wins.

## Authentication

Send the session cookie if you have one. If you don't, the response sets one. [How sessions work](https://www.prufy.dev/docs/authentication.md).

## Body

JSON, with `content-type: application/json`.

- `input` string required

  The domain, as typed. A URL or an email address works too: we keep the host.

  - At most 2,000 characters

## Response

`201 Created` or `200 OK`, with the same body either way. Times are ISO 8601 strings in UTC.

- `claimId` string

  The claim's id. It starts with `clm_`.
- `existing` boolean

  True when you already had an open claim on this domain and got it back.
- `normalized` object

  What we made of the input.

  - `ascii` string

    The name as DNS stores it: lowercase, in punycode if needed.
  - `unicode` string

    The name as a person reads it.
  - `registrableDomain` string

    The part someone registered: `acme.co.uk` for `mail.acme.co.uk`.
  - `isSubdomain` boolean

    True when the name is below its registrable domain.
  - `warnings` array of objects

    Things worth a second look. They never stop a claim.

    - `kind` "mixed_script"
    - `label` string

      The part of the name that mixes alphabets.
    - `scripts` array of strings

      The alphabets found in it, like Latin and Cyrillic.
    - `message` string

      The warning in plain words.
- `view` object

  The claim as it stands right now. Switch on `phase`.

  11 shapes, told apart by `phase`. Every one has the fields below, plus its own.

  - `claimId` string

    The claim's id.
  - `domainAscii` string

    The domain as DNS stores it.
  - `domainUnicode` string

    The domain as a person reads it.
  - `status` string

    The stored status. `phase` says more.

    - One of `pending` `verified` `at_risk` `lapsed` `expired` `transferred` `abandoned`
  - `dnsHost` object

    Who answers for this domain's DNS, and where to go to change it. On every view.

    - `providerId` string

      Who runs the DNS, judged by the nameservers.

      - One of `godaddy` `cloudflare` `namecheap` `route53` `vercel` `ionos` `squarespace` `hostinger` `wix` `porkbun` `google_cloud_dns` `cpanel` `unknown`
    - `name` string | null

      The provider's name. Null when the nameservers aren't one we know.
    - `settingsUrl` string | null

      A link to this domain's DNS settings there. Null when we have none.
    - `nameservers` array of strings

      What the domain answers from. Empty until public DNS has nameservers for it.
    - `parked` boolean

      True when the nameservers belong to a parking service, which usually can't hold records.
  - `explanation` object

    Where the claim stands, in plain words. Written to be shown as it is.

    - `headline` string

      What happened, in one line.
    - `why` string

      Why, in a sentence or two.
    - `fix` string | null

      The one thing to do next. Null when there's nothing.
    - `action` object

      The next step, as something a client can act on.

      - `kind` string

        `check_now` to run a check, `wait` when we're checking on our own, `new_code` to get a new code, `none` when it's done.

        - One of `check_now` `wait` `new_code` `none`
      - `label` string

        What to call that action on a button.

  `add_record` Pending, and no check of the current code has run yet.

  - `record` object

    The one DNS record that proves ownership.

    - `type` "TXT"
    - `host` string

      What to type in the provider's host field. Already adjusted for providers that add the domain themselves.
    - `fullName` string

      The record's full name, which is where we look.

      - Starts with `_prufy-challenge.`
    - `value` string

      The value to paste, exactly.

      - Starts with `prufy-domain-verification=`
    - `ttl` integer

      A suggested TTL, in seconds.
  - `instructions` object

    How to add the record at this domain's provider, in that provider's words.

    - `providerId` string

      Who runs this domain's DNS, as far as we can tell.

      - One of `godaddy` `cloudflare` `namecheap` `route53` `vercel` `ionos` `squarespace` `hostinger` `wix` `porkbun` `google_cloud_dns` `cpanel` `unknown`
    - `name` string

      The provider's name, or “your DNS provider” when unknown.
    - `hostFieldLabel` string

      What this provider calls the host field.
    - `valueFieldLabel` string

      What this provider calls the value field.
    - `settingsUrl` string

      Where its DNS settings are.
    - `steps` array of strings

      How to get to the right screen, in order.
    - `notes` array of strings

      What this provider does differently.
  - `timing` object

    When things happened and when they'll happen next.

    - `lastCheckedAt` string | null

      When the last check finished, if one has.
    - `nextCheckAt` string | null

      When we'll look next on our own. Null when nothing is scheduled.
    - `expiresAt` string

      When this code stops working: 7 days after it was issued.
    - `canCheckNowAt` string | null

      When Run a check is allowed again. Null means now.

  `checking` Pending, with a check running right now.

  - `record` object

    The one DNS record that proves ownership.

    - `type` "TXT"
    - `host` string

      What to type in the provider's host field. Already adjusted for providers that add the domain themselves.
    - `fullName` string

      The record's full name, which is where we look.

      - Starts with `_prufy-challenge.`
    - `value` string

      The value to paste, exactly.

      - Starts with `prufy-domain-verification=`
    - `ttl` integer

      A suggested TTL, in seconds.
  - `instructions` object

    How to add the record at this domain's provider, in that provider's words.

    - `providerId` string

      Who runs this domain's DNS, as far as we can tell.

      - One of `godaddy` `cloudflare` `namecheap` `route53` `vercel` `ionos` `squarespace` `hostinger` `wix` `porkbun` `google_cloud_dns` `cpanel` `unknown`
    - `name` string

      The provider's name, or “your DNS provider” when unknown.
    - `hostFieldLabel` string

      What this provider calls the host field.
    - `valueFieldLabel` string

      What this provider calls the value field.
    - `settingsUrl` string

      Where its DNS settings are.
    - `steps` array of strings

      How to get to the right screen, in order.
    - `notes` array of strings

      What this provider does differently.
  - `timing` object

    When things happened and when they'll happen next.

    - `lastCheckedAt` string | null

      When the last check finished, if one has.
    - `nextCheckAt` string | null

      When we'll look next on our own. Null when nothing is scheduled.
    - `expiresAt` string

      When this code stops working: 7 days after it was issued.
    - `canCheckNowAt` string | null

      When Run a check is allowed again. Null means now.

  `waiting_for_dns` Pending. The record is right and DNS is still catching up.

  - `record` object

    The one DNS record that proves ownership.

    - `type` "TXT"
    - `host` string

      What to type in the provider's host field. Already adjusted for providers that add the domain themselves.
    - `fullName` string

      The record's full name, which is where we look.

      - Starts with `_prufy-challenge.`
    - `value` string

      The value to paste, exactly.

      - Starts with `prufy-domain-verification=`
    - `ttl` integer

      A suggested TTL, in seconds.
  - `instructions` object

    How to add the record at this domain's provider, in that provider's words.

    - `providerId` string

      Who runs this domain's DNS, as far as we can tell.

      - One of `godaddy` `cloudflare` `namecheap` `route53` `vercel` `ionos` `squarespace` `hostinger` `wix` `porkbun` `google_cloud_dns` `cpanel` `unknown`
    - `name` string

      The provider's name, or “your DNS provider” when unknown.
    - `hostFieldLabel` string

      What this provider calls the host field.
    - `valueFieldLabel` string

      What this provider calls the value field.
    - `settingsUrl` string

      Where its DNS settings are.
    - `steps` array of strings

      How to get to the right screen, in order.
    - `notes` array of strings

      What this provider does differently.
  - `timing` object

    When things happened and when they'll happen next.

    - `lastCheckedAt` string | null

      When the last check finished, if one has.
    - `nextCheckAt` string | null

      When we'll look next on our own. Null when nothing is scheduled.
    - `expiresAt` string

      When this code stops working: 7 days after it was issued.
    - `canCheckNowAt` string | null

      When Run a check is allowed again. Null means now.
  - `outcome` object

    What the last check concluded.

    2 shapes, told apart by `kind`. Every one has the fields below, plus its own.

    - `seenBy` array of strings

      The servers that have the record.

    `propagating` The record is right, and some servers don't have it yet. Nothing to fix.

    - `notYet` array of strings

      The servers still waiting for it.

    `verified` Every server we asked has the record with the right value.

    Nothing beyond the shared fields.

  `fix_needed` Pending. The last check found something to change, and `outcome` says what.

  - `record` object

    The one DNS record that proves ownership.

    - `type` "TXT"
    - `host` string

      What to type in the provider's host field. Already adjusted for providers that add the domain themselves.
    - `fullName` string

      The record's full name, which is where we look.

      - Starts with `_prufy-challenge.`
    - `value` string

      The value to paste, exactly.

      - Starts with `prufy-domain-verification=`
    - `ttl` integer

      A suggested TTL, in seconds.
  - `instructions` object

    How to add the record at this domain's provider, in that provider's words.

    - `providerId` string

      Who runs this domain's DNS, as far as we can tell.

      - One of `godaddy` `cloudflare` `namecheap` `route53` `vercel` `ionos` `squarespace` `hostinger` `wix` `porkbun` `google_cloud_dns` `cpanel` `unknown`
    - `name` string

      The provider's name, or “your DNS provider” when unknown.
    - `hostFieldLabel` string

      What this provider calls the host field.
    - `valueFieldLabel` string

      What this provider calls the value field.
    - `settingsUrl` string

      Where its DNS settings are.
    - `steps` array of strings

      How to get to the right screen, in order.
    - `notes` array of strings

      What this provider does differently.
  - `timing` object

    When things happened and when they'll happen next.

    - `lastCheckedAt` string | null

      When the last check finished, if one has.
    - `nextCheckAt` string | null

      When we'll look next on our own. Null when nothing is scheduled.
    - `expiresAt` string

      When this code stops working: 7 days after it was issued.
    - `canCheckNowAt` string | null

      When Run a check is allowed again. Null means now.
  - `outcome` object

    What the last check concluded.

    2 shapes, told apart by `kind`.

    `mismatch` There's a record at the name, and its value isn't the code.

    - `reason` string

      How the value differs.

      - One of `lookalike_character` `truncated` `extra_quotes` `extra_whitespace` `wrong_prefix` `stale_token` `different_token`
    - `found` string

      The value DNS holds.
    - `expected` string

      The value it should hold.

      - Starts with `prufy-domain-verification=`
    - `diffAt` integer

      The position of the first character that differs, counting from 0.

    `not_found` No record with the code at the name we check.

    - `reason` string

      Where the record is, or why it can't be there.

      - One of `nothing_at_name` `host_doubled` `wrong_name` `not_at_authoritative` `cname_at_name` `nxdomain_zone`

  `try_again_later` Pending. DNS couldn't be reached, so we'll try again.

  - `record` object

    The one DNS record that proves ownership.

    - `type` "TXT"
    - `host` string

      What to type in the provider's host field. Already adjusted for providers that add the domain themselves.
    - `fullName` string

      The record's full name, which is where we look.

      - Starts with `_prufy-challenge.`
    - `value` string

      The value to paste, exactly.

      - Starts with `prufy-domain-verification=`
    - `ttl` integer

      A suggested TTL, in seconds.
  - `instructions` object

    How to add the record at this domain's provider, in that provider's words.

    - `providerId` string

      Who runs this domain's DNS, as far as we can tell.

      - One of `godaddy` `cloudflare` `namecheap` `route53` `vercel` `ionos` `squarespace` `hostinger` `wix` `porkbun` `google_cloud_dns` `cpanel` `unknown`
    - `name` string

      The provider's name, or “your DNS provider” when unknown.
    - `hostFieldLabel` string

      What this provider calls the host field.
    - `valueFieldLabel` string

      What this provider calls the value field.
    - `settingsUrl` string

      Where its DNS settings are.
    - `steps` array of strings

      How to get to the right screen, in order.
    - `notes` array of strings

      What this provider does differently.
  - `timing` object

    When things happened and when they'll happen next.

    - `lastCheckedAt` string | null

      When the last check finished, if one has.
    - `nextCheckAt` string | null

      When we'll look next on our own. Null when nothing is scheduled.
    - `expiresAt` string

      When this code stops working: 7 days after it was issued.
    - `canCheckNowAt` string | null

      When Run a check is allowed again. Null means now.
  - `outcome` object

    DNS couldn't be reached, so this check says nothing about the record.

    - `kind` "lookup_error"
    - `failures` array of objects

      Each server that couldn't be asked.

      - `resolver` string

        Who answered: `authoritative:<nameserver>` for one of the domain's own servers, or a public resolver.

        - One of `google` `cloudflare`, or a value added later
      - `error` string

        How the lookup went wrong.

        - One of `timeout` `servfail` `refused` `network` `bad_response` `no_nameserver_address`

  `verified` Ownership is proven. The record has to stay, and we re-check it daily.

  - `record` object

    The one DNS record that proves ownership.

    - `type` "TXT"
    - `host` string

      What to type in the provider's host field. Already adjusted for providers that add the domain themselves.
    - `fullName` string

      The record's full name, which is where we look.

      - Starts with `_prufy-challenge.`
    - `value` string

      The value to paste, exactly.

      - Starts with `prufy-domain-verification=`
    - `ttl` integer

      A suggested TTL, in seconds.
  - `verifiedAt` string

    When ownership was first proven.
  - `lastSeenAt` string

    When a check last found the record.
  - `nextCheckAt` string | null

    When we'll look next on our own. Null when nothing is scheduled.
  - `canCheckNowAt` string | null

    When Run a check is allowed again. Null means now.

  `at_risk` Verified, but the record has gone missing. Put it back before `lapsesAt`.

  - `record` object

    The one DNS record that proves ownership.

    - `type` "TXT"
    - `host` string

      What to type in the provider's host field. Already adjusted for providers that add the domain themselves.
    - `fullName` string

      The record's full name, which is where we look.

      - Starts with `_prufy-challenge.`
    - `value` string

      The value to paste, exactly.

      - Starts with `prufy-domain-verification=`
    - `ttl` integer

      A suggested TTL, in seconds.
  - `instructions` object

    How to add the record at this domain's provider, in that provider's words.

    - `providerId` string

      Who runs this domain's DNS, as far as we can tell.

      - One of `godaddy` `cloudflare` `namecheap` `route53` `vercel` `ionos` `squarespace` `hostinger` `wix` `porkbun` `google_cloud_dns` `cpanel` `unknown`
    - `name` string

      The provider's name, or “your DNS provider” when unknown.
    - `hostFieldLabel` string

      What this provider calls the host field.
    - `valueFieldLabel` string

      What this provider calls the value field.
    - `settingsUrl` string

      Where its DNS settings are.
    - `steps` array of strings

      How to get to the right screen, in order.
    - `notes` array of strings

      What this provider does differently.
  - `verifiedAt` string

    When ownership was first proven.
  - `atRiskSince` string

    When a check first found the record missing.
  - `lapsesAt` string

    When ownership ends if the record isn't back: 7 days on.
  - `nextCheckAt` string | null

    When we'll look next on our own. Null when nothing is scheduled.
  - `canCheckNowAt` string | null

    When Run a check is allowed again. Null means now.

  `lapsed` The record stayed missing past the grace period. Get a new code to start over.

  - `lapsedAt` string

    When ownership ended.
  - `lastSeenAt` string

    When a check last found the record.

  `expired` The code ran out before the record was found. Get a new code to carry on.

  - `expiredAt` string

    When the code stopped working.

  `transferred` Another account proved this domain more recently. Final.

  - `transferredAt` string

    When another account proved the domain.

  `abandoned` Stopped by its owner. Final.

  - `abandonedAt` string

    When the claim was stopped.
- `warning` "verified_by_another_account" | null

  Set when another account has already proven this domain. You can still go on.

## Errors

| Status | Kind | When |
| --- | --- | --- |
| 400 | `bad_request` | The body isn't JSON, or doesn't match the shape below. `message` names the first field to fix, and `fields` lists each one with its path. |
| 401 | `unauthorized` | The request carries a session cookie we don't know, because it ended or is from another Prufy. Nothing is created, and the response clears the cookie, so sending it again starts a new session. |
| 413 | `payload_too_large` | The body is over 16 KB. No route takes anything near that. |
| 422 | `empty` | The input is blank. This and the seven kinds below are a 422, each with a message that says what to type instead. |
| 422 | `invalid_characters` | The input has characters a domain can't contain. |
| 422 | `label_too_long` | One part between dots is longer than 63 characters. |
| 422 | `too_long` | The whole name is longer than 253 characters. |
| 422 | `ip_address` | The input is an IP address, not a domain. |
| 422 | `reserved_tld` | The ending is set aside, like `.test` or `.localhost`. |
| 422 | `public_suffix` | The input is a suffix many people share, like `co.uk`, not a domain under it. |
| 422 | `single_label` | The input has no dot, so there's no ending to look up. |
| 429 | `rate_limited` | The account has started 20 claims in the last hour, or this network has started 10 new sessions in the last hour. |

Any route can also answer `500` with `internal_error`. Every error has the same shape, described in [Errors](https://www.prufy.dev/docs/errors.md).

---

Every page of these docs, as a list: https://www.prufy.dev/llms.txt
